android-softkeyboard

Softkeyboard not showing in a AlertDialog

那年仲夏 提交于 2020-01-05 01:09:09
问题 So i have a menu item that shows AlertDialog with a EditText in it, the problem is that although it is focused the softkeyboard doesn show until I click on the edittext, anyone got a solution ? I tried InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(yourEditText, InputMethodManager.SHOW_IMPLICIT); but it doesn work. Here is my code @Override public boolean onOptionsItemSelected(MenuItem item) { return (applyMenuChoice(item) ||

Toolbar shifts up, when soft keyboard appears

孤街醉人 提交于 2020-01-04 06:21:56
问题 I want to make my activity layout resize when keyboard appears, but at the same time keep its toolbar position unchanged. So far all the screen shifts up, when I click on the edit text and the keyboard appears. Before keyboard appears: After keyboard appears, the toolbar isn't visible anymore: I would like to keep the keyboard in its place and shift below it the image. I can't just specify in the manifest: android:windowSoftInputMode="adjustNothing" , because the edit text will not be visible

How to Force Android Soft Keyboard Open from Native Code?

时间秒杀一切 提交于 2020-01-03 17:06:45
问题 I have a game that uses a callback to Java from C++ to force open the soft keyboard when the user touches the screen. The Java code is simply this: this._inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); This has worked fine for a while but recently we've been receiving complaints from some Motorola Droid users that the soft keyboard fails to open for them. Since we've only recently started to get these complaints and it's a number of users I'm thinking it was some kind

Android: Displaying WhiteSpace When Closing Soft Keyboard

六眼飞鱼酱① 提交于 2020-01-03 15:33:25
问题 I have a layout which contains a ListView and a EditText below the ListView which is used for searching in list view. The problem is that when i close the soft keyboard after a search, it gives a jerk and shows white space while closing the soft keyboard. I have tried adjustPan, but it moves the whole layout up. 回答1: public static void hideKeyboard(Context context,View v) { InputMethodManager imm = (InputMethodManager)context.getSystemService( Context.INPUT_METHOD_SERVICE); imm

Layout should go up when soft keyboard came in front of view in Android

孤者浪人 提交于 2020-01-03 13:34:04
问题 I have a problem that I have a login Screen in which when we click on Edit Text the SoftInput Keyboard override the two widgets One is TextView and another is Login Button which are in Relative Layout, but I want when we select any Edit Text the whole Relative layout should goes Up and all widgets are visible above the softinput Keyboard of Android default. Please suggest me for the right solution. Thanks in advance. My Layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns

Overwriting windowSoftInputMode preference in Visual Studio Tools for Apache Cordova config.xml file

痞子三分冷 提交于 2020-01-03 02:37:08
问题 I'm facing an issue in which the Android soft keyboard is appearing over the last edittext field on the page. Suggested solutions include changing the windowSoftInputMode, so I added the following preference in the config.xml file: <preference name="android-windowSoftInputMode" value="adjustResize|stateHidden" /> However, after I do my build, the AndroidManifest.cordova.xml file in the release folder always has a windowSoftInputMode of "adjustResize" and thus nothing changes when I run the

Softkeyboard blocking EditText

杀马特。学长 韩版系。学妹 提交于 2020-01-03 00:40:06
问题 I'm having the following problem: I have an activity which enables a user to post comments on some article. When the user taps the EditText field where the comment can be posted, the softkeyboard ends up blocking the text field such that the user can't see what is being typed. How can I make sure that the EditText field is always, at least partly, visible? 回答1: Add the contents of your activity to a scrollable layout and when the EditText view gets focus manually scroll the ScrollView. 回答2:

Having Trouble with Soft Keyboard

你离开我真会死。 提交于 2020-01-02 04:57:08
问题 Hi Everyone iam new to Android and stuck in really silly problem in my project i have one EditText which is defined in Header View of a List View whenever users touches the EditText soft keyboard will be displayed. i have something called clear button which clears the EditText After clearing soft keyboard is not displaying in 2.3 devices.Whenever i press lock/power button lock the device and unlock then soft keyboard is displaying <activity android:name=".pl.Mobile.AddJobNew" android

Dialog goes up when softkeyboard is shown

淺唱寂寞╮ 提交于 2020-01-02 04:11:15
问题 I have a class that extends Dialog . In that Dialog I have an EditText and a ListView . I can bring soft keyboard up when that dialog is shown. But my problem is can we make dialog not to go up when soft keyboard is shown? I tried to change softInputMode in layout params to adjust resize but it's not working. My Dialog uses x and y position, when soft keyboard is shown and dialog goes up, my dialog is not in the position I want. 回答1: Try to do this: dialog.getWindow().setSoftInputMode

Soft keyboard push up hidding action bar or overlay edittext

Deadly 提交于 2020-01-01 19:46:07
问题 I have an issue with a simple layout. If I set android:windowSoftInputMode="stateHidden|adjustResize" this happens: Bug In any case this happens only If I open keyboard from landscape, then rotate (with keyboard open). In normal use (rotating and then opening keyboard) this does not happens! If I set android:windowSoftInputMode="stateHidden|adjustPan" ActionBar is pushed up. Here layout code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk