TextView getInputType - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView getInputType method.

This code example shows how to use the following methods:getInputType, setInputType
        level8.dataChanged(name);
    } 
 
    public static void disableSuggestions(EditText edit) {
        if (isLevel5) {
            edit.setInputType(edit.getInputType()
                    | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
                    | InputType.TYPE_TEXT_VARIATION_FILTER);
        } 
        else { 
            edit.setInputType(edit.getInputType()
                    | InputType.TYPE_TEXT_VARIATION_FILTER);
        } 
    } 
 
    private static void overridePendingTransition(final Activity activity, int enterAnim, int exitAnim) {
        try { 
            MethodUtils.invokeMethod(activity, "overridePendingTransition", enterAnim, exitAnim);
        } catch (Exception e) {
            Log.e("cannot call overridePendingTransition", e);
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setOnKeyListener, getInputType, setOnEditorActionListener
   * @param runnable 
   * @return edit text 
   */ 
  public static EditText onDone(final EditText editText,
      final BooleanRunnable runnable) {
    if ((editText.getInputType() & TYPE_TEXT_FLAG_MULTI_LINE) == 0)
      editText.setOnKeyListener(new OnKeyListener() {
 
        public boolean onKey(View v, int keyCode, KeyEvent event) {
          if (keyCode != KEYCODE_ENTER)
            return false; 
          if (event == null)
            return false; 
          if (event.getAction() != ACTION_DOWN)
            return false; 
 
          return runnable.run();
        } 
      }); 
 

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getInputType, setInputType
        level8.dataChanged(name);
    } 
 
    public static void disableSuggestions(EditText edit) {
        if (isLevel5) {
            edit.setInputType(edit.getInputType()
                    | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
                    | InputType.TYPE_TEXT_VARIATION_FILTER);
        } 
        else { 
            edit.setInputType(edit.getInputType()
                    | InputType.TYPE_TEXT_VARIATION_FILTER);
        } 
    } 
 
    private static void overridePendingTransition(final Activity activity, int enterAnim, int exitAnim) {
        try { 
            MethodUtils.invokeMethod(activity, "overridePendingTransition", enterAnim, exitAnim);
        } catch (Exception e) {
            Log.e("cannot call overridePendingTransition", e);
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setOnTouchListener, getInputType, setInputType
 
    // --- utility methods 
 
    /** 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(new OnTouchListener() {
            public boolean onTouch(View v, MotionEvent event) {
                editor.setInputType(inputType);
                editor.setOnTouchListener(null);
                return false; 
            } 
        }); 
    } 
 
    /** 
     * @return true if we're connected to the internet 
     */ 
    public static boolean isConnected(Context context) {
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getInputType
	 * @param valueP 
	 */ 
	private void updateValueInPreference(String valueP) {
		// Prevent from showing a password 
		EditText editText = getEditText();
		if (valueP != null && editText != null && (editText.getInputType() & InputType.TYPE_TEXT_VARIATION_PASSWORD) != 0) {
			valueP = "*********************************************************************************************************************".substring(0, valueP.length());
		} 
		// Show the value 
		if (valueView != null) {
			valueView.setText(valueP);
		} 
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see com.bigpupdev.synodroid.common.preference.PreferenceWithValue#getValue() 
	 */ 
	public String getPrintableValue() {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related TextView getInputType Questions & Answers:

getInputType Method Overview
Get the type of the editable content.
See Code Examples for other Android TextView Methods: