TheUnreal
TheUnreal

Reputation: 24492

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?

Upvotes: 5

Views: 1469

Answers (1)

Konstantin Loginov
Konstantin Loginov

Reputation: 16010

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

Upvotes: 2

Related Questions