From 03cd43a4c159765ad48427ee6fc44d03940acb24 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 3 Mar 2019 17:05:20 +0200 Subject: [PATCH] ensure the profile list is always fully visible, without in-list scrolling this is an abuse of the recycler view, which is designed to show only a suitable subset of the list, but (1) nested scrolling is ugly, and worse in landscape, and (2) we aren't supposed to have thousands of profiles --- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 3 +++ app/src/main/res/layout/main_navigation.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index e73c4f6f..20830398 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -493,6 +493,9 @@ public class MainActivity extends ProfileThemedActivity { profileListHeadArrow.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate_180)); profileListHeadMore.setVisibility(View.VISIBLE); profileListHeadMore.startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in)); + findViewById(R.id.nav_profile_list).setMinimumHeight( + (int) (getResources().getDimension(R.dimen.thumb_row_height) * + Data.profiles.size())); } private void collapseProfileList() { profileListExpanded = false; diff --git a/app/src/main/res/layout/main_navigation.xml b/app/src/main/res/layout/main_navigation.xml index 4ec47d0a..e4e8017f 100644 --- a/app/src/main/res/layout/main_navigation.xml +++ b/app/src/main/res/layout/main_navigation.xml @@ -144,7 +144,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:animateLayoutChanges="true" - android:isScrollContainer="false" + android:nestedScrollingEnabled="false" android:orientation="vertical" android:visibility="gone"> -- 2.39.2