Android EditView IME

Source: Internet
Author: User

1.android:imeoptions can be used to configure the input method in the lower right corner:

This can add the corresponding attribute in the XML android:imeoptions

Actiongo IME in the lower right corner shows "go to"

Actionsearch IME Display "search" in the lower right corner

Actionsend Input Method displays "send" in the lower right corner

Actionnext IME displays "Next" in the lower right corner

Actiondone IME displays "done" in the lower right corner

The Actionprevious Input method displays "previous" in the lower right corner.

You must set android:inputtype= after "text" to take effect.

2. Listen to the lower right button:

    PrivateOneditoractionlistener ActionListener =NewOneditoractionlistener () {@Override Public BooleanOneditoraction (TextView V,intActionId, KeyEvent event) {            Switch(V.getid ()) { CaseR.id.first:if(ActionId = =editorinfo.ime_action_send) {                    }                     Break;  CaseR.id.second: Break; default:                     Break; }            return false; }    };

actionunspecified unspecified, corresponding constant editorinfo.ime_action_unspecified.
Actionnone no action, corresponding constant Editorinfo.ime_action_none
Actiongo, corresponding constant editorinfo.ime_action_go
Actionsearch search, corresponding constant editorinfo.ime_action_search
Actionsend send, corresponding constant editorinfo.ime_action_send
Actionnext Next, corresponding constant Editorinfo.ime_action_next
Actiondone complete, corresponding constant Editorinfo.ime_action_done

This allows you to customize the behavior of the lower-right button.

Android EditView IME

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.