android-keypad

Android Keyboard hides EditText

那年仲夏 提交于 2019-11-27 01:00:51
问题 When I try to write something in an EditText which is at the bottom of the screen, the soft keyboard hides the EditText. How can I resolve this issue? Below is my xml code. I'm using this in a Fragment. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > <LinearLayout android:id="@

android:windowSoftInputMode=“adjustResize” doesn't make any difference?

孤街醉人 提交于 2019-11-26 21:54:36
I have a faux dialog which uses this layout: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/containerPageConatiner"> <FrameLayout android:id="@+id/dialogHolder" android:layout_height="wrap_content" android:layout_width="wrap_content" android:padding="15dp" android:layout_gravity="center" android:background="@drawable/panel_picture_frame_bg_focus_blue"/> </FrameLayout> I place a fragment inside the <FrameLayout> depending on the dialog which

How to show Android keyboard with symbols mode by default?

拥有回忆 提交于 2019-11-26 20:56:48
问题 I have a EditText component, and, of course, if you click on it, the Android keypad is shown, allowing the user to input text. As far as I know, all Android software keyboards have (at least) a letter mode ( ABC ) and a symbols mode ( ?123 ). Their default view is the letter mode. Now when the keypad is shown when the EditText component is clicked, I want the symbols mode to be shown by default. The user will still be able to switch to the letter mode. Is there a way to achieve that? If yes,

is there a default back key(on device) listener in android?

為{幸葍}努か 提交于 2019-11-26 16:15:49
问题 I am having two activities A and B. when i click the button in A that will shows B. when i click the Button in B it backs to A. i had set the overridePendingTransition method after the finish() method. it works properly. but in case the current Activity is B. on that time i click the default back button in the device. it shows the right to left transition to show the Activity A. How i can listen that Default back key on device? EDIT: Log.v(TAG, "back pressed"); finish();

EditText with number keypad by default, but allowing alphabetic characters

淺唱寂寞╮ 提交于 2019-11-26 12:19:47
I have an EditText box and I want the default keyboard that comes up when it is selected to be the numeric keypad, since most of the time users will be entering numbers. However, I do want to allow users to enter alphabetic characters too, if they need to. Using android:inputType="number" restricts input to numeric digits only. What options do I have? Define your EditText in your xml this way: <EditText android:id="@+id/txtOppCodigoCliente" android:inputType="textVisiblePassword" android:layout_width="match_parent" android:layout_height="match_parent" android:maxLength="11" android:hint="

Page scroll when soft keyboard popped up

流过昼夜 提交于 2019-11-26 10:30:24
问题 I have a <ScrollView> layout: <?xml version=\"1.0\" encoding=\"utf-8\"?> <ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\" android:id=\"@+id/my_scrollview\" android:layout_width=\"fill_parent\" android:layout_height=\"wrap_content\" > <LinearLayout android:layout_width=\"fill_parent\" android:layout_height=\"wrap_content\" android:orientation=\"vertical\" > <EditText android:id=\"@+id/input_one\" android:layout_width=\"300dp\" android:layout_height=\"wrap_content\"

How do I default to numeric keyboard on EditText without forcing numeric input? [duplicate]

回眸只為那壹抹淺笑 提交于 2019-11-26 07:38:02
问题 This question already has an answer here: EditText with number keypad by default, but allowing alphabetic characters 19 answers This has been asked elsewhere online to no avail. Is there any way in Android to display the numeric soft keyboard when focusing on an EditText , but still allow any text to be entered? I\'d like to let the user enter quantities (e.g. \"1 kg\", \"2 L\"), so just setting inputType=\"number\" won\'t work. 回答1: Add the following line of code, and it will do the trick :)

EditText with number keypad by default, but allowing alphabetic characters

痞子三分冷 提交于 2019-11-26 05:53:38
问题 I have an EditText box and I want the default keyboard that comes up when it is selected to be the numeric keypad, since most of the time users will be entering numbers. However, I do want to allow users to enter alphabetic characters too, if they need to. Using android:inputType=\"number\" restricts input to numeric digits only. What options do I have? 回答1: Define your EditText in your xml this way: <EditText android:id="@+id/txtOppCodigoCliente" android:inputType="textVisiblePassword"

Move layouts up when soft keyboard is shown?

≡放荡痞女 提交于 2019-11-26 01:42:44
问题 I have a few elements in a RelativeView with the align bottom attribute set, when the soft keyboard comes up the elements are hidden by the soft keyboard. I would like them to move up so that if there is enough screen space they are shown above the keyboard, or to make the section above the keyboard scrollable so the user can still see the elements. Any ideas on how to approach this? 回答1: Yes, check out this article on the Android developers' site which describes how the framework handles the

How to disable copy/paste from/to EditText

你说的曾经没有我的故事 提交于 2019-11-25 23:34:38
问题 In my application, there is a registration screen, where i do not want the user to be able to copy/paste text into the EditText field. I have set an onLongClickListener on each EditText so that the context menu showing copy/paste/inputmethod and other options does not show up. So the user won\'t be able to copy/ paste into the Edit fields. OnLongClickListener mOnLongClickListener = new OnLongClickListener() { @Override public boolean onLongClick(View v) { // prevent context menu from being