The best way to make layout dynamic RTL by following,
If you use ConstraintLayout
Don't use left and right
instead, use start and end
Android will change layout dynamically when you change locale
You can find my answer here about how to change the language of the app by locale
Update:
In ConstraintLayout
Use Constrains as
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/imageView_about_back"
app:layout_constraintTop_toTopOf="parent"
Also, don't use margin left or right
In case of LinearLayout,
use gravity start and end
sample code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_image"
tools:context=".activity.HomeActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start"
android:text="@string/about_al_ameen"
android:textColor="@color/colorWhite" />
</LinearLayout>