Yaptığım şey, dönüşümü dönüştürmek için animasyonu ayarlamak ve daha sonra her bir görüntülemede animasyonu durdurmak. Bu şekilde, animasyon durdurulur ve daha sonra dönüştürme yeniyse oynatılır ve bitmeden önce geri dönüştürülmezse sonuna kadar devam eder.
Edit Bir örnek bulamıyorum, bu nedenle kısmen sahte kod olacaktır.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
if(convertView == null) {
// setup holder
holder = new ViewHolder();
LayoutInflater Inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = Inflater.inflate(mResourceId, null);
holder.image = (ImageView) convertView.findViewById(R.id.row_image);
holder.headline = (TextView) convertView.findViewById(R.id.row_headline);
convertView.setTag(holder);
} else {
// get existing row view
holder = (ViewHolder) convertView.getTag();
}
// GetView is only called on new items
// so now we stop the previous animation and start a new
holder.animation.stop(); // First you stop the animation
holder.animation = new animation(); // then you create new
holder.animation.start(); // then you start the animation.
örnek kod şeyler tedarik edebilir: En adaptör olarak
aşağıdaki gibi bir şey olacak? –
@ AshrafSayied-Ahmad Küçük bir örnek ekledim, mükemmel değil ama şakasını elde edersiniz. – Warpzit