From: Damyan Ivanov Date: Sun, 3 Mar 2019 15:05:20 +0000 (+0200) Subject: ensure the profile list is always fully visible, without in-list scrolling X-Git-Tag: v0.7~12 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=03cd43a4c159765ad48427ee6fc44d03940acb24 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 --- 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">