Changing IME "Done" button

4492 views
Skip to first unread message

Brady

unread,
Sep 8, 2009, 12:42:54 PM9/8/09
to Android Developers
Hi,

I was wondering if anyone has had any success changing the default IME
action button. I have an EditText field and in the layout XML I've set

android:imeActionLabel="@string/XXXXX"

but don't see any change in the IME. Do I need to also set the
imeOptions to make this a custom action.

One last question, when I assign the imeActionID, can this simply be
the ID of the Button in the layout that I want to emulate clicking, or
do I need to create a constant that maps to some kind of handler in
the code?

Thanks!
Brady

Dianne Hackborn

unread,
Sep 8, 2009, 1:00:49 PM9/8/09
to android-d...@googlegroups.com
Use android:imeOptions to control the button inside of the keyboard:


The full label is only displayed when the IME has a large amount of space for it (such as when the standard keyboard is in fullscreen mode).
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Brady

unread,
Sep 8, 2009, 1:52:52 PM9/8/09
to Android Developers
Hi Dianne,

thank you for your response. I'm sorry if I'm being bone-headed
here :) but is the only way to see my custom button text, set in
android:imeActionLabel
is when the IME is shown in fullscreen?

Also which of the imeOption do I set to have a custom action? None of
the imeOptions listed seem like they apply to what I'm trying to do
http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptions

Do you have any sample code changing the IME action button?

Thank you again,
Brady

Brady

unread,
Sep 10, 2009, 3:44:35 PM9/10/09
to Android Developers
Howdy, anyone have any luck with setting the IME Next button?

Thanks,
Brady

Dianne Hackborn

unread,
Sep 10, 2009, 4:01:15 PM9/10/09
to android-d...@googlegroups.com
You can't set it to anything you want, you can only specify one of the standard actions.  This is because the UI for the keyboard is highly constrained and it is not practical for it to try to accept arbitrary input there.
Reply all
Reply to author
Forward
0 new messages