Search code examples
androidandroid-tabhostandroid-tabsandroid-tabactivity

BaseExpandableListAdapter is not called


In this class

   public class Rest_name_adapter extends BaseExpandableListAdapter  {
   }

I have put Logs in all the methods to check the sequence of called methods. But from the statement in my activity class

   exp_listView.setAdpater(new Rest_name_adapter(getParent(), group_list, child_list));

It goes to the Rest_name_adapter class, just calls the contructor and nothing else. I dont know why It is not calling this: getChildView() and getGroupView() methods?? In context, I have used getParent() because this is the child of TabGroupActivity. Please help


Solution

  • Do you implement some methods in your Rest_name_adapter? If not there is a simple explanation - adapter calls getGroupCount(), which returns 0 by default. As there a no groups - no views needed. So there is no one call to getGroupView() occured.