[英]about ListView nested ListView, how to get the outer ListView item position
You can use ExpandableListView instead of nested Listview. 您可以使用ExpandableListView而不是嵌套的Listview。 Using ExpandableListView you will get id. 使用ExpandableListView,您将获得ID。
You should be using ExpandableListView 您应该使用ExpandableListView
Here you will get a example. 在这里,您将获得一个示例。
But if you want to do as you have done now[should avoid this], Save your outer list (item) id in your inner list adapter model. 但是,如果您想像现在那样做[应避免这种情况],请在内部列表适配器模型中保存外部列表(项目)ID。 After that on item click of inner listview (delete) you will get the id of outer list item. 之后,单击内部列表视图的项目(删除),您将获得外部列表项目的ID。
But you should go with ExpandableListView. 但是您应该使用ExpandableListView。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.