android-softkeyboard

How do you disable the SoftKeyboard key preview window?

强颜欢笑 提交于 2019-12-18 02:17:55
问题 When creating your own SoftKeyboard you are given a "key preview" by default. How do you disable this? Edit: You can customise the keyPreview layout by changing the <KeyboardView> attribute android:keyPreviewLayout . This is styled by default to look at keyboard_key_preview.xml: Edit 2: Following my be a red herring: The source code suggests supplying 0 or not applying the tag android:keyPreviewLayout will result in no key preview appearing: ... case com.android.internal.R.styleable

Activity isn't resizing when keyboard is shown

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 21:31:48
问题 I have a simple activity that displays a big multiline EditText and some other controls below it. I want the activity to resize so the buttons are not hidden by the keyboard when the user is typing in the EditText . I have tried all sorts of sketchy and non-sketchy solutions I have found online - nothing works. Here's what I've tried so far: Putting android:windowSoftInputMode="adjustResize" in the manifest. Putting android:fitsSystemWindows="true" in the layout root. Using RelativeLayout vs.

How to set different background of keys for Android Custom Keyboard

好久不见. 提交于 2019-12-17 18:41:49
问题 I am Working on Custom Keyboard Application This is code for background color of input.xml in softkeyboard :- @Override public View onCreateInputView() { Log.e("onStartInputView ","On StartInput View Called--"); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); String Backgroundcolour = preferences.getString("BackgroundColour",""); Log.e("Brithnesss- -","----"+Backgroundcolour); if(Backgroundcolour.equalsIgnoreCase("black")) { this.mInputView = (KeyboardView

Auto Collapse ActionBar SearchView on Soft Keyboard close

可紊 提交于 2019-12-17 17:41:50
问题 I am currently using an ActionBar menu item to display a SearchView in the action bar. When the search menu item is expanded the soft keyboard is displayed which is what I want. Now, when the user presses the back button to close the soft keyboard, I would also like to collapse the SearchView in the action bar. I have tried implementing the following listeners OnKeyListener and OnFocusChangeListener on the MenuItem and the ActionView. I have also tried using OnBackPressed() in the Activity.

Auto Collapse ActionBar SearchView on Soft Keyboard close

匆匆过客 提交于 2019-12-17 17:41:33
问题 I am currently using an ActionBar menu item to display a SearchView in the action bar. When the search menu item is expanded the soft keyboard is displayed which is what I want. Now, when the user presses the back button to close the soft keyboard, I would also like to collapse the SearchView in the action bar. I have tried implementing the following listeners OnKeyListener and OnFocusChangeListener on the MenuItem and the ActionView. I have also tried using OnBackPressed() in the Activity.

Recyclerview not scrolling to end when keyboard opens

天大地大妈咪最大 提交于 2019-12-17 17:36:54
问题 I am using recylerview in my application and whenever new element is added to recyclerview, it scrolls to last element by using recyclerView.scrollToPosition(adapter.getCount()); But, whenever keyboard opens(because of editTextView), it resizes the view and recyclerview gets smaller, but couldn't scroll to last element. android:windowSoftInputMode="adjustResize" I even tried to used the following code to scroll to last element, but it didn't work editTextView.setOnFocusChangeListener(new View

Why does setting imeActionId with a predefined ID resource create an error?

牧云@^-^@ 提交于 2019-12-17 10:51:21
问题 Cyril Mottier has a great post on customizing the send/done/return key on the Android soft keyboard. When trying out the code, I (and several others in the comments) noticed that setting the imeActionId with a new ID in XML (e.g. @+id/...) returns a 0 to the OnEditorActionListener, when the key is hit by the user, not the unique ID. However, if you set an ID in ids.xml and set imeActionId to that (e.g. w/ @id/...) it causes a layout inflation error. The only way I could successfully get the

Android custom numeric keyboard

可紊 提交于 2019-12-17 10:37:26
问题 I want to add numeric keyboard like the one in vault application I don't know how to call it and how can I find in google ? 回答1: Use TableLayout to create the numeric keyboard layout. Bind View.OnClickListener on each custom key view to response user input. In responses, append or delete text to that password field which implements by EditText.You can use append() or setText() to control what will be filled in the password field. I write a custom view for reusing in anywhere, here is the code

How to include suggestions in Android Keyboard

半世苍凉 提交于 2019-12-17 10:32:44
问题 I am working on Android SoftKeyboard. I've created layout for keyboard but dont't know how to include suggestions which appears if we type some word in EditText. For example if i write "Kn" then "Known" and "Known" are shown in Suggestions. So my questions are - 1) How to include suggestions in Android Softkeyboard? 2) Is there any way to include our own list of suggestions? Thanx a lot in advance. I've already checked this and this but not able to find any proper answer. Any help would be

when using AlertDialog.Builder with EditText, the Soft Keyboard doesn't pop

微笑、不失礼 提交于 2019-12-17 10:20:10
问题 I am using AlertDialog.Builder in order to create an input box, with EditText as the input method. Unfortunately, the Soft Keyboard doesn't pop, although the EditText is in focus, unless you explicitly touch it again. Is there a way to force it to pop? I've tried the following, after the (AlertDialog.Builder).show(); but for no avail. InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showSoftInput(input, InputMethodManager.SHOW_FORCED); Anyone