Fix various bottom sheet scroll but off bugs.

This commit is contained in:
Cody Henthorne 2021-11-22 16:15:17 -05:00 committed by Greyson Parrelli
parent d2b8a17723
commit bf874e17e5
4 changed files with 155 additions and 136 deletions

View file

@ -22,9 +22,12 @@
android:layout_marginTop="20dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/handle" />
app:layout_constraintTop_toBottomOf="@id/handle"
app:layout_constraintVertical_bias="0" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/boost1_animation"

View file

@ -22,7 +22,10 @@
android:layout_marginTop="20dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/handle" />
app:layout_constraintTop_toBottomOf="@id/handle"
app:layout_constraintVertical_bias="0" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -33,6 +33,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:layout_constraintTop_toBottomOf="@id/show_admin_title"/>
app:layout_constraintVertical_bias="0"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/show_admin_title" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,35 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp">
android:orientation="vertical">
<ImageView
android:id="@+id/thanks_bottom_sheet_handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:importantForAccessibility="no"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/bottom_sheet_handle" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="16dp">
<TextView
android:id="@+id/thanks_bottom_sheet_heading"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dsl_settings_gutter"
android:layout_marginTop="20dp"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:gravity="center"
android:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__thanks_for_your_support"
android:textAppearance="@style/TextAppearance.Signal.Title2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_handle" />
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/thanks_bottom_sheet_subhead"
@ -43,7 +51,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_heading"
tools:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_s_badge_help_signal" />
tools:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__thanks_for_your_support" />
<org.thoughtcrime.securesms.badges.BadgeImageView
android:id="@+id/thanks_bottom_sheet_badge"
@ -148,4 +156,6 @@
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_featured_note"
app:layout_goneMarginTop="36dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>