android-softkeyboard

Android: Dialog box show soft keyboard automatically when focus is on an EditText not working

*爱你&永不变心* 提交于 2019-11-27 08:01:16
问题 Android: show soft keyboard automatically when focus is on an EditText I've read this post that automatically shows the virtual keyboard when a dialog box is shown. however, it's not working for me. any ideas why? eventhough the edit text is automatically on focus when the dialogbox appear, the event doesn't trigger. I've also read the onpostresume answer but I don't know how to apply it. any help is appreciated. final Dialog dialog = new Dialog(ThesisI.this); dialog.setContentView(R.layout

Only show number buttons on Soft Keyboard in Android?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 07:58:05
On the soft keyboard in Android you can set the soft keyboard to show the numbers instead of a-z keyboard using android:inputType="numberDecimal" . However, what do I do if I only want to show the top number row 1 2 3 4 5 6 7 8 9 0 and not the following rows starting with @ # $ % ... ? Thanx for listening! You must only add this line on your code: input.setRawInputType(Configuration.KEYBOARD_12KEY); this will show only the numeric keyboard. android:inputType="phone" android:digits="1234567890" is an option The phone number pad is the closest thing I've found (set inputType="phone" on your

enable/disable keyboard sound and vibration programmatically

梦想与她 提交于 2019-11-27 07:41:39
问题 I'm trying to find a way to disable and enable keyboard sound and vibration when tapping keys. I've searched on Stack Overflow and other Android Forums but i didn't found any result. I've tried AudioManager to enable vibrate mode, but i want to activate the vibrate mode and sound on keyboard. audioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); audioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON); Is there any way how to change android

Android adjustpan not working after the first time

徘徊边缘 提交于 2019-11-27 07:24:17
My problem: starting from the second time the software keyboard is shown on the screen, it entirely hides my EditText. Attribute android:windowSoftInputMode="adjustPan" has been specified in the AndroidManifest.xml, but it works only the first time. I have the following layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android

Android: How to push button above soft keyboard

匆匆过客 提交于 2019-11-27 07:12:00
I've got a "save" button which I want to push up together with the soft keyboard. So when the user clicks an EditText in my layout, then the button has to stay above the keyboard. Now the button becomes hidden underneath the keyboard. How do you do this? Thanks in advance! Intathep You need to set your keyboard's input mode to adjustResize . You can do this adding the following line to your activity's attributes in the manifest: android:windowSoftInputMode="adjustResize" Here's an example of the attribute added in the activity: <activity android:name=".activity.MyActivity" android

Is there any way to change android:windowSoftInputMode value from java class?

孤街浪徒 提交于 2019-11-27 06:46:59
I want to act my tabs to have different windowSoftInputMode properties for each tab. How to access this property from java class when all handling of your tab is done from one single activity? Is there any way to access this manifest property from java code? Use the following to change the softInputMode for an Activity. getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); Use the following to change the softInput type for an EditText. mEditText.setImeOptions(EditorInfo.IME_ACTION_DONE); Thanks to @Eliezer for correction aman According to Prasham's comment , I did

Android - Show BottomSheetDialogFragment above Keyboard

半腔热情 提交于 2019-11-27 06:42:48
问题 I'm trying to show a BottomSheetDialogFragment with a few EditText fields for the user to enter information. I want to show it directly above the keyboard, but it keeps covering up the contents. This is what happens when I bring up the BottomSheetDialogFragment , you can see it's selecting Card Number EditText , but covering the other content. Ideally, this is what I'm looking for, you can see both EditTexts , and the padding of the View. I've tried a lot of solutions revolving around

How to stop Soft keyboard showing automatically when focus is changed (OnStart event)

浪尽此生 提交于 2019-11-27 06:34:20
问题 I am developing for a tablet using Android 2.2. I have a form which I am using for new and editable instances. When editable, I want to stop the user from editing certain fields. I manage this in my onStart -event, setting the txt.setFocusableInTouchMode(false) . This forces the focus to the next focusable EditText in my form (which is great), but when running, the soft keyboard automatically appears for the EditText with the focus. Anybody know how to stop this? Here's the code (called in

How disable softkeyboard in WebView

£可爱£侵袭症+ 提交于 2019-11-27 06:11:29
问题 I need disable open softkeyboard in my WebView and in all edittexts in WebView (I do not access to thay because its is in WebView). I try use 'android:windowSoftInputMode="stateAlwaysHidden"' in my Manifest file, but keyboard popup on when I click in editable field. What is right solution for disable softkeyboard in WebView? EDIT: I find solution (thanks @g00dy in this post and @Kachi in post https://stackoverflow.com/a/9108219/1665964) for close keyboard after it open: public class

How to draw view on top of soft keyboard like WhatsApp?

拟墨画扇 提交于 2019-11-27 05:17:18
问题 I want to know how it's possible to add View on top of Keyboard like WhatsApp and Hangout. In chat screen, they insert emoticons view on top of the opened soft keyboard. Does anyone know how to achieve this behavior? 回答1: Well, I have created a sample keyboard for chatting here... Here, I use popup window for showing popup window and height of popup is calculated dynamically by height of keyboard // Initially defining default height of keyboard which is equal to 230 dip final float