I have my expandable list working.  The data in my database will be
Group for the main level, then the expanded items will have a subGroup
and an itemName.

When I click on a row, I want to open an edit window for the data on
that row.  Since the information I need to access it is Group,
Subgroup, and ItemName, I thought I should be able to retrieve that
information from the list.  I see that I can return the group positon
and subgroup position, but I have not found how to retrieve the data.

I coded an onClick which is working, but the information seems strange
to me.
     public boolean onChildClick(ExpandableListView parent, View v,
                                                   int groupPosition,
                                                   int childPosition,
long id){
       Toast.makeText(this, v.getId() +  "/n" + groupPosition +  "/n"
+ childPosition,
            Toast.LENGTH_LONG).show();
        return false;
     }

Going down the child rows over different groups, I get
    -1/n0/n0          ...Group 1  Child 1
    -1/n1/n0          ...Group 2  Child 1
    -1/n2/n0          ...Group 3  Child 1
    -1/n3/n0          ...Group 3  Child 2
    -1/n4/n0          ...Group 3  Child 1
To me it looks like group is reporting the child position and
childPosition is reporting nothing.

I see that there is a getChildView, but it is not clear to me as to
how it is used.

So, Im looking for a simple sample.

ScCrow

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to