android-softkeyboard

Create Custom Keyboard in Android

天大地大妈咪最大 提交于 2019-11-27 19:47:52
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 keyboard? Gabe Sechan So, I did this for about 2 years, when I worked on Swype. You don't need root, you

SoftKeyboard hiding EditText

回眸只為那壹抹淺笑 提交于 2019-11-27 19:25:26
I have a layout that uses an EditText to let users search a database and populate a ListView. The EditText is about 2/3 of the way from the top of the screen (positioned over an ImageView, and followed by some intro text.) The problem is that the soft keyboard hides the EditText, so the user can't see what he's typing. (I disabled the auto-suggest.) I've tried LinearLayout, RelativeLayout, paddings, and different alignments/centerings, but I still can't get it to work right. The EditText is either hidden, gets pushed off the top of the screen, or get "squished" and distorted. Suggestions???

Android soft keyboard resize layout

拟墨画扇 提交于 2019-11-27 19:22:01
问题 When the virtual keyboard opens, it resizes my layout. How can i made for put the keyboard on my layout? And what it doesn't re-size my layout? 回答1: You can use manifest flags to configure the effect of the virtual keyboard. See http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft 回答2: Android soft keyboard resize layout <activity android:name=".activity.SignUpActivity" android:screenOrientation="portrait" android:theme="@style/AppTheme.NoActionBar" android

How to include suggestions in Android Keyboard

三世轮回 提交于 2019-11-27 18:50:50
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 appreciated. EDIT I want to include suggestions directly above Keyboard as shown in picture below. You

How to close Android Soft KeyBoard programmatically?

拈花ヽ惹草 提交于 2019-11-27 18:41:49
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, InputMethodManager.RESULT_HIDDEN); Can Anyone suggest me what to use for closing the softKeyboard ? Based on

Android: ScrollView not scrolling with keyboard out

家住魔仙堡 提交于 2019-11-27 18:07:36
I've got a layout with some views, from which one is an EditText. The layout easily fits on one page, BUT, when the soft keyboard is out, the layout doesn't scroll. Here's a recap of my layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background" > <ScrollView android:id="@+id/ScrollView1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" > <LinearLayout android

How to hide the soft keyboard from inside a fragment?

送分小仙女□ 提交于 2019-11-27 18:04:19
I have a FragmentActivity using a ViewPager to serve several fragments. Each is a ListFragment with the following layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="8dp"> <ListView android:id="@id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <EditText android:id="@+id/entertext"

Android: EditText in Dialog doesn't pull up soft keyboard

孤街醉人 提交于 2019-11-27 17:46:52
So I've got what seems to be a common problem, which is that the EditText in my dialog box doesn't show up when it gets focus. I've seen several workarounds, such as in this thread , this one and this one (and many more), but I have never seen a satisfactory explanation for why this is happening in the first place. I would much prefer to have android use its own default behavior for EditTexts than to build my own, but it seems like everyone (in those threads) has accepted that the default behavior for EditTexts in Dialogs is to just give a cursor and no keyboard. Why would that be? For the

detecting android softkeyboard show/hide events

拟墨画扇 提交于 2019-11-27 15:03:47
问题 I am trying to detect showKeyboard and hidekeyboard events on phonegap. For that purpose, on deviceready event I placed following code: bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, // deviceready Event Handler // // The scope of 'this' is the event. In order to call the 'receivedEvent' // function, we must explicity call 'app.receivedEvent(...);' onDeviceReady: function() { document.addEventListener("menubutton",app.onMenuKeyPress,false);

How to disable spelling corrections programmatically in Android

删除回忆录丶 提交于 2019-11-27 14:21:26
How can I disable spelling corrections in an EditText 's soft-keyboard programmatically in Android? The user can disable it from settings, but I need to disable it in my application. Is there any way to do this? Set this in your layout's xml for your EditText: android:inputType="textNoSuggestions" Or call setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS) in your Activity' If you need to support API 4 and below, use android:inputType="textFilter" If setting: android:inputType="textNoSuggestions" still doesn't work (and your text field is small), a quick work-around is to use: android