@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holderView = null;
if (convertView == null) {
holderView = new ViewHolder ();
convertView = View.inflate(mContext, R.layout.item_string_list, null);
holderView.t = (TextView) convertView.findViewById(R.id.t);
convertView.setTag(holderView);
}else{
holderView =(ViewHolder) convertView.getTag();
}
AnimationSet animationSet = new AnimationSet(true);
TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
mHiddenAction.setDuration(1000);
animationSet.addAnimation(mHiddenAction);
holderView.t.startAnimation(animationSet);
holderView.t.setText(datas.get(position));
return convertView;
}
StringListAdapter.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:SunmiUI
作者:
评论列表
文章目录