问题
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