I develop application with many activities that need to work in rtl mode.
In my manifest I add
android:supportsRtl="true".
And in my activity I had this code :
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1){
getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE);
}
It's work almost all the screens.
In 2 activities I work with some layout sizes : layout-large
and layout-large-hdpi
.
When the application is running, these 2 activities show all the layout at ltr.
When I remove this layouts from the large folders, it works fine.
The wierd issue is that it occurs only on devices that work with 5.1 OS, when I run on Galaxy 2(4.0.3) it's work fine.
Does anyone knows what is this bug or run into this problem ?
UPDATE:
I found that if i reduce the targetMinSDk to 16 it's not happen but it's occurs to another problems(like set action bar in left..)
I found the problem.
I run on gradle file against buildToolsVersion '23.0.0'.
When I upgrade to buildToolsVersion '23.0.2' it's works perfectly.
It's seem that it's was bug in buildTools 23.0.0 with RTL.