【问题标题】:Issue with expandable listview android可扩展列表视图android的问题
【发布时间】:2013-04-29 11:28:54
【问题描述】:

请帮助我。我对这个问题感到震惊。我有一个可扩展的列表视图,它显示来自 db 的项目标题。在组项目上单击我想获取该 ID(来自数据库的 ID)。任何希望。我正在获取组 ID,但这并不能满足我的要求。请帮帮我。

@Override
public void onGroupExpanded(int groupPosition) {
    // TODO Auto-generated method stub
    Toast.makeText(JobDetails.this, "Group Expanded" + groupPosition,
                    Toast.LENGTH_SHORT).show();
    plusView = (ImageView)findViewById(R.id.plusButton);
    plusView.setImageDrawable(getResources().getDrawable(R.drawable.minus));
}

@Override
public void onGroupCollapsed(int groupPosition) {
    // TODO Auto-generated method stub
    Toast.makeText(JobDetails.this, "Group Collapsed",
                    Toast.LENGTH_SHORT).show();
    plusView = (ImageView)findViewById(R.id.plusButton);
    plusView.setImageDrawable(getResources().getDrawable(R.drawable.plus));
}

【问题讨论】:

    标签: android android-listview expandablelistview


    【解决方案1】:

    嘿,通过在 arraylist 中添加 id 并在“public View getGroupView”上调用它来解决这个问题..simple

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-23
      相关资源
      最近更新 更多