Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android java show hide keyboard:

/**
 * Hides the soft keyboard
 */
public void hideSoftKeyboard() {
    if(getCurrentFocus()!=null) {
        InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
        inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
    }
}

/**
 * Shows the soft keyboard
 */
public void showSoftKeyboard(View view) {
    InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    view.requestFocus();
    inputMethodManager.showSoftInput(view, 0);
}
Comment

PREVIOUS NEXT
Code Example
Java :: selenium drag slider 
Java :: Print Text Using Java 
Java :: arraylist<hashmap<string, string arraylist = new arraylist<() 
Java :: java Detect Cycle in a Directed Graph 
Java :: How to initialize a 3d array in Java? 
Java :: java bogo sort 
Java :: arraylist remove name in java 
Java :: no java virtual machine found after searching the following locations 
Java :: split on . in java 
Java :: how to disable the cors in spring boot 
Java :: put arraylist in hashtable java 
Java :: what is arraylist 
Java :: check if input is empty java 
Java :: java csv compare 
Java :: Read json url in android - NAYCode.com 
Java :: de caracter a string en java 
Java :: java enum to string 
Java :: seek bar 
Java :: measure view height android 
Java :: java exception override message 
Java :: polymorphism in java 
Java :: java check if string appears twice in arraylist 
Java :: how to get config values bukkit 
Java :: java integer object to char 
Java :: java finally block 
Java :: android click button programmatically 
Java :: what is jar file in java 
Java :: java startswith regex 
Java :: map.put in java 
Java :: How to remove an element from a Java List? 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =