Reputation: 4926
hello , i want to drawable animation for only grid view single child but i could not find the proper solution for this
this is sample pic where you can see the red circle , i just want the drawable animation for that grid view child [red circle image].
Thanks....
Upvotes: 0
Views: 1266
Reputation: 4926
Here is solution .....
i just write the following code into getView method of Adapter class
if (position == 0) {
v.setBackgroundResource(R.anim.frame);
mAnimation = (AnimationDrawable) v.getBackground();
v.postDelayed(new Runnable() {
public void run() {
if (mAnimation != null)
mAnimation .start();
}
}, 100);
}
Upvotes: 1