Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customization of tab layout swiping direction

I've been trying to set my tabLayout to work with RTL support, but I face a problem. in RTL (right to left), you need to swipe right to show the next page. Currently when you swipe right it show the previous one.

I believe not many of you tried to work with RTL, so I made (ok, I tried atleast) make descriptive image to the issue - enter image description here

how I can fix that swiping right will show the next page and not previous one? Is there any way to change the swipe direction?

like image 618
TheUnreal Avatar asked Oct 30 '22 20:10

TheUnreal


1 Answers

The actual problem you facing is the fact, that ViewPager still does not support RTL.

It's well-known and very old issue - you can find it in Google's issue tracker: ViewPager RTL swipe direction

Recently, Booking.com's engineer uploaded their RtlViewPager. It's almost perfect, except the lack of TabLayout's support. So I forked and fix it.

Feel free to check it out: ksloginov/RtlViewPager

enter image description here

like image 91
Konstantin Loginov Avatar answered Nov 02 '22 23:11

Konstantin Loginov