From 1fef34ec4707c434f119313965712fe5eb572fef Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Fri, 8 Apr 2022 10:46:52 +0800 Subject: [PATCH] opt ui --- .../core/function/hmi/ui/turnlight/BrakeViewStatus.kt | 8 ++++---- .../core/function/hmi/ui/turnlight/TurnLightViewStatus.kt | 8 ++++---- .../src/main/res/layout/view_brake_light_status.xml | 5 ++--- .../src/main/res/layout/view_turn_light_status.xml | 8 ++++---- .../mogo-core-function-hmi/src/main/res/values/dimens.xml | 2 +- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt index 5324d03e61..d128c5e257 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt @@ -55,12 +55,12 @@ class BrakeViewStatus @JvmOverloads constructor( if (isBrake) { isBrake = false GlobalScope.launch(Dispatchers.Main) { - scaleImageAndTv() +// scaleImageAndTv() var disappearAnimation = AlphaAnimation(1f, 0f) - disappearAnimation.duration = 1200 + disappearAnimation.duration = 400 layout_brake.startAnimation(disappearAnimation) - image_brake.startAnimation(disappearAnimation) - tv_brake.startAnimation(disappearAnimation) +// image_brake.startAnimation(disappearAnimation) +// tv_brake.startAnimation(disappearAnimation) disappearAnimation.setAnimationListener(object : Animation.AnimationListener { override fun onAnimationRepeat(p0: Animation?) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt index 394e463161..de079bb6b6 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt @@ -107,9 +107,9 @@ class TurnLightViewStatus @JvmOverloads constructor( //显示背景 private fun showNormalAnimation() { val appearAnimation = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 600 + appearAnimation.duration = 300 val appearAnimationImage = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 1000 + appearAnimation.duration = 500 turn_light_layout.startAnimation(appearAnimation) left_nor_image.startAnimation(appearAnimationImage) right_nor_image.startAnimation(appearAnimationImage) @@ -134,7 +134,7 @@ class TurnLightViewStatus @JvmOverloads constructor( disappearAnimationLeft.duration = 300 val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 1200 + disappearAnimationBg.duration = 500 left_nor_image.startAnimation(disappearAnimationLeft) right_nor_image.startAnimation(disappearAnimationLeft) @@ -170,7 +170,7 @@ class TurnLightViewStatus @JvmOverloads constructor( //实现图片闪烁效果 private fun setAnimation(imageView: ImageView) { val animation = AlphaAnimation(1.0f, 0f) - animation.duration = 600 + animation.duration = 500 animation.interpolator = LinearInterpolator() animation.repeatCount = Animation.INFINITE animation.repeatMode = Animation.REVERSE diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_brake_light_status.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_brake_light_status.xml index 1f7c0fe29e..e5d39649e5 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_brake_light_status.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_brake_light_status.xml @@ -25,7 +25,7 @@ android:id="@+id/image_brake" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="110px" + android:layout_marginLeft="115px" android:layout_gravity="center_vertical" android:src="@drawable/module_light_nor" android:visibility="gone" @@ -37,10 +37,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginLeft="20px" android:text="刹车中" android:textColor="#ffffff" - android:textSize="45px" + android:textSize="40px" android:visibility="gone" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@+id/image_brake" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml index d2dd2a6052..4127b7d4f3 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml @@ -38,8 +38,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" - android:layout_marginLeft="10px" - android:layout_marginTop="5px" + android:layout_marginLeft="13px" + android:layout_marginTop="3px" android:src="@drawable/module_arrow_left_select_nor" android:visibility="gone" /> @@ -48,8 +48,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|center_vertical" - android:layout_marginTop="5px" - android:layout_marginRight="10px" + android:layout_marginTop="3px" + android:layout_marginRight="13px" android:src="@drawable/module_arrow_right_select_nor" android:visibility="gone" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml index 79e0076a1b..9283e77555 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml @@ -37,7 +37,7 @@ 1066px 60px - 270px + 275px 120px 460px 120px