Sliding tab layout for right to left languages
I'm using SlidingTabLayout and i want to slide tabs from right to left, but i can't find a way.
I already try 'setGravity()' method but it doesn't work.
Maybe you need try layout mirroring:
To take advantage of RTL layout mirroring, simply make the following changes to your app:
Declare in your app manifest that your app supports RTL mirroring. Specifically, add android:supportsRtl="true" to the element in your manifest file.
Change all of your app's "left/right" layout properties to new "start/end" equivalents. If you are targeting your app to Android 4.2 (the app's targetSdkVersion or minSdkVersion is 17 or higher), then you should use “start” and “end” instead of “left” and “right”. For example, android:paddingLeft should become android:paddingStart. If you want your app to work with versions earlier than Android 4.2 (the app's targetSdkVersion or minSdkVersion is 16 or less), then you should add “start” and end” in addition to “left” and “right”. For example, you'd use both android:paddingLeft and android:paddingStart.
you can use
android.support.design.widget.TabLayout
from library android.support.design from newest SDK and apply Xcihnegan answer above
链接地址: http://www.djcxy.com/p/24484.html上一篇: 如何忽略引导按钮组中的隐藏元素?
下一篇: 从右向左语言滑动标签布局