how to make my viewpager swipe from right to left

前端 未结 13 706
一整个雨季
一整个雨季 2020-12-05 14:42

I have a viewpager and it contains some information but it lets me swipe the pages from left to right how can I make it swipe from left to right which means change its direc

13条回答
  •  北海茫月
    2020-12-05 15:10

    I'm sure it's not relevant for the op, but I found a solution that worked for me (as modifying the data was a problem for my case). I simply rotated the viewpager 180 degrees in the Y axis, and then rotated it's subviews again in 180.

    android.view.View
    
    public void setRotationY(float rotationY)
    

    Hope it helped anyone, as I think this is the most close to how Android mirrors all the os when change to rtl language.

提交回复
热议问题