ui: change materialfader anim sepcs
Probably a little more in-line w/the docs.
This commit is contained in:
parent
89110c2798
commit
bd685f1f9c
3 changed files with 8 additions and 8 deletions
|
@ -111,7 +111,7 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
}
|
||||
}
|
||||
|
||||
private val fader = MaterialFader.forSmallComponent(context)
|
||||
private val fader = MaterialFader.quickLopsided(context)
|
||||
private var thumbAnimator: Animator? = null
|
||||
private var popupAnimator: Animator? = null
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
private val selectionBadge: ImageView?
|
||||
private val iconSize: Int?
|
||||
|
||||
private val fader = MaterialFader.forSmallComponent(context)
|
||||
private val fader = MaterialFader.quickLopsided(context)
|
||||
private var fadeAnimator: Animator? = null
|
||||
private val indicatorMatrix = Matrix()
|
||||
private val indicatorMatrixSrc = RectF()
|
||||
|
|
|
@ -163,7 +163,7 @@ private constructor(
|
|||
}
|
||||
|
||||
companion object {
|
||||
fun forSmallComponent(context: Context) =
|
||||
fun quickLopsided(context: Context) =
|
||||
MaterialFader(
|
||||
context,
|
||||
0.6f,
|
||||
|
@ -174,21 +174,21 @@ private constructor(
|
|||
AnimConfig.SHORT1,
|
||||
AnimConfig.MEDIUM3)
|
||||
|
||||
fun forLargeComponent(context: Context) =
|
||||
fun symmetric(context: Context) =
|
||||
MaterialFader(
|
||||
context,
|
||||
0.9f,
|
||||
AnimConfig.EMPHASIZED_ACCELERATE,
|
||||
AnimConfig.SHORT3,
|
||||
AnimConfig.MEDIUM1,
|
||||
AnimConfig.EMPHASIZED,
|
||||
AnimConfig.LONG2,
|
||||
AnimConfig.LONG2)
|
||||
AnimConfig.EMPHASIZED_DECELERATE,
|
||||
AnimConfig.SHORT3,
|
||||
AnimConfig.MEDIUM1)
|
||||
}
|
||||
}
|
||||
|
||||
class MaterialFlipper(context: Context) {
|
||||
private val fader = MaterialFader.forLargeComponent(context)
|
||||
private val fader = MaterialFader.symmetric(context)
|
||||
|
||||
fun jump(from: View) {
|
||||
fader.jumpToFadeOut(from)
|
||||
|
|
Loading…
Reference in a new issue