【问题标题】:Get the row id of the current item in ListView获取 ListView 中当前项的行 id
【发布时间】:2019-08-06 15:08:44
【问题描述】:
这是我的列表视图项:
我想在复选框上放置一个 OnClickListener。但我需要通过行 id 获取 CheckBox 所在的列表项。我怎样才能在onClick 方法中做到这一点。
【问题讨论】:
标签:
java
android
checkbox
onclick
【解决方案1】:
在 bindView 方法中,你必须在每个复选框上放置一个点击监听器