android-softkeyboard

How to change keyboard layout by swipe left or right space key in custom keyboard

不打扰是莪最后的温柔 提交于 2019-12-01 12:19:28
问题 I made an android custom keyboard . I want to use swiping on Space key on the keyboard for changing keyboard layout to show next language layout. How can i do that? I used bellow class: public class KeyboardIMS extends InputMethodService implements KeyboardView.OnKeyboardActionListener { ...} 回答1: You can do this by override touchEvent like this : @Override public boolean onTouchEvent(MotionEvent e) { float x = e.getX(); float y = e.getY(); switch (e.getAction()) { case MotionEvent.ACTION

black rectangle on top of soft keyboard when either editexts gain focus

ぃ、小莉子 提交于 2019-12-01 11:07:22
each time i enter the login screen and set focus on either editexts the soft keyboard is shown with a black rectangle on top..i haved tried using android:windowSoftInputMode="adjustPan" in manifest but with no expecting results.. Try using this in your EditText android:inputType="textNoSuggestions|textUri" finally...the issue was soft keyboard suggestions..i just set the android:inputType property of each of the editexts to "textNoSuggestions" and the black rectangle is not there anymore... 来源: https://stackoverflow.com/questions/33054255/black-rectangle-on-top-of-soft-keyboard-when-either

Are all the Unicode characters supported on Android

假装没事ソ 提交于 2019-12-01 06:55:07
My question is simple. Are all Unicode characters available in Android? I actually am using the soft keyboard and I want to add a few arabic letters which I can't find the codes for. uncaught_exceptions Android supports UTF-8 but you will not be able to use arabic, if it's not installed in your OS. There are ways to install new fonts, but some of them needs jailbreaking your phone. See link for installing font in Android: https://web.archive.org/web/20091023103506/http://www.android-devs.com/?p=33 It does not appear so. This open issue on the android code site lists many missing characters.

I can't write into the EditText, it disappears when i try to write something, its because the getView() is called when i modify the data

霸气de小男生 提交于 2019-12-01 06:06:06
EDIT: I found the reason which is that the getView() is called when i try to edit something, so the data from the DataAdapter is loaded & my edited changes disappears. EDIT: i observed one thing, if there are few rows in the listview then its OK, but if there are many rows which the listview can not show in the visible screen (Scroll bar appears to scroll to other records), then the issue arises!! I am working on project where we have implemented an INLINE EDITING using ListView , i.e. the data can be edited inside the listview. I have a defined an xml for each item/row of that ListView. I am

How to hide keyboard when user clicks on textbox in webview android

我的梦境 提交于 2019-12-01 05:58:01
Can we hide android system keyboard when user focuses or clicks on html input elements inside the webview. I have tried hiding keyboard on user touches webview: webView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch (View v, MotionEvent event){ Toast.makeText(cx,"Web View Touch",Toast.LENGTH_LONG).show(); v.onTouchEvent(event); InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.hideSoftInputFromWindow(v.getWindowToken(), 0); } return true; } }) But that doesn't work. Is there

Android Soft keyboard float only specific layout

佐手、 提交于 2019-12-01 05:15:58
I have a layout, code below <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> <!--some stuff here--> <LinearLayout android:id="@+id/layout1" android:layout_alignParentBottom="true" android:layout_above="@+id/layout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="5" /> <ImageButton android

How come the Android soft keyboard is not responding to EditText?

可紊 提交于 2019-12-01 04:45:13
I have a SherlockFragmentActivity and a SherlockFragment that is within a TabManager. In this Fragment I have RadioButtons, CheckBoxes, a Button and an EditText in a LinearLayout. The keyboard sometimes does not respond when pressing on the EditText. In a 2.1 AVD the keyboard responds inconsistently, in a 4.0 AVD the keyboard does not respond at all, and on a device the keyboard responds inconsistently. Sometimes pressing the other objects then activates the ability to show the keyboard. Here is the XML for the EditText: <EditText android:id="@+id/EditText1" android:layout_width="100dp"

Android Soft keyboard float only specific layout

夙愿已清 提交于 2019-12-01 02:16:47
问题 I have a layout, code below <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> <!--some stuff here--> <LinearLayout android:id="@+id/layout1" android:layout_alignParentBottom="true" android:layout_above="@+id/layout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android

How to change background color or theme of keys dynamically in Custom Keyboard Android

牧云@^-^@ 提交于 2019-11-30 23:16:20
I am working on Custom keyboard app I need to set or change background theme or color of keyboard .their setting.xml view in my app where user can select different background theme and different color for key rows. during first time launch of application it is working fine but next time when custom keyboard is displaying theme is not changed. I am using this code: public class SoftKeyboard extends InputMethodService implements KeyboardView.OnKeyboardActionListener { static final boolean DEBUG = false; /** * This boolean indicates the optional example code for performing * processing of hard

detect keyboard search button

*爱你&永不变心* 提交于 2019-11-30 22:31:56
问题 I change android soft keyboard to show search icon rather than Enter icon. My question is: how i can detect that user click on that search button? 回答1: In the edittext you might have used your input method options to search. <EditText android:imeOptions="actionSearch" android:inputType="text"/> Now use the Editor listener on the EditText to handle the search event as shown below: editText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction