开发者

How to get focus for a button in between two editfields in android

开发者 https://www.devze.com 2023-03-11 00:49 出处:网络
i am having a button in between two edit fields. when iam using track ball to scroll ,button is getting focus but when i use the next button in softkeyboard after typing some text in editfield , focus

i am having a button in between two edit fields. when iam using track ball to scroll ,button is getting focus but when i use the next button in softkeyboard after typing some text in editfield , focus is moving on to next editfield but n开发者_如何转开发ot the button inbetween them .how to solve this..?


Use android:focusableInTouchMode attribute:

<Button ...  android:focusableInTouchMode="true" />


I think android:nextFocusDown and android:nextFocusUp solves your problem.

0

精彩评论

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