1
我放在screen.and中心一个ListView我开始一个动画:如何避免listview重置位置notifyDataSetChanged后?
hideAnimation= new TranslateAnimation(0, -220, 0, 0);
hideAnimation.setDuration(500);
hideAnimation.setFillBefore(false);
hideAnimation.setFillAfter(true);
hideAnimation.setAnimationListener(this);
而且在方法onAnimationEnd,我清晰动画和设置布局是这样的:
mlistView.layout(-220, 0, 500, 500);
和一切正常罚款到目前为止。 但经过mlistView.layout(-220,0,500,500),我需要刷新我的listview.so我只是叫
adapter.notifyDataSetChanged();
然后我的ListView回来在屏幕中央...
任何人都知道如何处理这个?
最后我用AbsoluteLayout和AbsoluteLayout.LayoutParams设定的部份位置。它的工作原理。感谢您的帮助 – user2194312 2013-04-07 03:19:35
非常欢迎 – 2013-04-07 06:12:29