On Fri, Feb 5, 2010 at 2:56 PM, Gustavo <[email protected]> wrote: > in fact I think that there's something wrong with this line: > > LinearLayout groupLayout = > > (LinearLayout)getExpandableListAdapter().getGroupView(i, false, > null, null); >
You know what, getGroupView will create a new view if you pass in null for the 3rd parameter. So I think what's happening is that you set up click listener in a brand new view then when the expandable list gets displayed, it ends up creating a whole new view with a new button that does not have the listener on it. It's reasons like this that I ended up just sub-classing BaseExpandableListAdapter and managing this stuff myself. You may want to try doing that, or sub-class SimpleExpandableListAdapter (which should be easier since it does mostly what you need) and override getGroupView(). Just call super.getGropView() and then on the returned view set your clickListener(). That way it's always set. Note though that this sounds like it's getting more complicated then it needs to be and is probably not the "right" way to go about it, though that's what I can think of based on what you've posted. Hope that helps. ------------------------------------------------------------------------------------------------- TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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 [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

