From 3432db37d97b3d6e10c092bf6665e0d39ed7518e Mon Sep 17 00:00:00 2001 From: Christian Ascheberg Date: Wed, 7 Sep 2016 21:26:34 +0200 Subject: [PATCH] Fix scrollbars Fixes #5487 Closes #5671 // FREEBIE --- res/layout/contact_selection_list_fragment.xml | 3 ++- res/layout/media_overview_activity.xml | 3 ++- .../thoughtcrime/securesms/ContactSelectionListFragment.java | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/res/layout/contact_selection_list_fragment.xml b/res/layout/contact_selection_list_fragment.xml index e212d6a3ed..53a63e1bfb 100644 --- a/res/layout/contact_selection_list_fragment.xml +++ b/res/layout/contact_selection_list_fragment.xml @@ -12,7 +12,8 @@ + android:layout_height="match_parent" + android:scrollbars="vertical" /> + android:layout_height="match_parent" + android:scrollbars="vertical" /> loader, Cursor data) { ((CursorRecyclerViewAdapter) recyclerView.getAdapter()).changeCursor(data); emptyText.setText(R.string.contact_selection_group_activity__no_contacts); - if (recyclerView.getAdapter().getItemCount() > 20) { + boolean useFastScroller = (recyclerView.getAdapter().getItemCount() > 20); + recyclerView.setVerticalScrollBarEnabled(!useFastScroller); + if (useFastScroller) { fastScroller.setVisibility(View.VISIBLE); fastScroller.setRecyclerView(recyclerView); }