android-softkeyboard

Enter key listener for Google keyboard is not working

扶醉桌前 提交于 2020-01-24 13:22:05
问题 I want to add a functionality on click of "enter" key of Google's keyboard without vanquishing the default newline characteristic. I have used OnKeyListener but it is not working. EditText edittext = (EditText) findViewById(R.id.user_query); edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode ==KeyEvent.KEYCODE_ENTER || keyCode == KeyEvent.KEYCODE_DPAD_CENTER)) { //here i want

Android Space Bar Is Not Working

安稳与你 提交于 2020-01-24 04:26:27
问题 In my Android project I have restricted Edittext to allow only Alphanumeric characters. I have using below code snippet to achieve this <EditText android:id="@+id/edt_text" android:layout_width="140dp" android:layout_height="wrap_content" android:layout_margin="5dp" android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" android:ems="10" android:imeOptions="actionNext" android:maxLength="8" android:padding="5dp" android:singleLine="true" /> But while using this code if

Android: Detect softkeyboard RTL Vs LTR (language direction)

こ雲淡風輕ζ 提交于 2020-01-23 03:00:18
问题 Following this it seems that the way to detect language direction is to use some Java libs on the already typed text . I have an AutoCompleteTextView so I want when the soft keyboard pops-up to know the selected language (before the user typing text). So when the user switches on the keyboard language I can know if the selected language is RTL or LTR (and therefore change layout accordingly). For example most of the users with native RTL language have keyboard with their language and English.

How to have an EditText stuck to the soft keyboard in Android

江枫思渺然 提交于 2020-01-14 13:59:22
问题 I'm trying to make something like the image below, where the keyboard automatically opens when the activity starts and the EditText and the send button stick to the keyboard. 回答1: Use the below code to pop up the soft keyboard automatically when an activity launches InputMethodManager imm = (InputMethodManager)getSystemService( Context.INPUT_METHOD_SERVICE); imm.showSoftInput(youredittext, 0); Make sure that you have not define android:windowSoftInputMode="stateHidden" in your manifest.xml.

Input Text Field hidden below keyboard in Android webview

此生再无相见时 提交于 2020-01-14 12:41:26
问题 I implement Webview in my app in Fragment but in Webview EditText Field Hide when the keyboard appears. I Set WindowSoftInputMode = SoftInput.StateHidden | SoftInput.AdjustResize and android:fitsSystemWindows="true" but not working for me. I also use custom RelativeLayout but it's not working. Please help me to solve this issue. My Code is below in Fragment <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout

Input Text Field hidden below keyboard in Android webview

我与影子孤独终老i 提交于 2020-01-14 12:41:22
问题 I implement Webview in my app in Fragment but in Webview EditText Field Hide when the keyboard appears. I Set WindowSoftInputMode = SoftInput.StateHidden | SoftInput.AdjustResize and android:fitsSystemWindows="true" but not working for me. I also use custom RelativeLayout but it's not working. Please help me to solve this issue. My Code is below in Fragment <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout

keyboard hide input (position:fixed; bottom:0;) with phonegap on android

自古美人都是妖i 提交于 2020-01-13 14:00:50
问题 Tried a lot of things <preference name="fullscreen" value="false" /> <preference name="android-windowSoftInputMode" value="adjustResize" /> This seems to be the prefered methods however my keyboard still show on top of my input. Should adjustResize force the app window to resize? do I need something else? How can I stop it from hiding my element in position fixed bottom? Thanks 回答1: Try something like this: Add these piece of code in $(document).ready(function() {}); function in your html

Is there any way to permanently hide soft keyboard but keep enabling focus for an EditText?

风格不统一 提交于 2020-01-13 03:44:28
问题 In my android app, I have 3 EditTexts in my one activity. I created my own number pad in the activity. Whenever i tap any EditText, soft keyboard comes up. I want to block that permanently for this activity but if user tap an EditText then it should be in focus. Like a cursor blinking. Any idea how can i do that? Thanks in advance. 回答1: Hiding Keyboard Manually Here InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); YourEditText

How to add preference of Custom Input method to Android Settings app?

笑着哭i 提交于 2020-01-09 11:24:10
问题 Recently I've started to develop Android Soft Keyboard and got some problem with preferences. How to add a preferences to Android setting app? I've searched almost all the source code of AnySoftKeyboard, but haven't found anything what would add them to Settings app. I'm placing a link to show what I meant: http://code.google.com/p/softkeyboard/wiki/Settings (first picture from begin) Thank you P.S. Sorry for my bad english.. 回答1: I've found it myself: in XML of input method you need to put

How to add preference of Custom Input method to Android Settings app?

瘦欲@ 提交于 2020-01-09 11:24:08
问题 Recently I've started to develop Android Soft Keyboard and got some problem with preferences. How to add a preferences to Android setting app? I've searched almost all the source code of AnySoftKeyboard, but haven't found anything what would add them to Settings app. I'm placing a link to show what I meant: http://code.google.com/p/softkeyboard/wiki/Settings (first picture from begin) Thank you P.S. Sorry for my bad english.. 回答1: I've found it myself: in XML of input method you need to put