我根据 Android 示例教程创建了一个示例应用程序,并完成了记事本的所有 3 个练习。我可以添加和编辑创建的笔记。但是,当我尝试编辑注释时,我被迫选择文本标题进行编辑。如果我单击文本右侧,基本上同一行中的任何其他位置我都无法编辑它。
我想让整行都可以选择/编辑。请让我知道如何执行此操作。我尝试更改notes_row.xml width =“fill_parent”。但这并没有成功。这个你能帮我吗。谢谢。
最佳答案
更改notes_row.xml 文件
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView">
</TextView>
</RelativeLayout>
关于android - 如何在android中 ListView 整行可选?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6233665/