Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 126.96.36.199 release ready!
Owner and Founder. Opencart
There is an issue in view pager while using the RTL.
According to the right-to-left UI paradigm (RTL) a swipe from left to right should scroll page N to page N+1. Currently ViewPager keeps the common LTR swiping direction (a swipe from right to left scrolls page N to page N+1) even if the current locale is an RTL one (Arabic, Hebrew).
So in this blog, we have shown you how to make your Viewpager swipe direction from right to left when your current local is RTL.
So It is the very simple technique to change the swipe direction of the Viewpager.
You’ll need to make the following changes in all your Layouts
I would recommend you check your app once after applying this change as you might not want all your Layouts/Views to be RTL. If you want to force any layout to LTR then just add android:layoutDirection=”locale” to that view.
<android.support.v4.view.ViewPager android:id="@+id/view_pager" android:layout_width="match_parent" android:layout_height="match_parent" android:animateLayoutChanges="true" android:background="@color/background_color" android:layoutDirection="locale"/>
So It will work perfectly in ViewPager. No need to rotate the directions.
There are two simple step which has to follow you,
Step 1. Change the rotation of the View pager,
Step 2. Then again change the direction of the fragment container which is the child of Viewpager,
Note: In my case, I have used Recyclerview as the child of the view pager.
Some Talks by https://code.google.com/p/android/issues
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.