Setting a return key on an Android keyboard

Do any of your friendly coders know how to change text to a return key on an Android keyboard. I fire the return event of the EditText element to start the action. Therefore, I would like to show the user that he can start the action with this key. Some applications do this. For instance. they replace the key with the search character.

I am also wondering why applications always have an extra button away from the text field. Clearly this takes up screen space. But this may be necessary for some purpose that I do not know about. The only problem I could imagine was task switching. After switching back, the user will have to call up the keyboard before he can begin the action. The other is a hardware keyboard, but someone will assume that a return key will trigger an action.

Rg

+3
source share
2 answers

. , android:imeOptions="actionSearch" EditText View. , , TextView.

, , , , , . , , , , , .

+14

, ,
android:imeOptions="flagNoAccessoryAction" TextView , myTextView.setImeOptions(EditorInfo.IME_MASK_ACTION & EditorInfo.IME_FLAG_NO_ACCESSORY_ACTION);.

, , , , - , , , , , - .
: http://android-developers.blogspot.dk/2009/04/updating-applications-for-on-screen.html.

0

Source: https://habr.com/ru/post/1764828/


All Articles