]> git.ktnx.net Git - mobile-ledger.git/commitdiff
ensure the profile list is always fully visible, without in-list scrolling
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 Mar 2019 15:05:20 +0000 (17:05 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 Mar 2019 15:07:21 +0000 (17:07 +0200)
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

app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
app/src/main/res/layout/main_navigation.xml

index e73c4f6f17a0a46a76a8d2781266069104cae819..208303983d55af65d6b5560ee8a77a6b758ea97e 100644 (file)
@@ -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;
index 4ec47d0a7fdcf7da09d819c842a59d9aed032bb9..e4e8017fef4cc1eb2488180681c2a6fe84c3da3f 100644 (file)
                         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">