网格视图独生子女绘制动画 [英] Grid View single child drawable animation
本文介绍了网格视图独生子女绘制动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我想可绘制仅为网格视图独生子女动画
但我无法找到此妥善解决
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].
感谢....
推荐答案
下面是解决方案.....
Here is solution .....
我只是写了以下code到适配器类的getView方法
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);
}
这篇关于网格视图独生子女绘制动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文