I am using SlidingTabLayout and I want to copy tabs from right to left, but I cannot find a way.
I'm already trying to use the setGravity () method, but it does not work.
You might need to try mirroring your layouts:
To take advantage of RTL layout mirroring, simply make the following changes to your application:
Announce in your application that your application supports RTL mirroring. In particular, add android: supports Rtl = "true" to the element of your manifest file.
Change all the properties of the "left / right" layout of your application to the new "start / end" equivalents. If you are targeting your application on Android 4.2 (the targetSdkVersion or minSdkVersion application is 17 or higher), you should use "start" and "end" instead of "left" and "right". For example, android: paddingLeft should become android: paddingStart. If you want your application to work with versions earlier than Android 4.2 (the targetSdkVersion or minSdkVersion application is 16 or less), you must add "start" and "end" in addition to "left" and "right". For example, youd use android: paddingLeft and android: paddingStart.
you can use
android.support.design.widget.TabLayout
from the android.support.design library from the latest SDK and apply the Xcihnegan answer above