kopia lustrzana https://github.com/ryukoposting/Signal-Android
Update design for the donation thanks dialog.
rodzic
4e8208c468
commit
0ff4175538
|
@ -51,7 +51,6 @@ class ThanksForYourSupportBottomSheetDialogFragment : FixedRoundedCornerBottomSh
|
||||||
|
|
||||||
val badgeView: BadgeImageView = view.findViewById(R.id.thanks_bottom_sheet_badge)
|
val badgeView: BadgeImageView = view.findViewById(R.id.thanks_bottom_sheet_badge)
|
||||||
val lottie: LottieAnimationView = view.findViewById(R.id.thanks_bottom_sheet_lottie)
|
val lottie: LottieAnimationView = view.findViewById(R.id.thanks_bottom_sheet_lottie)
|
||||||
val badgeName: TextView = view.findViewById(R.id.thanks_bottom_sheet_badge_name)
|
|
||||||
val done: MaterialButton = view.findViewById(R.id.thanks_bottom_sheet_done)
|
val done: MaterialButton = view.findViewById(R.id.thanks_bottom_sheet_done)
|
||||||
val controlText: TextView = view.findViewById(R.id.thanks_bottom_sheet_control_text)
|
val controlText: TextView = view.findViewById(R.id.thanks_bottom_sheet_control_text)
|
||||||
val controlNote: View = view.findViewById(R.id.thanks_bottom_sheet_featured_note)
|
val controlNote: View = view.findViewById(R.id.thanks_bottom_sheet_featured_note)
|
||||||
|
@ -63,7 +62,6 @@ class ThanksForYourSupportBottomSheetDialogFragment : FixedRoundedCornerBottomSh
|
||||||
val args = ThanksForYourSupportBottomSheetDialogFragmentArgs.fromBundle(requireArguments())
|
val args = ThanksForYourSupportBottomSheetDialogFragmentArgs.fromBundle(requireArguments())
|
||||||
|
|
||||||
badgeView.setBadge(args.badge)
|
badgeView.setBadge(args.badge)
|
||||||
badgeName.text = args.badge.name
|
|
||||||
|
|
||||||
if (args.badge.isBoost()) {
|
if (args.badge.isBoost()) {
|
||||||
if (Recipient.self().badges.any { !it.isBoost() }) {
|
if (Recipient.self().badges.any { !it.isBoost() }) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout 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:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:viewBindingIgnore="true"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/thanks_bottom_sheet_handle"
|
android:id="@+id/thanks_bottom_sheet_handle"
|
||||||
|
@ -32,23 +32,25 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__thanks_for_your_support"
|
android:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__thanks_for_your_support"
|
||||||
android:textAppearance="@style/TextAppearance.Signal.Title2"
|
android:textAppearance="@style/Signal.Text.TitleLarge"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_badge" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/thanks_bottom_sheet_subhead"
|
android:id="@+id/thanks_bottom_sheet_subhead"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="6dp"
|
||||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textAppearance="@style/Signal.Text.Body"
|
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||||
|
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_heading"
|
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_heading"
|
||||||
|
@ -62,7 +64,7 @@
|
||||||
app:badge_size="xlarge"
|
app:badge_size="xlarge"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_subhead"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/test_gradient" />
|
tools:src="@drawable/test_gradient" />
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
<com.airbnb.lottie.LottieAnimationView
|
||||||
|
@ -75,20 +77,6 @@
|
||||||
app:layout_constraintTop_toTopOf="@id/thanks_bottom_sheet_badge"
|
app:layout_constraintTop_toTopOf="@id/thanks_bottom_sheet_badge"
|
||||||
app:lottie_rawRes="@raw/lottie_rocket" />
|
app:lottie_rawRes="@raw/lottie_rocket" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/thanks_bottom_sheet_badge_name"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textAppearance="@style/TextAppearance.Signal.Title2"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_badge"
|
|
||||||
tools:text="Signal Meteor" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/thanks_bottom_sheet_control_outline"
|
android:id="@+id/thanks_bottom_sheet_control_outline"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -104,7 +92,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="48sp"
|
android:layout_height="48sp"
|
||||||
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="36dp"
|
||||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
|
@ -114,7 +102,7 @@
|
||||||
app:layout_constraintEnd_toStartOf="@id/thanks_bottom_sheet_switch"
|
app:layout_constraintEnd_toStartOf="@id/thanks_bottom_sheet_switch"
|
||||||
app:layout_constraintHorizontal_chainStyle="spread"
|
app:layout_constraintHorizontal_chainStyle="spread"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_badge_name" />
|
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_subhead" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/thanks_bottom_sheet_switch"
|
android:id="@+id/thanks_bottom_sheet_switch"
|
||||||
|
@ -136,8 +124,8 @@
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="40dp"
|
android:layout_marginEnd="40dp"
|
||||||
android:text="@string/ThanksForYourSupportBottomSheetFragment__when_you_have_more"
|
android:text="@string/ThanksForYourSupportBottomSheetFragment__when_you_have_more"
|
||||||
android:textAppearance="@style/Signal.Text.Caption"
|
android:textAppearance="@style/Signal.Text.BodyMedium"
|
||||||
android:textColor="@color/signal_text_secondary"
|
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_control_outline"
|
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_control_outline"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
@ -148,14 +136,14 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="48sp"
|
android:layout_height="48sp"
|
||||||
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="48dp"
|
||||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__done"
|
android:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__continue"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_featured_note"
|
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_featured_note"
|
||||||
app:layout_goneMarginTop="36dp" />
|
app:layout_goneMarginTop="72dp" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
|
@ -4505,7 +4505,7 @@
|
||||||
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__become_a_montly_sustainer">become a monthly Sustainer.</string>
|
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__become_a_montly_sustainer">become a monthly Sustainer.</string>
|
||||||
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__display_on_profile">Display on Profile</string>
|
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__display_on_profile">Display on Profile</string>
|
||||||
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__make_featured_badge">Make featured badge</string>
|
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__make_featured_badge">Make featured badge</string>
|
||||||
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__done">Done</string>
|
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__continue">Continue</string>
|
||||||
<string name="ThanksForYourSupportBottomSheetFragment__when_you_have_more">When you have more than one badge, you can choose one to feature for others to see on your profile.</string>
|
<string name="ThanksForYourSupportBottomSheetFragment__when_you_have_more">When you have more than one badge, you can choose one to feature for others to see on your profile.</string>
|
||||||
|
|
||||||
<string name="BecomeASustainerFragment__get_badges">Get badges for your profile by supporting Signal.</string>
|
<string name="BecomeASustainerFragment__get_badges">Get badges for your profile by supporting Signal.</string>
|
||||||
|
|
Ładowanie…
Reference in New Issue