Im new to android programming, the current architecture of my application is a Main Activity with a Fragment that fills the display. I am trying to create an ExpandableListView
inside the Fragment which also fills the display. Everything works as i am expecting it, i think, however I cannot populate either the Child View or Group View.
In my Fragment Java class file i have;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
ExpandableListView lv = (ExpandableListView) getView().findViewById(R.id.list);
lv.setAdapter(new ParentLevel(null));
}
ParentLevel
which extends BaseExpandableListAdapter
has;
@Override
public View getGroupView(int groupPosition, boolean isExpanded,
View convertView, ViewGroup parent)
{
return convertView;
}
convertView
returns null, but parent
returns the ExpandableListView
in my layout file.
I'm not sure how to work with this or what to do next, if i wanted to just have a simple TextView
, for a title, and a the group arrow what would i do?
I plan to use an enum for the data, which I am already inspecting for getGroupCount()
and getChildCount()