Java Code Examples for android.widget.ExpandableListView#isGroupExpanded()

The following examples show how to use android.widget.ExpandableListView#isGroupExpanded() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RootsFragment.java    From FireFiles with Apache License 2.0 6 votes vote down vote up
private ArrayList<Long> getExpandedIds() {
    ExpandableListView list = mList;
    ExpandableListAdapter adapter = mAdapter;
    if (adapter != null) {
        int length = adapter.getGroupCount();
        ArrayList<Long> expandedIds = new ArrayList<Long>();
        for(int i=0; i < length; i++) {
            if(list.isGroupExpanded(i)) {
                expandedIds.add(adapter.getGroupId(i));
            }
        }
        return expandedIds;
    } else {
        return null;
    }
}
 
Example 2
Source File: RootsFragment.java    From FireFiles with Apache License 2.0 6 votes vote down vote up
private ArrayList<Long> getExpandedIds() {
    ExpandableListView list = mList;
    ExpandableListAdapter adapter = mAdapter;
    if (adapter != null) {
        int length = adapter.getGroupCount();
        ArrayList<Long> expandedIds = new ArrayList<Long>();
        for(int i=0; i < length; i++) {
            if(list.isGroupExpanded(i)) {
                expandedIds.add(adapter.getGroupId(i));
            }
        }
        return expandedIds;
    } else {
        return null;
    }
}
 
Example 3
Source File: RootsFragment.java    From FireFiles with Apache License 2.0 6 votes vote down vote up
private ArrayList<Long> getExpandedIds() {
    ExpandableListView list = mList;
    ExpandableListAdapter adapter = mAdapter;
    if (adapter != null) {
        int length = adapter.getGroupCount();
        ArrayList<Long> expandedIds = new ArrayList<Long>();
        for(int i=0; i < length; i++) {
            if(list.isGroupExpanded(i)) {
                expandedIds.add(adapter.getGroupId(i));
            }
        }
        return expandedIds;
    } else {
        return null;
    }
}