I have an application where user needs to input some text. When I click the editText area a keyboard appears and then I input the text after which I have to press the "back" key on my phone to hide the keyboard and then press the submit button which is getting annoying.
How do I get that "ok" button that does it for me which I am used to? I have Android version 2.3.6 on my phone. Is this even available at this API level ?
Use onEditorActionListener http://developer.android.com/reference/android/widget/TextView.OnEditorActionListener.html on your EditText.
Also see: EditorInfo http://developer.android.com/reference/android/view/inputmethod/EditorInfo.html
Related
what I mean by the title is by pressing enter from the keyboard instead of pressing a button.
I want the user to have another option of confirming the password from the keyboard
Edit:grammar fixed
Is there any way to programatically hide the emoticon key in kitkat keyboard? I have marked the key in the image given below.
I need to remove this icon from the keyboard displayed when I tap an edit text in my application. Can anybody help?
1)
Do a long press on the button you marked in your picture. There should pop up a small window.
Hit Input languages and deselect Emoji / Emoticons / ....
2)
If the first way does not work, download the android kitkat keyboard and use this instead of your current keyboard.
When a standard EditText has focus the softkeyboard shows a "Next" button to move the the next field (It does on my Nexus 4 at least) but if I have an EditText with inputType="numberDecimal" the keyboard instad shows a "return" icon. Is there anyway to force the keyboard to always show the "Next" button?
Just to clarify, I want the "Next" button available to move focus to the next available EditText on the screen once user input is completed for the particular field.
Example with "Next" button;
Example without "Next" button;
Have you added
android:imeOptions="actionNext"
in your EditText.
For those, If above not working while using in number mode you can still use :
android:nextFocusDown="#+id/parentedit"
where parentedit is the ID of the next EditText to be focused.
I need my soft keyboard input to have both return button AND done button so that the user can write paragraphs in my EditText and click on Done to close the keyboard. Is this possible?
I've tried:
android:inputType="textMultiLine"
android:imeOptions="actionDone"
together but it didn't work.
PS: I'm testing on Samsung keyboard type.
No, I believe it's not possible prior to API level 11 (3.0).
The same issue cropped up here (discussed in the comments to the accepted answer):
Android Soft keyboard action button
From the final comment:
Looking at a few apps on my phone, it seems common to have the multiline box last, with a visible "Done" or "Send" button below it (e.g. Email app).
I have a bunch of EditTexts in my Android application, each with InputMethod set to numberSigned. My target device does not have a hardware keyboard and uses the software keyboard for numeric entry. Android replaces the standard "Done" button to the right of the entry box with a "Next" button. How can I use "Done" instead?
Try adding android:imeOptions="actionDone" to your EditText.
Reference
This can also be accomplished in code with:
myEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);