Note that there are some explanatory texts on larger screens.

plurals
  1. POExpandablelistview child items android
    primarykey
    data
    text
    <p>I have an expandablelistview which contain n number of group's. Each group contains single child that contains diffrent counts of textview like , Group 1 s child contains 10 textview , Groups 2 child contains 4 textview etc. My issue is that when i show notes(Textviews) of Group 1 on expand Groups 2 child also showing the same notes. Can any one tell me how to differentiate between groups child or add different items to different child's ? </p> <p>Sorry i cant paste the full code here</p> <pre><code>public class ExpandableListAdapter extends BaseExpandableListAdapter { private Context mContext; private ExpandableListView mExpandableListView; private List&lt;GroupEntity&gt; mGroupCollection; private int[] groupStatus; private ArrayList&lt;HashMap&lt;String, String&gt;&gt; data; public ExpandableListAdapter(Context pContext, ExpandableListView pExpandableListView, List&lt;GroupEntity&gt; pGroupCollection, ArrayList&lt;HashMap&lt;String, String&gt;&gt; d, String jobID2 ,String userId, String totalTasks) { mContext = pContext; mGroupCollection = pGroupCollection; mExpandableListView = pExpandableListView; data=d; jobId =jobID2; groupStatus = new int[mGroupCollection.size()]; totalNoTask=totalTasks; userKey=userId; setListEvent(); } private void setListEvent() { mExpandableListView .setOnGroupExpandListener(new OnGroupExpandListener() { @Override public void onGroupExpand(int arg0) { // TODO Auto-generated method stub groupStatus[arg0] = 1; } }); mExpandableListView .setOnGroupCollapseListener(new OnGroupCollapseListener() { @Override public void onGroupCollapse(int arg0) { // TODO Auto-generated method stub groupStatus[arg0] = 0; } }); } @Override public String getChild(int arg0, int arg1) { // TODO Auto-generated method stub return mGroupCollection.get(arg0).GroupItemCollection.get(arg1).Name; } @Override public long getChildId(int arg0, int arg1) { // TODO Auto-generated method stub return 0; } @Override public View getChildView(int arg0, int arg1, boolean arg2, View arg3, ViewGroup arg4) { // TODO Auto-generated method stub HashMap&lt;String, String&gt; song = new HashMap&lt;String, String&gt;(); song = data.get(arg0); for (String key : song.keySet()) { String tId =key; String value = song.get("id"); taskID= value; } final EditText textView ; ImageButton imGbtn ; final ChildHolder childHolder; if (arg3 == null) { } return arg3; } @Override public int getChildrenCount(int arg0) { // TODO Auto-generated method stub return mGroupCollection.get(arg0).GroupItemCollection.size(); } @Override public Object getGroup(int arg0) { // TODO Auto-generated method stub return mGroupCollection.get(arg0); } @Override public int getGroupCount() { // TODO Auto-generated method stub return mGroupCollection.size(); } @Override public long getGroupId(int arg0) { // TODO Auto-generated method stub return arg0; } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload