mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Add vertical translation to the bottom actionbar animation.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package org.thoughtcrime.securesms.components.menu
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
|
||||
/**
|
||||
* Represents an action to be rendered via [SignalContextMenu] or [SignalBottomActionBar]
|
||||
|
||||
@@ -6,9 +6,12 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.AnimationUtils
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.interpolator.view.animation.FastOutSlowInInterpolator
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.util.ViewUtil
|
||||
|
||||
@@ -22,6 +25,20 @@ class SignalBottomActionBar(context: Context, attributeSet: AttributeSet) : Line
|
||||
|
||||
val items: MutableList<ActionItem> = mutableListOf()
|
||||
|
||||
val enterAnimation: Animation by lazy {
|
||||
AnimationUtils.loadAnimation(context, R.anim.slide_fade_from_bottom).apply {
|
||||
duration = 250
|
||||
interpolator = FastOutSlowInInterpolator()
|
||||
}
|
||||
}
|
||||
|
||||
val exitAnimation: Animation by lazy {
|
||||
AnimationUtils.loadAnimation(context, R.anim.slide_fade_to_bottom).apply {
|
||||
duration = 250
|
||||
interpolator = FastOutSlowInInterpolator()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
orientation = HORIZONTAL
|
||||
setBackgroundResource(R.drawable.signal_bottom_action_bar_background)
|
||||
|
||||
Reference in New Issue
Block a user