Problem about an animation on a View took from a listAdapter

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problem about an animation on a View took from a listAdapter

Postby andreagosto » Tue Sep 30, 2008 11:44 am

hi, if i take e view from a listadapter, i'm not able to start on it any animation. why that?

example:
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);

Animation anim = AnimationUtils.loadAnimation(this,
R.anim.animaton);
v.startAnimation(anim); //it works fine

Adapter adapt = l.getAdapter();
v = (View) adapt.getView ((int) id, null, null);
v.startAnimation(anim); //it does not work
}
User avatar
andreagosto
Freshman
Freshman
 
Posts: 8
Joined: Tue Jul 29, 2008 3:38 pm

Top

Postby andreagosto » Tue Sep 30, 2008 12:00 pm

to avoid a possible confusion:

Adapter adapt = l.getAdapter();
v = (View) adapt.getView ((int) (id + 1), null, null);
v.startAnimation(anim); //it also does not work
User avatar
andreagosto
Freshman
Freshman
 
Posts: 8
Joined: Tue Jul 29, 2008 3:38 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests