From 44f3992ed647e098e2c02b5b6790f2d52b9dcd95 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Sat, 19 Oct 2024 18:18:14 +0200 Subject: [PATCH] Make all fragments properly scrollable --- app/src/main/res/layout/activity_main.xml | 3 +- app/src/main/res/layout/content_main.xml | 2 +- app/src/main/res/layout/fragment_about.xml | 626 +++++++++---------- app/src/main/res/layout/fragment_account.xml | 395 ++++++------ 4 files changed, 516 insertions(+), 510 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index b225f8c..5e9dd8a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -12,8 +12,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" - app:liftOnScroll="true" - app:liftOnScrollTargetViewId="@+id/rvAccounts"> + app:liftOnScroll="true"> + android:layout_marginTop="?attr/actionBarSize"> - - + - + - + + + android:paddingBottom="8dp" + android:orientation="vertical"> - - - - - - + android:orientation="horizontal" + android:background="?attr/selectableItemBackground" + android:padding="16dp"> - + - - - + android:text="@string/app_name" + android:textAppearance="@style/TextAppearance.AppCompat.Headline" /> - - - - - - + - + + + + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/version" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> - - - - - - + android:text="0.0.0 (0)" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" + tools:ignore="HardcodedText" /> + + + + + + + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/about_changelog" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> - - - - - - + android:text="@string/about_changelog_description" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> + + + + + + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/about_github" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> - - - - - - - + android:text="@string/about_github_description" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> + + + + + + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/about_license" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> - - - - - - - + android:text="@string/about_license_description" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> - - - - - - + + + android:src="@drawable/ic_outline_description_24" + android:importantForAccessibility="no" /> + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/about_third_party_libraries" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> - + android:text="@string/about_third_party_libraries_description" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> + - + - + - + - + + + + + + + + + + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/about_author_roclidev" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> + android:text="@string/about_country_netherlands" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> - + + + + + + + + + + + - + + + android:paddingBottom="8dp" + android:orientation="vertical"> + + - - + + + android:src="@drawable/ic_outline_star_24" + android:importantForAccessibility="no" /> + android:layout_marginStart="32dp" + android:orientation="vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - + android:text="@string/about_support_rate" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> - - - - - - - + android:text="@string/about_support_rate_description" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> - + + + - - - + + diff --git a/app/src/main/res/layout/fragment_account.xml b/app/src/main/res/layout/fragment_account.xml index d565455..56a3b93 100644 --- a/app/src/main/res/layout/fragment_account.xml +++ b/app/src/main/res/layout/fragment_account.xml @@ -19,229 +19,240 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> - + android:layout_height="0dp" + android:layout_weight="1" + android:clipToPadding="false" + android:isScrollContainer="true" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - - - + android:paddingHorizontal="17.5dp" + android:paddingBottom="50dp"> - - + android:text="@string/section_connection_info" + android:textAppearance="@style/TextAppearance.Material3.TitleMedium" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - + + + + - - + android:hint="@string/url" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/text_layout_name"> - - - + + + + - + + + + + - + android:text="@string/section_authentication" + android:layout_marginTop="10dp" + android:textAppearance="@style/TextAppearance.Material3.TitleMedium" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/layout_dropdown_protocol" /> - - - + - + + + - + android:hint="@string/username" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/layout_auth_type"> - + + - - + android:hint="@string/password" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/text_layout_username"> - + + - - - - - + + + + - + android:text="@string/section_advanced" + android:textAppearance="@style/TextAppearance.Material3.TitleMedium" + android:layout_marginTop="20dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/text_layout_certificate" /> - - - - - - - - - + + + + + + + + +