1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 08:52:18 -05:00

Moved LayoutAnimation creation to initAnimation()

This commit is contained in:
Sebastian Kaspari 2009-05-30 13:37:14 +02:00
parent c179520a17
commit d90d31730c

View File

@ -93,6 +93,11 @@ public class ServerList extends ListActivity implements OnItemLongClickListener,
this.getListView().setOnItemLongClickListener(this);
this.initAnimation();
}
public void initAnimation()
{
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
@ -106,8 +111,7 @@ public class ServerList extends ListActivity implements OnItemLongClickListener,
animation.setDuration(300);
set.addAnimation(animation);
LayoutAnimationController controller =
new LayoutAnimationController(set, 0.5f);
LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
ListView lv = (ListView) getListView();
lv.setLayoutAnimation(controller);
}