android-softkeyboard

Programmatically hide/disable emoticons on Android soft keyboard

▼魔方 西西 提交于 2019-11-26 16:06:02
问题 Is it possible to hide a specific keyboard button? I have an EditText and on some devices its keyboard has smiley faces while on other devices it is missing. I want to hide it on all devices. Below is the XML for my EditText : android:id="@+id/text_editor" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignWithParentIfMissing="true" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/send_side" android:hint="Enter your text" android

Push Listview when keyboard appears without adjustPan

北慕城南 提交于 2019-11-26 15:49:56
问题 I am trying to create an activity with a listview and a send message at bottom. The problem is that when the keyboard is shown, instead of pushing the bottom content, is just hiding it. I tried using adjustPan, but it pushes the hole view up (so there is no way to see the top elements of the listview and also de actionbar disappears). If you take a look at WhatsApp or Line, the functionality is that when the last item of the list is shown at the bottom of the screen, the keyboard pushes up

How to adjust layout when soft keyboard appears

你离开我真会死。 提交于 2019-11-26 15:37:57
I would like to adjust/re-size the layout when the soft-keyboard activated, as below: Before and After: Found couple resources in SO: How to keep all fields and texts visible while the soft keyboard is shown android soft keyboard spoils layout when appears Adjust layout when soft keyboard is on But the questions & answers are rather ambiguous, here's the question with clearer picture of what I want. Requirements: It should work on phone with any screen sizes. Noticed that the margin/padding space at "FACEBOOK" and "Sign Up for Facebook" has changed before and after. No scroll view is involved.

Android: ScrollView not scrolling with keyboard out

孤街浪徒 提交于 2019-11-26 15:34:30
问题 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

How to hide the soft keyboard from inside a fragment?

倾然丶 夕夏残阳落幕 提交于 2019-11-26 15:27:33
问题 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

Get the height of virtual keyboard in Android

房东的猫 提交于 2019-11-26 14:17:39
问题 How can I get the height of virtual keyboard in Android? Is it possible? I try to get it from the main window, but it gives me full height of the application. But I want to get the keyboard height. 回答1: You can't get the keyboard height, but you can get the height of your View, which is what you really want - and you'll get this data supplied to the onLayout call into the current view. 回答2: you can use this sample code. it is dirty solution but it works Thread t = new Thread(){ public void

Android adjustpan not working after the first time

我只是一个虾纸丫 提交于 2019-11-26 13:09:14
问题 My problem: starting from the second time the software keyboard is shown on the screen, it entirely hides my EditText. Attribute android:windowSoftInputMode=\"adjustPan\" has been specified in the AndroidManifest.xml, but it works only the first time. I have the following layout: <?xml version=\"1.0\" encoding=\"utf-8\"?> <LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\" xmlns:tools=\"http://schemas.android.com/tools\" android:layout_width=\"match_parent\" android

EditText in Listview loses focus when pressed on Android 4.x

牧云@^-^@ 提交于 2019-11-26 12:25:22
问题 I know there are a lot of similar questions out here but I couldn\'t get any of the provided solutions working in a simple sample app. The problem occurs when the softkeyboard is shown for the first time. As soon as it is shown, only by pressing the editText again makes it editable. Tried the following: android:windowSoftInputMode=\"adjustPan|adjustResize\" This is not solving any issues. It seems that this line is mandatory to have the activity resized after the softkeyboard is popping up.

adjustPan not preventing keyboard from covering EditText

被刻印的时光 ゝ 提交于 2019-11-26 12:23:26
I'm trying to create a pretty basic chat screen with a ListView displaying the text and an EditText at the bottom and a "Send" button to the right of the EditText. Everything is functional, but when I click the EditText, the virtual keyboard covers it. The screen pans up a little but not enough to become visible above the keyboard. I've got the "adjustPan" tag in my manifest and have also tried the "adjustResize" tag to no avail. I'm guessing it has something to do with the way my layout is set up, but I honestly have no clue. Please help! Current Layout... <LinearLayout xmlns:android="http:/

Android: how to make keyboard enter button say “Search” and handle its click?

前提是你 提交于 2019-11-26 12:18:10
问题 I can\'t figure this out. Some apps have a EditText (textbox) which, when you touch it and it brings up the on-screen keyboard, the keyboard has a \"Search\" button instead of an enter key. I want to implement this. How can I implement that Search button and detect press of the Search button? Edit : found how to implement the Search button; in XML, android:imeOptions=\"actionSearch\" or in Java, EditTextSample.setImeOptions(EditorInfo.IME_ACTION_SEARCH); . But how do I handle the user