I asked this question before (here) but nobody answered so I ask It a little bit simpler.
The problem is when I change the layout direction to RTL
(in
xml file : android:layoutDirection="rtl"
or programmatically :
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1){
getWindows().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
}
doesn't matter) the navigation icon remain LTR
How can I fix this issue?
To be more specific the arrow should point at right!
In the Activity Class --> Add these lines :
Write a custom drawable using File--> New--> VectorAsset https://developer.android.com/studio/write/vector-asset-studio.html Choose the arrow accordingly and Enable the field -->(Enable the auto mirroring for RTL Layout)
Auto-Mirror Property checked
I have changed the color of Arrow to be White, You can choose your own color
FileName: ic_arrow_back_black_24dp.xml in drawable folder
After changing the Locale to Arabic - which changes the entire Layout from RTL to LTR