List of usage examples for android.widget ExpandableListView getAdapter
@Override
public ListAdapter getAdapter()
From source file:Main.java
public static void collapseAll(ExpandableListView expandableListView) { int groupCount = expandableListView.getAdapter().getCount(); for (int i = 0; i < groupCount; i++) { expandableListView.collapseGroup(i); }// w w w. java 2 s . c o m }
From source file:Main.java
public static void collapseAllExcept(ExpandableListView expandableListView, int index) { int groupCount = expandableListView.getAdapter().getCount(); for (int i = 0; i < groupCount; i++) { if (index != i) { expandableListView.collapseGroup(i); }/* w w w . j a v a2s . com*/ } }
From source file:Main.java
public static void expendAll(ExpandableListView expandableListView) { if (expandableListView == null || expandableListView.getAdapter() == null) { return;// w ww .j a v a 2 s . c om } int groupCount = expandableListView.getAdapter().getCount(); // System.out.println("+++++++++++++"); // System.out.println(groupCount); for (int i = 0; i < groupCount; i++) { try { expandableListView.expandGroup(i); } catch (Exception exception) { exception.printStackTrace(); } } }