I am very new on android and want to write an application that support rtl languages. for that I wrote
android:supportsRtl="true"
on application part of manifest file and call forceRightToLeft on oncreate method of android. The method have following body:
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
private void forceRTLIfSupported() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
getWindow().getDecorView().setLayoutDirection(
View.LAYOUT_DIRECTION_RTL);
}
}
but I understand on sdk API 16(Android 4.1) and the version before that didn't supported and action bar show left to right. I search but couldn't find any solution. Please don't minus my code just let me to know and then I will delete it if it is not true question.