开发者

Need Prev,Next button above soft keyboard in android

I want to show the virtual keyboard with Prev, Next Buttons above the keyboard. When the user clicks prev button, cursor should move to the previous edittext input field and clicking on next button should go to the next edittext field in the view.

IF we open 开发者_如何转开发any page in android browser which asks input, we can see this kind of keyboard.

I need that to be implemented for the normal activity which I created. May I know how to do this ?

Thanks, Senthil.M


For Next Button just add one line to your edit text field

   EditText et1 = (EditText)findViewById(R.id.editText1);
    et1.setImeOptions(EditorInfo.IME_ACTION_NEXT);
   EditText et2 = (EditText)findViewById(R.id.editText2);
    et2.setImeOptions(EditorInfo.IME_ACTION_NEXT);

and i m also search about previous Button Please check

Add Button to Android Soft Keyboard


Simply set imeOptions to actionNext or actionPrev in EditText tag in xml like

<EditText
android:imeOptions="actionNext"
/>

And you can also set it programmatically like

yourEditText.setImeOptions(EditorInfo.IME_ACTION_NEXT);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜