guys i have 3 groups for my expandable listview,
i try to change the color of each group respectively, when they’re expanding and back to normal color when they’re collapsing…
the problem i’ve been facing right now is that when i click the first group, it changes the color of the last group…, so i can say that they colors changed randomly not to the corresponding group.
here’s the simple code that i use:
listView.setOnGroupClickListener(new OnGroupClickListener()
{
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int position, long id)
{
v.setBackgroundResource(R.drawable.group_bar_press);
Toast.makeText(getBaseContext(), "Group clicked", Toast.LENGTH_LONG).show();
return false;
}
});
well, that’s all i hope it’ll be solved 🙂
i’m so sloppy :p
simply used Boolean isExpanded on my getView method, where i use to return my view,
and do it like this:
lol