mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Merge branch 'develop' into feature/Button_Block_Autofill
This commit is contained in:
@@ -33,7 +33,6 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
|
|||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace font by monospace, must be called after seText()
|
* Replace font by monospace, must be called after seText()
|
||||||
@@ -93,14 +92,17 @@ fun Toolbar.collapse(animate: Boolean = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Toolbar.expand(animate: Boolean = true) {
|
fun Toolbar.expand(animate: Boolean = true) {
|
||||||
visibility = View.VISIBLE
|
|
||||||
val actionBarHeight = layoutParams.height
|
val actionBarHeight = layoutParams.height
|
||||||
|
layoutParams.height = 0
|
||||||
val slideAnimator = ValueAnimator
|
val slideAnimator = ValueAnimator
|
||||||
.ofInt(0, actionBarHeight)
|
.ofInt(0, actionBarHeight)
|
||||||
if (animate)
|
if (animate)
|
||||||
slideAnimator.duration = 300L
|
slideAnimator.duration = 300L
|
||||||
slideAnimator.addUpdateListener { animation ->
|
slideAnimator.addUpdateListener { animation ->
|
||||||
layoutParams.height = animation.animatedValue as Int
|
layoutParams.height = animation.animatedValue as Int
|
||||||
|
if (layoutParams.height >= 1) {
|
||||||
|
visibility = View.VISIBLE
|
||||||
|
}
|
||||||
requestLayout()
|
requestLayout()
|
||||||
}
|
}
|
||||||
AnimatorSet().apply {
|
AnimatorSet().apply {
|
||||||
|
|||||||
Reference in New Issue
Block a user