Thank you so much for the quick reply! it worked!!!
now the only problem I'm having is how to get the button click
event... the only place I could put the onClickListener was inside the
method
you told me "setOnGroupClickListener" because I can get the
groupPosition and that's exactly what I need BUT it only works after I
click on the group since it's inside setOnGroupClickListener where can
I place the button's onClickListener so that I can get the
groupPosition?

sample code:
                                Button b = (Button)findViewById(R.id.button);
                                b.setOnClickListener(new OnClickListener() {

                                        @Override
                                        public void onClick(View v) {
                                                Log.i(TAG, "click");

                                        }
                                });

On Feb 4, 8:13 pm, TreKing <[email protected]> wrote:
> On Thu, Feb 4, 2010 at 7:48 AM, Gustavo <[email protected]> wrote:
> > 1) I want to expand only one item (row) at a time (closes it whenever
> > I want to expand a new item)
>
> Assuming you have an ExpandableListActivity, override onGroupExpand(int) to
> keep track of the the item currently expanded and call collapse() on the
> last one that was expanded. Or add a listener to the ExpandableListView
> you're using to do the same.
>
> > 2) when I click on the item I want to change the text on it and add an
> > image in that row
>
> Look at the setOnGroupClickListener function of the ExpandableListView.
>
>  3) I need a button inside every item so that it can do a specific task
>
> > based on its row's data
>
> So just add a button to whatever layout you're using for each group ...
>
> >  4) I tried to see if it has a kind of onListItemClick method but there
> > isn't... how can I get the position of the item that was selected?
>
> Again, look at setOnGroupClickListener.
>
> --------------------------------------------------------------------------- 
> ----------------------
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://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

Reply via email to