Example usage for android.widget TextView getInputType

List of usage examples for android.widget TextView getInputType

Introduction

In this page you can find the example usage for android.widget TextView getInputType.

Prototype

public int getInputType() 

Source Link

Document

Get the type of the editable content.

Usage

From source file:Main.java

/** Suppress virtual keyboard until user's first tap */
public static void suppressVirtualKeyboard(final TextView editor) {
    final int inputType = editor.getInputType();
    editor.setInputType(InputType.TYPE_NULL);
    editor.setOnTouchListener((v, event) -> {
        editor.setInputType(inputType);//from  www .j av  a2 s.  c  om
        editor.setOnTouchListener(null);
        return false;
    });
}

From source file:Main.java

public static List<String> elementEntryTypes(View view) {
    if (view instanceof TextView) {
        TextView textView = (TextView) view;
        return mapTextViewInputTypes(textView.getInputType());
    }/*ww  w.  j  a  va  2s.  co  m*/
    return null;

}

From source file:com.jefftharris.passwdsafe.lib.view.GuiUtils.java

public static boolean isPasswordVisible(TextView tv) {
    return tv.getInputType() == INPUT_TEXT_PASSWORD_VISIBLE;
}