i have my problem with my Expandable ListView on my Android Application
this my code
package proyek.akhir;
import android.app.ListActivity;
import an
You must activate that your children are selectable! To do that return true in your (overriden) isChildSelectable method of class ExpandableListAdapter.
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
If you are using OnChildClickListener and/or OnGroupClickListener then each child view within the group's rows and children's rows must not be focusable. For example, if you have a checkbox in the child then set the checkbox to not focusable:
checkBox.setFocusable(false);
Also, if you set the group/child convertView to clickable it will prevent the clicks from reaching the OnChildClickListener and OnGroupClickListener. If this is the case go to getGroupView, in your expListViewAdapter, and set:
convertView.setClickable(false);
Then go to getChildView, in your expListViewAdapter, and set:
convertView.setClickable(false);
After this both OnGroupClickListener and OnChildClickListener should work - granted you set the listeners in the first place (using expandableListView.setOnGroupClickListener(...) and expandableListView.setOnChildClickListener(...))
You have to change return value is true instead of false. Make your child view selectable.
Use this:
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
Instead Of:
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return false;
}