Moved LayoutAnimation creation to initAnimation()

This commit is contained in:
Sebastian Kaspari 2009-05-30 13:37:14 +02:00
parent c179520a17
commit d90d31730c
1 changed files with 7 additions and 3 deletions

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);
}