android-softkeyboard

How to hide keyboard for samsung galaxy note programmatically in android

Deadly 提交于 2019-12-06 14:48:50
I am using data and time picker for two edit text, I want to hide keyboard for two edit text.I am doing like this mDatePickerEdt = (EditText)findViewById(R.id.createwedding_datepicker_edt); mTimePickerEdt = (EditText)findViewById(R.id.createwedding_timepicker_edt); mDatePickerEdt.setInputType(InputType.TYPE_NULL); mTimePickerEdt.setInputType(InputType.TYPE_NULL); it is working for smart phones.I getting problem in samsung galaxy note.If any one have idea.Please help, Thanks in advance. you can use following code to hide keyboard. getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT

Show Emoji Keyboard On Android?

☆樱花仙子☆ 提交于 2019-12-06 14:41:07
so I am building an Android app. I have used a custom emojicon pack that comes with emojis that look like the iOS ones. However, I've noticed that KitKat comes with native emoji support, so I want show that to users instead of my custom window if they have KitKat. How do I show a certain keyboard window, without changing the imeOptions? I tried mEditText.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PICTSYMBOLS)) , but that didn't seem to do the trick put this properties in your edittext android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"

Soft Keyboard getting NullPointerException when calling canvas.drawtext

 ̄綄美尐妖づ 提交于 2019-12-06 14:17:52
问题 I am working on SoftKeyboard where i need to display text on keys as shown below by red blocks As given in this reference and this reference, I am using below code, protected void onDraw(Canvas canvas) { if (canvas != null) { super.onDraw(canvas); } Paint paint = new Paint(); paint.setTextSize(15); paint.setColor(Color.RED); int x2 = 0; int y2 = 0; int width = 0; List<Key> keys = SoftKeyboard.currentKeyboard.getKeys(); for(Key key: keys) { if(key.codes[0] == 113) x2 = key.x; // value of x2 =

Replicate keyboard like layout upward push in bottom sheet

我们两清 提交于 2019-12-06 14:10:56
Is there any way to manually push up layout (scrollview or recyclerview or whole activity) when bottom sheet opens just like android keyboard does? Or you can say that i want to make a minimal keyboard in form of a bottom sheet(which isn't using any editable view) 100% working formula Use this in onCreateDialog in BottomSheetFragment KeyboardUtil(getActivity(), view); or For fragment use new KeyboardUtil(this, findViewById(R.id.fragment_container)); by using this Util class https://github.com/mikepenz/MaterialDrawer/blob/aa9136fb4f5b3a80460fe5f47213985026d20c88/library/src/main/java/com

Android Soft Keyboard: How to manipulate views on keyboard on/off

主宰稳场 提交于 2019-12-06 14:03:56
问题 I have a layout which has one large EditText view at the top + a bunch of buttons at the bottom. The EditText is made to shrink and expand when the ime is activated/deactivated by using adjust_resize. The buttons at the bottom are pushed up above the ime. I would like to hide these buttons when the ime displays, to provide enough space for the EditText view. I have so far tried the following: subclassed EditText and provided the activity the option to register a callback on the view's

Android custom keyboard with 2 lablels (main and small at the top right)

筅森魡賤 提交于 2019-12-06 10:51:08
问题 I am implementing my own custom keyboard. I use this tutorial for implementing keyboard <?xml version="1.0" encoding="utf-8"?> <Row> <Key android:keyLabel="q" android:keyEdgeFlags="left"/> <Key android:keyLabel="w"/> <Key android:keyLabel="e"/> <Key android:keyLabel="r"/> <Key android:keyLabel="t"/> <Key android:keyLabel="y"/> <Key android:keyLabel="u"/> <Key android:keyLabel="i"/> <Key android:keyLabel="o"/> <Key android:keyLabel="p" android:keyEdgeFlags="right"/> </Row> I want have 2 label

How to automatically show soft keyboard on start?

纵饮孤独 提交于 2019-12-06 09:55:15
问题 I have an activity that only has a EditText. I want the soft keyboard to show up automatically. How can I do this? 回答1: You can use this onResume: InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(((EditText) findViewById(R.id.your_view)),InputMethodManager.SHOW_FORCED); I suggest that you check if there is a Hardware keyboard before you force the keyboard to appear. To hide: ((InputMethodManager) YourActivity.this.getSystemService

Android soft keyboard - disable certain keys

你离开我真会死。 提交于 2019-12-06 08:49:42
I am looking for a way to use the built-in soft keyboard and disable certain key. For example, if the User is not supposed to use the letter 'f' (because in the list, that letter is not present), the key should be grayed out. Imagine that a User can type a text into a textbox for choosing from a list. The list contains: Abc Bcd Bed If the User inputs: -A Then he will only be able to click on 'B' and then only to 'C'. If the User inputs: -B At first he will be able to choose 'C' or 'E' and then according to the selection. Is it possible without the need to create the keyboard from scratch? If

Android - Unexpected Behavior of Keypad - EditText in ListView

无人久伴 提交于 2019-12-06 08:22:42
问题 I am stuck with problem since last two days i.e. i have created ListView with Custom View with Variant SubLayout like: Problems: When i click on EditText of Qty , its displaying Soft Input Keyboard with Numeric Keypad and immediately focus lost from edittext with change of alphabetic keypad. (First ScreenShot Below) on Second time focus of EditText its works fine and taking numeric values but while scrolling its change keypad from numeric to alphabetic. (Second ScreenShot Below) Actually i

Keyboard hides input fields on Android WebView

邮差的信 提交于 2019-12-06 07:06:49
On my Android app I have an Activity with a layout of almost WebView element. In this WebView I am loading online form for the user to fill out. However, bottom input fields (Text boxes) stay behind the soft keyboard and the user is not able to fill them out. What are possible solutions for this situation? Here is my code: AndroidManifest.xml (this layouts part only) <activity android:name=".home.SurveyActivity" android:configChanges="orientation" android:icon="@drawable/logo_white" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize"> </activity> Layout file: