Android EditText inside a ListView

懵懂的女人 提交于 2019-12-24 00:55:04

问题


I am having a lot of trouble getting an EditText within a ListView row to behave correctly. Does anyone know of any tutorials that walk you through the process?

Thanks!


回答1:


This answers can help you out

Focusable EditText inside ListView

How to correctly handle Android EditText input inside a ListView?




回答2:


As of Android 4.1.0, these two components seem not working together as expected, something is buggy there. There are various proposed work arounds but all look like a low level hacks that may stop working or even cause they own problems in the future versions.

It is possible to use LinearLayout to simulate a list with comparable effort. EditText talks much better with LinearLayout.



来源:https://stackoverflow.com/questions/4929830/android-edittext-inside-a-listview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!