How to make an Android view that flips between views on swipe/fling

后端 未结 4 1726
梦如初夏
梦如初夏 2020-11-28 23:01

I\'d like to make a view in my Android app that flips between multiple views on a swipe/fling. I\'d like it to behave more or less like the Android Launcher behaves when fl

4条回答
  •  旧时难觅i
    2020-11-28 23:29

    @CommonsGuy extended ViewFlipper to do it. https://github.com/commonsguy/cwac-viewswiper Ihaven't used this one yet so im not sure if it moves with your finger like the launcher if not your going to have to make an OnTochListener to do it for you in me.ACTION_MOVE you will update the view to change its position. I'll post some sample code when I get home if you don't get another answer.

提交回复
热议问题