android-softkeyboard

I'm developing a keyboard for android. How to change the text color of the keys?

余生长醉 提交于 2019-12-11 13:34:46
问题 How to change the text color of the keys? Here is my keyboard layout. <?xml version="1.0" encoding="UTF-8"?> <android.inputmethodservice.KeyboardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyboard" android:keyBackground="@drawable/key_background" android:background="@color/keyboard_background" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:keyPreviewLayout="@layout/preview" /> key

How to add switch language functionality in the Android soft keyboard?

☆樱花仙子☆ 提交于 2019-12-11 12:46:56
问题 The Android Soft Keyboard application currently has English language, and I am modifying it to add another language into it. I am almost done with layout of new language and adding alphabets manually as the language is not included in the Android yet. The new language also has keys which appears with SHIFT key. I am struggling to fix the switching functionality between two languages: English and new added. I can fix this by hard coding: to change the layout (xml) with button and then do again

Always show the keyboard input on screen

谁都会走 提交于 2019-12-11 12:32:36
问题 Is there a way to force keyboards to show their whole onscreen input (and, by the way, how is this correctly called?). I'm talking about the one that appears when you don't have enough space (or at least when the device decides it), like the white input on this picture: I'd like it to be even on portrait screens of an app. I've been searching for this, but it turns difficult to search something you don't know how it's called. Edit: I forgot to tell, this should work in a Cordova app. 回答1: Use

Contextual ActionBar hides when I click on hardware backbutton and the keyboard is out

久未见 提交于 2019-12-11 11:16:48
问题 I am using the Contextual ActionBar for editing and when I have the keyboard shown and I want to hide it by pressing the hardware back button, it hides the keyboard but it also cancels the contextual actionbar and I really can´t find a way how to keep it on. Anyone? 回答1: You should try to override the Back Key hardware, and handle the expected behaviour with a boolean as follows: // boolean isVisible to retrieve the state of the SoftKeyboard private boolean isVisible = false; // isVisible

Custom Keyboard not working on Android P Beta

心不动则不痛 提交于 2019-12-11 08:26:15
问题 When I try to use Custom Keyboard got an exception on Android P Beta, everything is working fine until Android Oreo but recently got a crash. Just try to figure out which class might be responsible for the exception. Currently unable to access complete custom keyboard code so not posting the code. java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed at android.graphics.Canvas.checkValidClipOp(Canvas.java:779) at android.graphics.Canvas.clipRect

Disable SoftKeyboard in MultiLine EditText android

邮差的信 提交于 2019-12-11 07:44:14
问题 I am trying to paste clipboard content in a disabled EditText with no softkeyboard popup, with following code clipboardBox.setInputType(InputType.TYPE_NULL); android EditText does not respect line feeds, i.e. doesnt show multiline content and puts it in single line. I want to disable softkeyboard from popping up in a multiline content holder disabled EditText 来源: https://stackoverflow.com/questions/4225027/disable-softkeyboard-in-multiline-edittext-android

Keyboard does not Pan on Android application using PhoneGap

不羁的心 提交于 2019-12-11 07:18:38
问题 I am developing an application using PhoneGap and I cannot get the Soft Input keyboard to work right. As of now I have tried using android:windowSoftInputMode="adjustPan" (resize as well). I have also tried writing getWindow().setFlags(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN, WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST); on my main.java. I have found a similar problem on google groups https://groups.google.com/forum/?fromgroups=#!topic/phonegap/YFmIeUJBnvQ , and the issue was

How can I list several Unicode codes for an Android soft keyboard?

丶灬走出姿态 提交于 2019-12-11 07:07:11
问题 So far my keys look like this: <Key android:codes="97,228,230,229,64" android:keyLabel="a" android:popupKeyboard="@xml/keyboard_popup_template" android:popupCharacters="aäæå@"/> I have also found out that this syntax works: <Key android:codes="0x0061" android:keyLabel="a" android:popupKeyboard="@xml/keyboard_popup_template" android:popupCharacters="aäæå@"/> But I want to write my codes in Unicode Hex values (because I have them already documented, our project never uses Dec values so far) and

How to stop soft keyboard resizing Chrome browser window on Android mobiles?

自古美人都是妖i 提交于 2019-12-11 07:05:09
问题 I see this question asked here, here, here and here, but could not find a clear and/or workable answer. I'm using Android 9 on a Samsung A7 (2018), running Chrome 75. What happens. I have a html form requiring keyboard input. When opened in Chrome and input is attempted, the keyboard forces the form to resize. The resizing reduces the form to about 50% of the screen height and also resizes the form width and the width/height of input fields. Any text typed is not visible until the keyboard is

Bottom sheet (NOT DIALOG FRAGMENT) open with keyboard

只愿长相守 提交于 2019-12-11 06:14:57
问题 My bottom sheet opened with keyboard if i open keyboard first time. This is not problem of code. I tried to change windowSoftInputMode for my activity. But this does't help me Some screenshots: fist open open keyboard hide keyboard 来源: https://stackoverflow.com/questions/56199388/bottom-sheet-not-dialog-fragment-open-with-keyboard