ListView item scroll animation (“UIKit Dynamics” -like)

前端 未结 7 930
天命终不由人
天命终不由人 2020-12-22 17:26

I am attempting to animate the ListView items when a scroll takes place. More specifically, I am trying to emulate the scroll animations from the iMessage app o

7条回答
  •  盖世英雄少女心
    2020-12-22 18:03

    Try this by putting this in your getView() method Just before returning your convertView:

    Animation animationY = new TranslateAnimation(0, 0, holder.llParent.getHeight()/4, 0);
    animationY.setDuration(1000);
    Yourconvertview.startAnimation(animationY);  
    animationY = null; 
    

    Where llParent = RootLayout which consists your Custom Row Item.

提交回复
热议问题