Setting the direction of movement of the tab layout

I am trying to configure tabLayout to work with RTL support, but I ran into a problem. in RTL (from right to left) you need to scroll right to display the next page. Currently, when you swipe your finger across the screen, it shows the previous one.

I believe that many of you did not try to work with RTL, so I did (well, I tried at least) to make a descriptive image of the question - enter image description here

how can I fix that scrolling right will display the next page , not the previous one? Is there a way to change direction?

+5
source share
1 answer

The actual problem that you are facing is that ViewPager still does not support RTL.

This is a well-known and very old problem - you can find it in the tray: ViewPager RTL scroll direction

Recently, Booking.com manager uploaded their RtlViewPager . This is almost perfect, except for the lack of TabLayout support. So I branched and fixed.

Feel free to check: ksloginov / RtlViewPager

enter image description here

+2
source

All Articles