Posts

Showing posts with the label Soft Keyboard

Android Hide Keyboard Not Working - Cannot Hide Soft Keyboard

Answer : Changing HIDE_IMPLICIT_ONLY to 0 did it (after I changed to hideSoftInputFromWindow() from of hideSoftInputFromInputMethod() ). However I'm not sure why HIDE_IMPLICIT_ONLY isn't working since I am not explicitly opening the keyboard with a long press on Menu. Another option to prevent it from activity in AndroidManifest.xml file android:windowSoftInputMode="stateAlwaysHidden" - This method will prevent loading/showing keyboard when the activity is loaded. But when you click the editable component like edittext the keyboard will open. perfect for my requirement. <activity android:name=".Name" android:label="@string/app_name" android:windowSoftInputMode="stateAlwaysHidden"> 1.first bind your edit text token with keyboard and open i.e inputMethodManager.showSoftInput(_edittext, 0); //here _edittext is instance of view 2.keyboard will get hidden automatically if the edit...