【问题标题】:Android BaseExpandableListAdapter - How does the getView method workAndroid BaseExpandableListAdapter - getView 方法是如何工作的
【发布时间】:2012-01-20 08:19:34
【问题描述】:

我有一个扩展适配器 BaseExpandableListAdapter 的 ExpandableList。

我想在点击子视图时更改子视图

在 ExpandableListView 中添加子项由以下人员完成:

    @Override
public View getChildView(int groupPosition, int childPosition,
        boolean isLastChild, final View convertView, ViewGroup parent) {}

当其中一个被点击时,我如何更改子项?

【问题讨论】:

    标签: android expandablelistview


    【解决方案1】:

    使用 OnChildClickListener。

    不要直接更改子视图,只需修改与子相关的数据,然后通过 notifyDatasetChanged() 之类的方法刷新列表视图

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多