Skip to main content

Posts

Showing posts with the label expandable

Expandable ListView in ANDROID

java.class public class Expandablelistview extends ExpandableListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.expandablelistview); SimpleExpandableListAdapter expListAdapter = new SimpleExpandableListAdapter( this, createGroupList(), R.layout.group_row, new String[] { "Item" }, new int[] { R.id.row_name }, createChildList(), R.layout.child_row, new String[] {"Sub Item"}, new int[] { R.id.grp_child}); setListAdapter( expListAdapter ); } // hash map for row private List createGroupList() { ArrayList result = new ArrayList(); for (int i = 0; i groupPosition ...