android-softkeyboard

Can Android WebView HTML influence keyboard or keyboard features?

↘锁芯ラ 提交于 2019-12-04 09:22:58
问题 I have a webview with a credit card entry form (with standard <input type="text" /> fields). In different versions of Android I get different keyboards. Kit-Kat seems to not show Prev / Next keys when inside the form. On the web side, do I have any influence over this? If not, what should I recommend to the developer for the Android side? Example without Prev / Next : Same webview, with Prev / Next : 回答1: You can control the keyboard from the WebView, but as other answers suggest it may not

Detect delete button in soft keyboard

試著忘記壹切 提交于 2019-12-04 08:59:13
问题 I have two EditText (each only only accepts one character) and I want to handle both fields like I had only one. I'm using a TextWatcher to set the focus in the second one when the user writes a character in the first one, but I don't know how to do the opposite. If the user press the delete button in the second EditText (being this EditText empty) I want to move the focus to the first EditText and delete the character there. The problem is that TextWatcher doesn't work when the user tries to

android set hidden the keyboard on press enter (in a EditText)

岁酱吖の 提交于 2019-12-04 07:48:36
问题 When my user press Enter on the virtual android "user validate entry!" keyboard my keyboard stay visible! (Why?) Here my Java code... private void initTextField() { entryUser = (EditText) findViewById(R.id.studentEntrySalary); entryUser.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: userValidateEntry(); return

Show soft keyboard for dialog

╄→гoц情女王★ 提交于 2019-12-04 07:45:05
问题 I am displaying a dialog with an edittext view. However, the softkeyboard will open only if the user presses inside the editview. So I tried calling an InputMethodManager with the following code. InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(dialogField,0); The dialogField is the input field. However, when exactly am I supposed to do this? I tried it in the onStart() method of the dialog, but nothing happens. I also tried

Android SoftKeyboard how to create own suggestions

允我心安 提交于 2019-12-04 07:29:44
I am developing a keyboard based on the softkeyboard sample. I would like to know how do I create my own suggestions. I see the setSuggestion method in Candidate View Class but in the parameter of that method, I see a list of string(Suggestions) is passed into the this method. My question is do I have to create my own algorithm for the suggestions in the setSuggestion method or another method from which the string array is passed. 来源: https://stackoverflow.com/questions/26541342/android-softkeyboard-how-to-create-own-suggestions

Android webview keyboard covering up input

Deadly 提交于 2019-12-04 05:01:57
问题 The desired effect for my android application is to have a webview with an input box and content. When the user clicks on the keyboard, the keyboard pushes the input box up, but does not resize the main content and just overlays ontop of it as seen in the diagram below. The problem I'm experiencing is that the keyboard covers the input box and does not push it up. This is currently a cordova android application. In the manifest, I have configued <activity android:configChanges="orientation

How to call power off,reboot dialog from application?

你离开我真会死。 提交于 2019-12-04 04:49:59
问题 I would like to call power off,reboot, etc.. dialog as same as default android dialog when push power button long from my application. I no need to call directly reboot,power off, etc... from my application. Just would like to call that dialog. How to call it ? or How to send power button key on application ? Thanks in advance. 回答1: If you look at the source code, you'll see it's handled internally (PhoneWindowManager.java and GlobalActions.java). There is no interface whatsoever through the

Android RecyclerView Edittext issue

一世执手 提交于 2019-12-04 04:27:50
I'm creating a list of editable items (received from backend). I'm using the "new" recyclerview for this. There a couple of possible viewTypes in my recyclerview: checkbox spinner edittext The problem I'm having is with the EditText gaining focus. AdjustResize kicks in fine and my keyboard is shown. But the EditText that has gained focus isn't visible anymore in the list. (position in the list in the now resized portion is below the visible positions). I don't want to be using AdjustPan in this case because on top there is a pager & stuff I would like to keep fixed there.. This is happening

How to hide android keyboard in search view

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 02:18:35
I've used search view in my application. I wonder how to hide the keyboard when i hit the search button on the search view? I have to use the back button to view the results. Robin Qiu Here is a similar question: How to dismiss keyboard in Android SearchView? @Override public boolean onQueryTextSubmit(String query) { // Do search. searchView.clearFocus(); return true; } Try this code: private void hideKeyboard(){ InputMethodManager inputManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),

Soft keyboard's POPUP layout

送分小仙女□ 提交于 2019-12-03 23:20:44
I'm developing a soft keyboard and doing well, but I don't know how to customize the popup layout for a long keypress. My KeyboardView: <?xml version="1.0" encoding="UTF-8"?> <android.inputmethodservice.KeyboardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:keyPreviewLayout="@layout/preview" android:keyBackground="@drawable/key_selector" android:shadowRadius="0.0" android:keyTextColor="#000000" /> My keyboard layout: <?xml version=