Tôi đang cố gắng hiển thị danh sách yêu thích theo cách mà mỗi một trong số chúng hoạt ảnh và sau đó trở thành hiển thị để sau mỗi lần chúng hoạt ảnh và hiển thị với người dùng. Tôi nhưng Khi tôi thực hiện các hình ảnh động, nó không làm việc trên mục individial, nhưng làm việc trên toàn bộ listview :(Animate từng mục của Listview khi hiển thị
public View getView(final int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
LayoutInflater layoutInflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row =layoutInflater.inflate(R.layout.categories_row, parent, false);
tvCatName = (TextView) row.findViewById(R.id.tvCatName);
tvCatName.setText(Data.alCategoriesModels.get(position).catname);
row.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Toasts.pop(activity, "Category id : " + Data.alCategoriesModels.get(position).catID);
}
});
// row.setAnimation(animation);
row.startAnimation(animation);
return row;
}
Làm thế nào để làm cho từng người một hình ảnh động trên mỗi phần tử của danh sách xem. . đang mở rộng ArrayAdapter
bạn có thể thêm một số giải thích không? –