android-softkeyboard

How to resize AlertDialog on the Keyboard display

谁都会走 提交于 2019-11-26 22:43:22
问题 I have a AlertDialog box with approximately 10 controls (text and TextView ) on it. These controls are in a ScrollView with AlertDialog , plus I got 2 buttons positive and negative. The issue I have is when the soft keyboard pops up the two buttons are hidden behind the keyboard. I was looking for something like redraw function on my inner View or the dialog box. Below is the screen shot of what I am talking about. 回答1: If your dialog was an activity using one of the Dialog themes you could

Android on-screen keyboard auto popping up

一曲冷凌霜 提交于 2019-11-26 22:14:44
问题 One of my apps has an "opening screen" (basically a menu) that has an EditText followed by several Button s. The problem is that several of my users are reporting that when they open the app it's automatically popping up the on-screen keyboard without them even touching the EditText . As far as I can tell, all of these users are using the HTC Hero. Is this a bug in 1.5? Is there anything I can do about it? 回答1: You can use the following line of code in the activity's onCreate method to make

How to hide Android soft keyboard on EditText

谁说胖子不能爱 提交于 2019-11-26 21:58:55
I have an Activity with some EditText fields and some buttons as a convenience for what normally would be used to populate those fields. However when we the user touches one of the EditText fields the Android soft keyboard automatically appears. I want it to remain hidden by default, unless the user long presses the menu button. I have search for a solution to this and found several answers, but so far I can't get them to work. I have tried the following: 1 - In the onCreate method, this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); 2 - Also in the

How to disable emojis programmatically in Android

天涯浪子 提交于 2019-11-26 20:59:29
问题 I want to hide emojis and auto suggestions from keyboard programmatically. Its working in some Android devices but not in all devices. here's my code for hide auto suggestions: txtSingupemail.setInputType(InputType.TYPE_TEXT_VARIATION_FILTER | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS |InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); txtSignuppwd.setInputType(InputType.TYPE_TEXT_VARIATION_FILTER | InputType.TYPE_TEXT_VARIATION_PASSWORD); txtSignuppwd.setTransformationMethod

How to show Android keyboard with symbols mode by default?

拥有回忆 提交于 2019-11-26 20:56:48
问题 I have a EditText component, and, of course, if you click on it, the Android keypad is shown, allowing the user to input text. As far as I know, all Android software keyboards have (at least) a letter mode ( ABC ) and a symbols mode ( ?123 ). Their default view is the letter mode. Now when the keypad is shown when the EditText component is clicked, I want the symbols mode to be shown by default. The user will still be able to switch to the letter mode. Is there a way to achieve that? If yes,

Create Custom Keyboard in Android

狂风中的少年 提交于 2019-11-26 19:52:45
问题 I'd like to write an custom keyboard which should work on all devices that are running Android 4.0 and up. So first I searched the net but didn't found anything about that. So how can I create an app which replaces the stock keyboard of Android? What I'd like to know: Is there a good tutorial out there? Do you guys have sample code? Do I need root to do this? What's the structure behind it? (Is it just a regular Activity with a Service??) Is it possible to read out the Inputbox within the

HTML: Why does Android browser show “Go” instead of “Next” in keyboard?

耗尽温柔 提交于 2019-11-26 19:43:09
I have an HTML login form that contains following elements (in this order): input type=text (user name input) input type=password (password) input type=submit (Login button) Why does the Android browser show "Go" button in soft keyboard instead of "Next" button when the focus is in the text input ? This causes user to fail to login very easily because after entering the user name, the user presses the bottom right button in the keyboard (usually the correct action) and the form will be submitted with an empty password, which obviously is not going to work. [This behavior would make sense in

Android: How to push button above soft keyboard

偶尔善良 提交于 2019-11-26 19:33:37
问题 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! 回答1: 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

How to close Android Soft KeyBoard programmatically?

心不动则不痛 提交于 2019-11-26 19:33:23
问题 I am currently showing softkeyboard using the following code InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput (InputMethodManager.SHOW_FORCED, InputMethodManager.RESULT_HIDDEN); And Here I d'not bind the softkeyboard with Edittext because of that I had used the above code. Now I want to close the SoftKeyboard so i am currently using the below code but it is not working. imm.toggleSoftInput (InputMethodManager.SHOW_FORCED,

Keyboard hides BottomSheetDialogFragment

痞子三分冷 提交于 2019-11-26 19:21:21
问题 There are more fields below the keyboard. This happened when i updated the support library. I know it's Kotlin but it looks almost the same as java. How do I fix this issue? This is what it looks like: My code: class ProjectsEditBottomSheetFragment(val privateID: String, val publicID: String) : BottomSheetDialogFragment() { private val mBottomSheetBehaviorCallback = object : BottomSheetBehavior.BottomSheetCallback() { override fun onStateChanged(bottomSheet: View, newState: Int) { if