For the moment I will make a button on the group's view to do what I want. But my objective is to have this comportment for the group: - by clicking on the expand/collapse button -> expand/collapse the group - by clicking on the group (except the expand button!) do something else
On 5 avr, 08:43, Kostya Vasilyev <kmans...@gmail.com> wrote: > ExpandableListView has setOnItemClickListener, which is called for both > group and child items. > > You can tell groups from children by looking at its id value. > > However, this UI would look the same as all other expandable list views, but > work differently - are you sure you want to do this? > > -- Kostya > 2011/4/5 Carbodrache <emmanuel.long...@gmail.com> > > > > > > > > > Hello, > > > I have an expandableListView with simple textViews, I want to have the > > same result on a item (parent or child) click but if I use > > ExpandableListView.setOnGroupClickListener() method I can't handle the > > expand of the parent node and so can't see children. > > > The solution I found is to add an OnClickListener to the group's > > textViews, in the BaseExpandableListAdapter.getGroupView(). > > > My question is : Is there a better way to have detect on which View > > the click is ? An idea I have is to detect the click on the expand > > button to expand/collapse the group and use > > ExpandableListView.setOnGroupClickListener() on the group row to do > > what I want > > > Help please ! > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en