opt ui
This commit is contained in:
@@ -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?) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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" />
|
||||
</FrameLayout>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<dimen name="dp_1066">1066px</dimen>
|
||||
|
||||
<dimen name="turnlight_bg_corner">60px</dimen>
|
||||
<dimen name="turnlight_width">270px</dimen>
|
||||
<dimen name="turnlight_width">275px</dimen>
|
||||
<dimen name="turnlight_height">120px</dimen>
|
||||
<dimen name="brakelight_width">460px</dimen>
|
||||
<dimen name="brakelight_height">120px</dimen>
|
||||
|
||||
Reference in New Issue
Block a user