简体   繁体   中英

EditView in ListView row: focus lost when soft keyboard shows

I have some EditViews in the rows of a ListView. This works just fine except when the soft keyboard raises and lowers.

When I touch the EditView within the ListView with the soft keyboard down, focus jumps to the EditView, then the keyboard comes up, removes focus from the EditView and sets focus to the ListView, resulting in an odd user experience with the focus no-where visible.

Touching the EditViews with the keyboard already showing works as you would expect. The problem seems to be with the soft keyboard lowering and raising and the ListView getting confused about where focus should be placed.

I do have listView.setItemsCanFocus(true) for the ListView

ListView上尝试android:focusable="false"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM