Java Code Examples for android.view.View.setLayoutDirection()

The following are Jave code examples for showing how to use setLayoutDirection() of the android.view.View 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: simple-keyboard   File: CustomInputStyleSettingsFragment.java   Source Code and License Vote up 5 votes
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
        final Bundle savedInstanceState) {
    final View view = super.onCreateView(inflater, container, savedInstanceState);
    // For correct display in RTL locales, we need to set the layout direction of the
    // fragment's top view.
    //ViewCompat.setLayoutDirection(view, ViewCompat.LAYOUT_DIRECTION_LOCALE);
    view.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE);
    return view;
}
 
Example 2
Project: chromium-net-for-android   File: ApiCompatibilityUtils.java   Source Code and License Vote up 5 votes
/**
 * @see android.view.View#setLayoutDirection(int)
 */
public static void setLayoutDirection(View view, int layoutDirection) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        view.setLayoutDirection(layoutDirection);
    } else {
        // Do nothing. RTL layouts aren't supported before JB MR1.
    }
}
 
Example 3
Project: letv   File: ViewCompatJellybeanMr1.java   Source Code and License Vote up 4 votes
public static void setLayoutDirection(View view, int layoutDirection) {
    view.setLayoutDirection(layoutDirection);
}
 
Example 4
Project: boohee_v5.6   File: ViewCompatJellybeanMr1.java   Source Code and License Vote up 4 votes
public static void setLayoutDirection(View view, int layoutDirection) {
    view.setLayoutDirection(layoutDirection);
}