mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 19:15:58 +00:00
optimize bezier curve, disable lint
This commit is contained in:
@@ -15,6 +15,8 @@ android {
|
|||||||
namespace = "com.bintianqi.owndroid"
|
namespace = "com.bintianqi.owndroid"
|
||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
|
|
||||||
|
lint.checkReleaseBuilds = false
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.bintianqi.owndroid"
|
applicationId = "com.bintianqi.owndroid"
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ object Animations{
|
|||||||
private const val INITIAL_OFFSET_VALUE = 96
|
private const val INITIAL_OFFSET_VALUE = 96
|
||||||
private const val TARGET_OFFSET_VALUE = 96
|
private const val TARGET_OFFSET_VALUE = 96
|
||||||
|
|
||||||
private val bezier = CubicBezierEasing(0.4f, 0f, 0f, 1f)
|
private val bezier = CubicBezierEasing(0.20f, 0.85f, 0.0f, 1f)
|
||||||
|
|
||||||
private val tween: FiniteAnimationSpec<IntOffset> = tween(450, easing = bezier)
|
private val tween: FiniteAnimationSpec<IntOffset> = tween(durationMillis = 650, easing = bezier, delayMillis = 50)
|
||||||
|
|
||||||
val navHostEnterTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition = {
|
val navHostEnterTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition = {
|
||||||
fadeIn(tween(150, easing = LinearEasing)) +
|
fadeIn(tween(100, easing = LinearEasing)) +
|
||||||
slideIntoContainer(
|
slideIntoContainer(
|
||||||
animationSpec = tween,
|
animationSpec = tween,
|
||||||
towards = AnimatedContentTransitionScope.SlideDirection.End,
|
towards = AnimatedContentTransitionScope.SlideDirection.End,
|
||||||
@@ -23,7 +23,7 @@ object Animations{
|
|||||||
}
|
}
|
||||||
|
|
||||||
val navHostExitTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition = {
|
val navHostExitTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition = {
|
||||||
fadeOut(tween(83, easing = LinearEasing)) +
|
fadeOut(tween(100, easing = LinearEasing)) +
|
||||||
slideOutOfContainer(
|
slideOutOfContainer(
|
||||||
animationSpec = tween,
|
animationSpec = tween,
|
||||||
towards = AnimatedContentTransitionScope.SlideDirection.Start,
|
towards = AnimatedContentTransitionScope.SlideDirection.Start,
|
||||||
@@ -32,7 +32,7 @@ object Animations{
|
|||||||
}
|
}
|
||||||
|
|
||||||
val navHostPopEnterTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition = {
|
val navHostPopEnterTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition = {
|
||||||
fadeIn(tween(83, easing = LinearEasing)) +
|
fadeIn(tween(100, easing = LinearEasing)) +
|
||||||
slideIntoContainer(
|
slideIntoContainer(
|
||||||
animationSpec = tween,
|
animationSpec = tween,
|
||||||
towards = AnimatedContentTransitionScope.SlideDirection.End,
|
towards = AnimatedContentTransitionScope.SlideDirection.End,
|
||||||
@@ -41,7 +41,7 @@ object Animations{
|
|||||||
}
|
}
|
||||||
|
|
||||||
val navHostPopExitTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition = {
|
val navHostPopExitTransition: AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition = {
|
||||||
fadeOut(tween(83, easing = LinearEasing)) +
|
fadeOut(tween(100, easing = LinearEasing)) +
|
||||||
slideOutOfContainer(
|
slideOutOfContainer(
|
||||||
animationSpec = tween,
|
animationSpec = tween,
|
||||||
towards = AnimatedContentTransitionScope.SlideDirection.Start,
|
towards = AnimatedContentTransitionScope.SlideDirection.Start,
|
||||||
|
|||||||
Reference in New Issue
Block a user