use of eu.siacs.conversations.ui.util.ScrollState in project Conversations by siacs.
the class ConversationsOverviewFragment method getScrollState.
private ScrollState getScrollState() {
if (this.binding == null) {
return null;
}
LinearLayoutManager layoutManager = (LinearLayoutManager) this.binding.list.getLayoutManager();
int position = layoutManager.findFirstVisibleItemPosition();
final View view = this.binding.list.getChildAt(0);
if (view != null) {
return new ScrollState(position, view.getTop());
} else {
return new ScrollState(position, 0);
}
}
Aggregations