Search in sources :

Example 1 with GesturedListView

use of com.orgzly.android.ui.views.GesturedListView in project orgzly-android by orgzly.

the class BookFragment method scrollToCursorPosition.

/**
 * @param cursorPosition note to scroll to. 0 for first note, 1 for second etc.
 */
private void scrollToCursorPosition(final int cursorPosition) {
    GesturedListView listView = getListView();
    listView.post(() -> {
        listView.setSelection(cursorPosition + listView.getHeaderViewsCount());
    });
}
Also used : GesturedListView(com.orgzly.android.ui.views.GesturedListView)

Aggregations

GesturedListView (com.orgzly.android.ui.views.GesturedListView)1