列表视图项动画停止滚动时 [英] Listview items Animation Stop While Scrolling

查看:98
本文介绍了列表视图项动画停止滚动时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想告诉进度用一个简单的动画为每个的ListView 项目,但 当我滚动时,进度动画停止。滚动结束后动画重新开始。 见下图。

解决方案

我用这个语法在我的适配器,问题就解决了​​

 公共类AdapterDownload扩展ArrayAdapter< StructDownload> {

公共AdapterDownload(ArrayList中< StructDownload>数组){
    超(G.context,R.layout.item_layout,阵列);
}


私有静态类ViewHolder {

    公共ViewHolder(查看视图)
    {

    }


    公共空隙填充(最终ArrayAdapter< StructDownload>适配器,最终StructDownload项目,最终诠释的位置)
    {

    }
}


@覆盖
公共查看getView(INT位置,查看convertView,ViewGroup中父){

}
 

}

感谢你。

I am trying to show ProgressBar with a simple animation for each ListView item, but when I am scrolling, the ProgressBar animation stops. After scrolling ends the animation starts again. See image below.

解决方案

I used This Syntax in my Adapter And problem solved !

public class AdapterDownload extends ArrayAdapter<StructDownload> {

public AdapterDownload(ArrayList<StructDownload> array) {
    super(G.context, R.layout.item_layout, array);
}


private static class ViewHolder {

    public ViewHolder(View view)
    {

    }


    public void fill(final ArrayAdapter<StructDownload> adapter, final StructDownload item, final int position)
    {

    }
}


@Override
public View getView(int position, View convertView, ViewGroup parent) {

}

}

Thank You.

这篇关于列表视图项动画停止滚动时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆