1 问题
判断当前是不是阿拉伯布局的方法
2 几种判断方法
@SuppressLint("NewApi")public static boolean isLayoutRtl(View view, Resources res) {if (res == null || view == null) return false;Locale curLocale = res.getConfiguration().locale;//如果当前语言是ar(阿拉伯语言)或者fa 一定是阿拉伯布局if (curLocale != null) {Log.i(TAG, "curLocale is:" + curLocale.toString());//如果是ar语言,一定是阿语布局if ("ar".equals(curLocale.toString().trim()) || "fa".equals(curLocale.toString().trim())) {return true;}}if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {boolean firstResult = false, secondResult = false, thirdResult = false, fourResult = false;