imeoptions

How to use more then one imeOptions in android

泄露秘密 提交于 2019-12-08 02:09:40
问题 Is it possible to use more then 1 imeOptions in Android xml ? for the same text field . e.g. <EditText android:id="@+id/mywriting" android:imeOptions="actionDone" android:imeOptions="autoText"/> Right now it is giving me an error, saying 1 imeOptions has already been used and I can't use any more 回答1: Use | to combine, like that: android:imeOptions="actionDone|actionNext" In your case, the problem is with autoText , which is not a valid value for imeOptions . 回答2: <EditText android:id="@+id

Android imeOptions=“actionDone” not working

霸气de小男生 提交于 2019-12-04 15:11:43
问题 I am trying to get a login screen for an Android app and so far this is my code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:orientation="vertical"> <EditText android:id="@+id/username" android:layout_width="match_parent" android

Android imeOptions=“actionDone” not working

断了今生、忘了曾经 提交于 2019-12-03 09:25:11
I am trying to get a login screen for an Android app and so far this is my code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:orientation="vertical"> <EditText android:id="@+id/username" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Username" android:inputType="text" android:singleLine="true"

EditText input method action not working when setting imeActionLabel

拟墨画扇 提交于 2019-12-01 17:44:57
问题 I have an Edittext with imeoptions as actiongo . and I triggered my event when pressing soft keyboard enter button. mModelId.setOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { boolean handled = false; // if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) { if (actionId == EditorInfo.IME_ACTION_GO) { id = mModelId.getText().toString(); System.out.println("Model id in Edittext:-"+ id); Toast.makeText

Keyboard hiding EditTexts in Fragments

末鹿安然 提交于 2019-11-30 12:03:10
问题 edit: I need to use the keyboard, but it hides my EditText , I need it to scroll so the keyboard is not hiding it. I am using a Samsung tablet. My style: parent="android:Theme.Holo.NoActionBar.Fullscreen" The EditText fields are in a scrollable view, like so: The fragment layout: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent" android:layout_width="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android

How to implement Multiline EditText with ActionDone button (without Enter button)

荒凉一梦 提交于 2019-11-30 04:51:07
I have EditText which is used for entering contents on messages (emails, sms). I want message to be immediately posted on ActionDone button click. I use following code for this: message.setOnEditorActionListener((textView, i, keyEvent) -> { switch (i) { case EditorInfo.IME_ACTION_DONE: if (messageCanBePosted()) { SoftKeyboard.hide(message); postMessage(); return true; } else { return false; } default: return false; } }); But also I want this message field to be multiline, like in any other messenger apps. I can achieve it with this line: android:inputType="textMultiLine" The problem is that

Keyboard hiding EditTexts in Fragments

假装没事ソ 提交于 2019-11-30 03:35:47
edit: I need to use the keyboard, but it hides my EditText , I need it to scroll so the keyboard is not hiding it. I am using a Samsung tablet. My style: parent="android:Theme.Holo.NoActionBar.Fullscreen" The EditText fields are in a scrollable view, like so: The fragment layout: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent" android:layout_width="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"

How to implement Multiline EditText with ActionDone button (without Enter button)

我们两清 提交于 2019-11-29 02:21:11
问题 I have EditText which is used for entering contents on messages (emails, sms). I want message to be immediately posted on ActionDone button click. I use following code for this: message.setOnEditorActionListener((textView, i, keyEvent) -> { switch (i) { case EditorInfo.IME_ACTION_DONE: if (messageCanBePosted()) { SoftKeyboard.hide(message); postMessage(); return true; } else { return false; } default: return false; } }); But also I want this message field to be multiline, like in any other

Listview with edittext - auto scroll on “next”

帅比萌擦擦* 提交于 2019-11-28 07:16:38
问题 I have a ListView with one EditText on each row (in addition to a couple of non-editable TextView's). When I'm editing the text in the EditText, the soft keyboard has "Next" button - and pressing it moves the focus to the next field - this is great. On the last row, the button changes to "Done". I'm using EditText.setImeOptions to set the button to "Done" or "Next" based on whether this is the last row or not. The problem is that the listview can have more rows that can fit on the screen.