Example usage for android.view View TEXT_DIRECTION_LOCALE

List of usage examples for android.view View TEXT_DIRECTION_LOCALE

Introduction

In this page you can find the example usage for android.view View TEXT_DIRECTION_LOCALE.

Prototype

int TEXT_DIRECTION_LOCALE

To view the source code for android.view View TEXT_DIRECTION_LOCALE.

Click Source Link

Document

Text direction is coming from the system Locale.

Usage

From source file:com.outsystemscloud.andrevieira.secureDevice.java

@SuppressLint("NewApi")
private void changeTextDirection(Builder dlg) {
    int currentapiVersion = android.os.Build.VERSION.SDK_INT;
    dlg.create();/*from ww w  . jav  a  2s  . co  m*/
    AlertDialog dialog = dlg.show();
    if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
        TextView messageview = (TextView) dialog.findViewById(android.R.id.message);
        messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE);
    }
}