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

前端 未结 7 929
天命终不由人
天命终不由人 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 17:56

    Since we do want items to pop every time they appear at the top or bottom of our list, the best place to do it is the getView() method of the adapter:

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        animatePostHc(position, v);
    } else {
        animatePreHc(position, v);
    }
    

提交回复
热议问题