ExpandableListView getFlatListPosition - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ExpandableListView getFlatListPosition method.

This code example shows how to use the following methods:getChildAt, expandGroup, getFlatListPosition, setSelectedChild, smoothScrollToPosition
This code example shows how to use the following methods:getFlatListPosition, getCount
    public void setListPositionFromTopImpl(final long packed_pos, final int y, final Runnable callback) {
        ExpandableListView view = getExpandableListView();
        if (view != null) {
            int pos = view.getFlatListPosition(packed_pos);
            if (0 <= pos || pos < view.getCount()) {
                setListPositionFromTopImpl(pos, y, callback);
        if (callback != null) callback.run();
    public void setListPositionFromTopImpl(final int position, final int y, final Runnable callback) {
        final ExpandableListView view = getExpandableListView();
        view.post(new Runnable() {
            public void run() { 
                if (view == null) return;

Related ExpandableListView getFlatListPosition Questions & Answers:

getFlatListPosition Method Overview
Converts a group and/or child position to a flat list position.
See Code Examples for other Android ExpandableListView Methods: