Disable soft keyboard on NumberPicker

I’m trying to deactivate the soft keyboard when using a NumberPicker to enter numerical values (for aesthetic reasons). This is my layout-xml-code: <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical” > <LinearLayout android:id=”@+id/linearLayout2″ android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”center_horizontal” android:layout_marginBottom=”30dp” android:layout_marginTop=”30dp” > <NumberPicker android:id=”@+id/repetitionPicker” android:layout_width=”40dp” android:layout_height=”wrap_content” /> <TextView android:id=”@+id/textView1″ android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”center_vertical” android:text=”@string/repetitions_short_divider” android:textAppearance=”?android:attr/textAppearanceMedium” /> <NumberPicker android:id=”@+id/weightPicker” android:layout_width=”40dp” … Read more

Android How to adjust layout in Full Screen Mode when softkeyboard is visible

I have researched a lot to adjust the layout when softkeyboard is active and I have successfully implemented it but the problem comes when I use android:theme=”@android:style/Theme.NoTitleBar.Fullscreen” this in my activity tag in manifest file. For this I have used android:windowSoftInputMode=”adjustPan|adjustResize|stateHidden” with different options but no luck. After that I implemented FullScreen programmatically and tried … Read more

How to adjust layout when soft keyboard appears

I would like to adjust/re-size the layout when the soft-keyboard activated, as below: Before and After: Found couple resources in SO: How to keep all fields and texts visible while the soft keyboard is shown android soft keyboard spoils layout when appears Adjust layout when soft keyboard is on But the questions & answers are … Read more

Disabling the fullscreen editing view for soft keyboard input in landscape?

On Android devices that use soft keyboards, I want to prevent the fullscreen keyboard editing view (shown below) from appearing when in landscape mode (i.e. I want to see only the soft keyboard itself and my view behind it). I assume this can be achieved using the setExtractViewShown(false) method on InputMethodService, but I am unable … Read more

How do I detect if software keyboard is visible on Android Device or not?

Is there a way in Android to detect if the software (a.k.a. “soft”) keyboard is visible on screen? 34 Answers 34 This works for me. Maybe this is always the best way for all versions. It would be effective to make a property of keyboard visibility and observe this changes delayed because the onGlobalLayout method … Read more

How to hide soft keyboard on android after clicking outside EditText?

Ok everyone knows that to hide a keyboard you need to implement: InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); But the big deal here is how to hide the keyboard when the user touches or selects any other place that is not an EditText or the softKeyboard? I tried to use the onTouchEvent() on my … Read more

Android: how to make keyboard enter button say “Search” and handle its click?

I can’t figure this out. Some apps have a EditText (textbox) which, when you touch it and it brings up the on-screen keyboard, the keyboard has a “Search” button instead of an enter key. I want to implement this. How can I implement that Search button and detect press of the Search button? Edit: found … Read more

How to show soft-keyboard when edittext is focused

I want to automatically show the soft-keyboard when an EditText is focused (if the device does not have a physical keyboard) and I have two problems: When my Activity is displayed, my EditText is focused but the keyboard is not displayed, I need to click again on it to show the keyboard (it should be … Read more