Java Code Examples for android.text.TextUtils.getLayoutDirectionFromLocale()

The following are Jave code examples for showing how to use getLayoutDirectionFromLocale() of the android.text.TextUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: android-dialer   File:   Source Code and License Vote up 5 votes
public DialpadView(Context context, AttributeSet attrs, int defStyle) {
  super(context, attrs, defStyle);

  mTranslateDistance =

  mIsLandscape =
      getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
      TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL;
Example 2
Project: boohee_v5.6   File:   Source Code and License Vote up 4 votes
public static int getLayoutDirectionFromLocale(@Nullable Locale locale) {
    return TextUtils.getLayoutDirectionFromLocale(locale);
Example 3
Project: KomaMusic   File:   Source Code and License Vote up 2 votes
 * 阅读习惯是否是从右到左
 * @return true:从右到左 false:从左到右
public static boolean isRTL() {
    final Locale locale = Locale.getDefault();
    return TextUtils.getLayoutDirectionFromLocale(locale) == View.LAYOUT_DIRECTION_RTL;