android-softkeyboard

Android Use Done button on Keyboard to click button

南笙酒味 提交于 2019-12-17 10:12:47
问题 Ok in my app I have a field for the user to input a number. I have the field set to only accept numbers. When the user clicks on the field it brings up the keyboard. On the keyboard (on ICS) there is a done button. I would like for the done button on the keyboard to trigger the submit button i have in my application. My code is as follows. package com.michaelpeerman.probability; import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import

How to disable spelling corrections programmatically in Android

主宰稳场 提交于 2019-12-17 09:47:34
问题 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? 回答1: 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" 回答2: If setting: android:inputType=

Open soft keyboard programmatically

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 03:34:43
问题 I have an activity with no child widgets for it and the corresponding xml file is, <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myLayout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:focusable="true" > </LinearLayout> and I want to open soft keyboard programmatically while the activity gets start.and what I've tried upto now is, public void

Keyboard hides input fields on Android WebView

只谈情不闲聊 提交于 2019-12-14 00:35:11
问题 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

Android RecyclerView Edittext issue

ぃ、小莉子 提交于 2019-12-14 00:19:30
问题 I'm creating a list of editable items (received from backend). I'm using the "new" recyclerview for this. There a couple of possible viewTypes in my recyclerview: checkbox spinner edittext The problem I'm having is with the EditText gaining focus. AdjustResize kicks in fine and my keyboard is shown. But the EditText that has gained focus isn't visible anymore in the list. (position in the list in the now resized portion is below the visible positions). I don't want to be using AdjustPan in

ADB keycodes fail to search using Android keyboard Search key vs Enter Key

断了今生、忘了曾经 提交于 2019-12-13 13:45:21
问题 Why could a particular text field/search bar fail to trigger search when sending the Search or Enter keycodes? On the Android Keyboard, is the Search key the Enter key with a metastate? Or is it a completely different key? What is the metastate of the Search Key? Or is it its own keycode? Does the Android key code KEYCODE_ENTER press the search key? Or does KEYCODE_SEARCH ? I had the same problem as this fellow and came up with a fix (below): Unable to click the Search(magnifying glass)

How to get keyboard with Next, Previous and Done buttons at the top of keyboard in Android

巧了我就是萌 提交于 2019-12-13 08:22:22
问题 In my application, I want to provide the functionality similar to Next, Previous and Done button at the top of keyboard. It is somewhat similar to this Please let me know how can I achieve this. I do not want to exactly implement the next,previous and done options. But using this three button click, I want to make three separate web service calls and fetch the results. Like, Active,Inactive and All kind of filters. 回答1: The standard Android way would be to provide an input method action with

Android app freezes when app soft keyboard is displayed or hide

痴心易碎 提交于 2019-12-13 03:46:44
问题 I have an activity which has a fragment. Inside that fragment, there are 5 fragmnets inside ViewPager. Each fragment has either more than 30 input fields including EditTexts, custom Dropdowns and Date Pickers or nested ViewPagers with fragments having same amount of input fields. The problem is; when user taps on any EditText to input data, soft keyboard gets visible and when it is completely visible, the app freezes for around 2 seconds. When user presses back button to hide soft keyboard,

keyboard disappears while orientation change to landscape mode

别等时光非礼了梦想. 提交于 2019-12-13 02:46:20
问题 I am enabling orientation change in focusChangeListener of an edittext in my app. It is working fine, but the issue is if the user flips the keyboard to landscape mode keyboard disappears. It will come up only if user tap on edittext again or change orientation to portrait mode. I need to display keyboard in landscape mode without touching the edittext . Please help me. 回答1: Generally, its a bad idea to mess with the default IME behavior because there are devices out there with hardware

Make soft keyboard behave like IOS in Android

僤鯓⒐⒋嵵緔 提交于 2019-12-13 02:40:05
问题 I have a layout which I placed my widgets proportionally with weight attribute. I don't want to use scrollView, I want my widgets to fit onto screen according to their weights. However, I want my layout to be scrollable when soft keyboard pops up. I don't want it to be resized so I can't use android:windowSoftInputMode="adjustResize" I tried android:windowSoftInputMode="adjustPan" and it moves the edittext field above the soft keyboard. However, this time it does not scroll and I have to