diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/boost/BoostAnimation.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/boost/BoostAnimation.kt deleted file mode 100644 index 78476855eb..0000000000 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/boost/BoostAnimation.kt +++ /dev/null @@ -1,45 +0,0 @@ -package org.thoughtcrime.securesms.components.settings.app.subscription.boost - -import android.animation.Animator -import android.view.View -import com.airbnb.lottie.LottieAnimationView -import com.airbnb.lottie.LottieDrawable -import org.thoughtcrime.securesms.R -import org.thoughtcrime.securesms.animation.AnimationCompleteListener -import org.thoughtcrime.securesms.components.settings.PreferenceModel -import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory -import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter -import org.thoughtcrime.securesms.util.adapter.mapping.MappingViewHolder - -/** - * A simple mapping model to show a boost animation. - */ -object BoostAnimation { - - class Model : PreferenceModel(isEnabled = true) { - override fun areItemsTheSame(newItem: Model): Boolean = true - } - - class ViewHolder(itemView: View) : MappingViewHolder(itemView) { - - private val lottie: LottieAnimationView = findViewById(R.id.boost_animation_view) - - override fun bind(model: Model) { - lottie.playAnimation() - lottie.addAnimatorListener(object : AnimationCompleteListener() { - override fun onAnimationEnd(animation: Animator?) { - lottie.removeAnimatorListener(this) - lottie.setMinAndMaxFrame(30, 91) - lottie.repeatMode = LottieDrawable.RESTART - lottie.repeatCount = LottieDrawable.INFINITE - lottie.frame = 30 - lottie.playAnimation() - } - }) - } - } - - fun register(adapter: MappingAdapter) { - adapter.registerFactory(Model::class.java, LayoutFactory({ ViewHolder(it) }, R.layout.boost_animation_pref)) - } -} diff --git a/app/src/main/res/layout/boost_animation_pref.xml b/app/src/main/res/layout/boost_animation_pref.xml deleted file mode 100644 index e825c381b8..0000000000 --- a/app/src/main/res/layout/boost_animation_pref.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/boost_preference.xml b/app/src/main/res/layout/boost_preference.xml index 1d3d3524bc..23a60e761d 100644 --- a/app/src/main/res/layout/boost_preference.xml +++ b/app/src/main/res/layout/boost_preference.xml @@ -13,7 +13,7 @@ android:id="@+id/boost_1" style="@style/Signal.Widget.Button.Large.Secondary" android:layout_width="0dp" - android:layout_height="48sp" + android:layout_height="58sp" android:textAppearance="@style/Signal.Text.Body" android:textColor="@color/signal_text_primary" app:backgroundTint="@color/signal_selectable_button_background_tint" @@ -29,7 +29,7 @@ android:id="@+id/boost_2" style="@style/Signal.Widget.Button.Large.Secondary" android:layout_width="0dp" - android:layout_height="48sp" + android:layout_height="58sp" android:layout_marginStart="10dp" android:layout_marginEnd="10dp" android:textAppearance="@style/Signal.Text.Body" @@ -47,7 +47,7 @@ android:id="@+id/boost_3" style="@style/Signal.Widget.Button.Large.Secondary" android:layout_width="0dp" - android:layout_height="48sp" + android:layout_height="58sp" android:textAppearance="@style/Signal.Text.Body" android:textColor="@color/signal_text_primary" app:backgroundTint="@color/signal_selectable_button_background_tint" @@ -63,7 +63,7 @@ android:id="@+id/boost_4" style="@style/Signal.Widget.Button.Large.Secondary" android:layout_width="0dp" - android:layout_height="48sp" + android:layout_height="58sp" android:layout_marginTop="19dp" android:textAppearance="@style/Signal.Text.Body" android:textColor="@color/signal_text_primary" @@ -80,7 +80,7 @@ android:id="@+id/boost_5" style="@style/Signal.Widget.Button.Large.Secondary" android:layout_width="0dp" - android:layout_height="48sp" + android:layout_height="58sp" android:layout_marginStart="10dp" android:layout_marginTop="19dp" android:layout_marginEnd="10dp" @@ -99,7 +99,7 @@ android:id="@+id/boost_6" style="@style/Signal.Widget.Button.Large.Secondary" android:layout_width="0dp" - android:layout_height="48sp" + android:layout_height="58sp" android:layout_marginTop="19dp" android:gravity="center" android:textAppearance="@style/Signal.Text.Body" @@ -116,7 +116,7 @@