opt
This commit is contained in:
@@ -36,5 +36,13 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!--转向灯和刹车-->
|
||||
<receiver android:name="com.mogo.eagle.core.function.hmi.receiver.TurnLightBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.hmi.turnlight" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.mogo.eagle.core.function.hmi.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
|
||||
/**
|
||||
* 转向灯,刹车
|
||||
*
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class TurnLightBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "TurnLightBroadcastReceiver"
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
try {
|
||||
val type = intent.getIntExtra("type", 0)
|
||||
val lightInt = intent.getIntExtra("light", 0)
|
||||
Logger.d("liyz", "TurnLightBroadcastReceiver type = $type ---- lightInt = $lightInt")
|
||||
showTurnLight(type, lightInt)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun showTurnLight( //type 1,转向灯,2刹车
|
||||
type: Int,
|
||||
lightInt: Int
|
||||
) {
|
||||
if (type == 1) {
|
||||
showTurnLight(lightInt) //设置转向灯
|
||||
} else if (type == 2) {
|
||||
showBrakeLight(lightInt) //设置刹车信息
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,6 @@ import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeNormalBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotAndCheckView
|
||||
import com.mogo.eagle.core.function.hmi.ui.turnlight.BrakeView
|
||||
import com.mogo.eagle.core.function.hmi.ui.turnlight.TurnLightView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
@@ -642,8 +640,9 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
* 显示转向灯效果 TODO
|
||||
*/
|
||||
override fun showTurnLight(light: Int) {
|
||||
Logger.d("liyz", "hmiFragment showTurnLight --- light = $light")
|
||||
// turnLightView?.visibility = View.VISIBLE
|
||||
// turnLightView.setTurnLight(light)
|
||||
turnLightView.setTurnLight(light)
|
||||
|
||||
}
|
||||
|
||||
@@ -651,8 +650,9 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
* 显示刹车效果
|
||||
*/
|
||||
override fun showBrakeLight(light: Int) {
|
||||
Logger.d("liyz", "hmiFragment showBrakeLight --- light = $light")
|
||||
// brakeView?.visibility = View.VISIBLE
|
||||
// brakeView.setBrakeLight(light)
|
||||
brakeView.setBrakeLight(light)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.turnlight;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 刹车
|
||||
* @since: 1/26/22
|
||||
*/
|
||||
public class BrakeView extends ConstraintLayout {
|
||||
|
||||
private LinearLayout brakeLayout;
|
||||
private ImageView imageBrake;
|
||||
private TextView tvBrake;
|
||||
private Context mContext;
|
||||
|
||||
public BrakeView(@NonNull Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
LayoutInflater.from(context).inflate(R.layout.view_brake_light, this);
|
||||
initView();
|
||||
}
|
||||
|
||||
public BrakeView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public BrakeView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public BrakeView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public void initView() {
|
||||
brakeLayout = findViewById(R.id.layout_brake);
|
||||
imageBrake = findViewById(R.id.image_brake);
|
||||
tvBrake = findViewById(R.id.tv_brake);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刹车动画
|
||||
*/
|
||||
public void setBrakeLight(int brakeLight) {
|
||||
AlphaAnimation appearAnimation = new AlphaAnimation(0, 1f);
|
||||
appearAnimation.setDuration(300);
|
||||
|
||||
brakeLayout.startAnimation(appearAnimation);
|
||||
imageBrake.startAnimation(appearAnimation);
|
||||
tvBrake.startAnimation(appearAnimation);
|
||||
brakeLayout.setVisibility(View.VISIBLE);
|
||||
imageBrake.setVisibility(View.VISIBLE);
|
||||
tvBrake.setVisibility(View.VISIBLE);
|
||||
|
||||
if (brakeLight == 1) { //TODO 暂时还不知道数据
|
||||
|
||||
} else { //不踩刹车,就消失
|
||||
AlphaAnimation disappearAnimation = new AlphaAnimation(1, 0);
|
||||
disappearAnimation.setDuration(300);
|
||||
|
||||
scaleImageAndTv();
|
||||
|
||||
brakeLayout.startAnimation(disappearAnimation);
|
||||
imageBrake.startAnimation(disappearAnimation);
|
||||
tvBrake.startAnimation(disappearAnimation);
|
||||
brakeLayout.setVisibility(View.GONE);
|
||||
imageBrake.setVisibility(View.GONE);
|
||||
tvBrake.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void scaleImageAndTv() {
|
||||
AnimatorSet animatorSuofang = new AnimatorSet();//组合动画
|
||||
ObjectAnimator scaleX = ObjectAnimator.ofFloat(imageBrake, "scaleX", 1f, 1.3f);
|
||||
ObjectAnimator scaleY = ObjectAnimator.ofFloat(imageBrake, "scaleY", 1f, 1.3f);
|
||||
animatorSuofang.setDuration(200);
|
||||
animatorSuofang.setInterpolator(new DecelerateInterpolator());
|
||||
animatorSuofang.play(scaleX).with(scaleY);
|
||||
animatorSuofang.start();
|
||||
|
||||
ObjectAnimator scaleXTv = ObjectAnimator.ofFloat(tvBrake, "scaleX", 1f, 1.3f);
|
||||
ObjectAnimator scaleYTv = ObjectAnimator.ofFloat(tvBrake, "scaleY", 1f, 1.3f);
|
||||
animatorSuofang.setDuration(200);
|
||||
animatorSuofang.setInterpolator(new DecelerateInterpolator());
|
||||
animatorSuofang.play(scaleXTv).with(scaleYTv);
|
||||
animatorSuofang.start();
|
||||
}
|
||||
|
||||
private void stopAnimate() {
|
||||
tvBrake.clearAnimation();
|
||||
imageBrake.clearAnimation();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.turnlight
|
||||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_brake_light_status.view.*
|
||||
|
||||
/**
|
||||
* @description
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2022/1/10
|
||||
*/
|
||||
class BrakeViewStatus @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_brake_light_status, this, true)
|
||||
}
|
||||
|
||||
/**
|
||||
* 刹车动画
|
||||
*/
|
||||
fun setBrakeLight(brakeLight: Int) {
|
||||
if (brakeLight == 1) { //TODO 暂时还不知道数据,如果一直猜会怎样?
|
||||
var appearAnimation = AlphaAnimation(0f, 1f)
|
||||
appearAnimation.duration = 300
|
||||
layout_brake.startAnimation(appearAnimation)
|
||||
image_brake.startAnimation(appearAnimation)
|
||||
tv_brake.startAnimation(appearAnimation)
|
||||
layout_brake.visibility = View.VISIBLE
|
||||
image_brake.visibility = View.VISIBLE
|
||||
tv_brake.visibility = View.VISIBLE
|
||||
|
||||
} else { //不踩刹车,就消失
|
||||
var disappearAnimation = AlphaAnimation(1f, 0f)
|
||||
disappearAnimation.duration = 300
|
||||
scaleImageAndTv()
|
||||
layout_brake.startAnimation(disappearAnimation)
|
||||
image_brake.startAnimation(disappearAnimation)
|
||||
tv_brake.startAnimation(disappearAnimation)
|
||||
layout_brake.visibility = View.GONE
|
||||
image_brake.visibility = View.GONE
|
||||
tv_brake.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun scaleImageAndTv() {
|
||||
val animatorSuofang = AnimatorSet() //组合动画
|
||||
val scaleX = ObjectAnimator.ofFloat(image_brake, "scaleX", 1f, 1.3f)
|
||||
val scaleY = ObjectAnimator.ofFloat(image_brake, "scaleY", 1f, 1.3f)
|
||||
animatorSuofang.duration = 200
|
||||
animatorSuofang.interpolator = DecelerateInterpolator()
|
||||
animatorSuofang.play(scaleX).with(scaleY)
|
||||
animatorSuofang.start()
|
||||
val scaleXTv = ObjectAnimator.ofFloat(tv_brake, "scaleX", 1f, 1.3f)
|
||||
val scaleYTv = ObjectAnimator.ofFloat(tv_brake, "scaleY", 1f, 1.3f)
|
||||
animatorSuofang.duration = 200
|
||||
animatorSuofang.interpolator = DecelerateInterpolator()
|
||||
animatorSuofang.play(scaleXTv).with(scaleYTv)
|
||||
animatorSuofang.start()
|
||||
}
|
||||
|
||||
private fun stopAnimate() {
|
||||
tv_brake.clearAnimation()
|
||||
image_brake.clearAnimation()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.turnlight;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 顶部转向灯
|
||||
* @since: 1/26/22
|
||||
*/
|
||||
public class TurnLightView extends ConstraintLayout {
|
||||
|
||||
private FrameLayout mTurnLightBgLayout;
|
||||
private ImageView mLeftNormalImage, mLeftSelectImage;
|
||||
private ImageView mRightNormalImage, mRightSelectImage;
|
||||
private Context mContext;
|
||||
|
||||
public TurnLightView(@NonNull Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
LayoutInflater.from(context).inflate(R.layout.view_turn_light, this);
|
||||
initView();
|
||||
}
|
||||
|
||||
public TurnLightView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public TurnLightView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public TurnLightView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public void initView() {
|
||||
mTurnLightBgLayout = findViewById(R.id.turn_light_layout);
|
||||
mLeftNormalImage = findViewById(R.id.left_nor_image);
|
||||
mLeftSelectImage = findViewById(R.id.left_select_image);
|
||||
mRightNormalImage = findViewById(R.id.right_nor_image);
|
||||
mRightSelectImage = findViewById(R.id.right_select_image);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转向灯动画
|
||||
*/
|
||||
public void setTurnLight(int directionLight) {
|
||||
//显示背景
|
||||
AlphaAnimation appearAnimation = new AlphaAnimation(0, 1f);
|
||||
appearAnimation.setDuration(600);
|
||||
|
||||
AlphaAnimation appearAnimationImage = new AlphaAnimation(0, 1f);
|
||||
appearAnimation.setDuration(900);
|
||||
|
||||
mTurnLightBgLayout.startAnimation(appearAnimation);
|
||||
mLeftNormalImage.startAnimation(appearAnimationImage);
|
||||
mRightNormalImage.startAnimation(appearAnimationImage);
|
||||
mTurnLightBgLayout.setVisibility(View.VISIBLE);
|
||||
mLeftNormalImage.setVisibility(View.VISIBLE);
|
||||
mRightNormalImage.setVisibility(View.VISIBLE);
|
||||
|
||||
//根据左右进行显示和隐藏,实际要判断每个来的时间和频度 TODO
|
||||
if (directionLight == 1) { //左转向
|
||||
mLeftSelectImage.setVisibility(View.VISIBLE);
|
||||
mRightSelectImage.setVisibility(View.GONE);
|
||||
setAnimation(mLeftSelectImage);
|
||||
} else if (directionLight == 2) { //右转向
|
||||
mLeftSelectImage.setVisibility(View.GONE);
|
||||
mRightSelectImage.setVisibility(View.VISIBLE);
|
||||
setAnimation(mRightSelectImage);
|
||||
} else { //消失
|
||||
animationDisappear();
|
||||
}
|
||||
}
|
||||
|
||||
//消失动画,当转向等数据为空时候
|
||||
private void animationDisappear() {
|
||||
mLeftSelectImage.setVisibility(View.GONE);
|
||||
mRightSelectImage.setVisibility(View.GONE);
|
||||
|
||||
AlphaAnimation disappearAnimationLeft = new AlphaAnimation(1, 0);
|
||||
disappearAnimationLeft.setDuration(150);
|
||||
AlphaAnimation disappearAnimationBg = new AlphaAnimation(1, 0);
|
||||
disappearAnimationBg.setDuration(900);
|
||||
|
||||
mTurnLightBgLayout.startAnimation(disappearAnimationBg);
|
||||
mLeftNormalImage.startAnimation(disappearAnimationLeft);
|
||||
mRightNormalImage.startAnimation(disappearAnimationLeft);
|
||||
mTurnLightBgLayout.setVisibility(View.GONE);
|
||||
mLeftNormalImage.setVisibility(View.GONE);
|
||||
mRightNormalImage.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//实现图片闪烁效果
|
||||
private void setAnimation(ImageView imageView) {
|
||||
AlphaAnimation animation = new AlphaAnimation(1, 0);
|
||||
|
||||
animation.setDuration(800);
|
||||
animation.setInterpolator(new LinearInterpolator());
|
||||
animation.setRepeatCount(Animation.INFINITE);
|
||||
animation.setRepeatMode(Animation.REVERSE);
|
||||
imageView.startAnimation(animation);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.turnlight
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_turn_light_status.view.*
|
||||
|
||||
/**
|
||||
* @description
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2022/1/10
|
||||
*/
|
||||
class TurnLightViewStatus @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true)
|
||||
}
|
||||
|
||||
/**
|
||||
* 转向灯动画
|
||||
*/
|
||||
fun setTurnLight(directionLight: Int) {
|
||||
//显示背景
|
||||
val appearAnimation = AlphaAnimation(0f, 1.0f)
|
||||
appearAnimation.duration = 600
|
||||
val appearAnimationImage = AlphaAnimation(0f, 1.0f)
|
||||
appearAnimation.duration = 900
|
||||
turn_light_layout.startAnimation(appearAnimation)
|
||||
left_nor_image.startAnimation(appearAnimationImage)
|
||||
right_nor_image.startAnimation(appearAnimationImage)
|
||||
|
||||
turn_light_layout.visibility = View.VISIBLE
|
||||
left_nor_image.visibility = View.VISIBLE
|
||||
right_nor_image.visibility = View.VISIBLE
|
||||
|
||||
//根据左右进行显示和隐藏,实际要判断每个来的时间和频度 TODO
|
||||
Log.d("liyz", "directionLight = $directionLight")
|
||||
if (directionLight == 1) { //左转向
|
||||
left_select_image.visibility = View.VISIBLE
|
||||
right_select_image.visibility = View.GONE
|
||||
setAnimation(left_select_image)
|
||||
} else if (directionLight == 2) { //右转向
|
||||
left_select_image.visibility = View.GONE
|
||||
right_select_image.visibility = View.VISIBLE
|
||||
setAnimation(right_select_image)
|
||||
} else { //消失
|
||||
animationDisappear()
|
||||
stopAnimate()
|
||||
}
|
||||
}
|
||||
|
||||
//消失动画,当转向等数据为空时候
|
||||
private fun animationDisappear() {
|
||||
left_select_image.visibility = View.GONE
|
||||
right_select_image.visibility = View.GONE
|
||||
val disappearAnimationLeft = AlphaAnimation(1.0f, 0f)
|
||||
disappearAnimationLeft.duration = 150
|
||||
val disappearAnimationBg = AlphaAnimation(1.0f, 0f)
|
||||
disappearAnimationBg.duration = 900
|
||||
turn_light_layout.startAnimation(disappearAnimationBg)
|
||||
left_nor_image.startAnimation(disappearAnimationLeft)
|
||||
right_nor_image.startAnimation(disappearAnimationLeft)
|
||||
|
||||
turn_light_layout.visibility = View.GONE
|
||||
left_nor_image.visibility = View.GONE
|
||||
right_nor_image.visibility = View.GONE
|
||||
}
|
||||
|
||||
//实现图片闪烁效果
|
||||
private fun setAnimation(imageView: ImageView) {
|
||||
val animation = AlphaAnimation(1.0f, 0f)
|
||||
animation.duration = 800
|
||||
animation.interpolator = LinearInterpolator()
|
||||
animation.repeatCount = Animation.INFINITE
|
||||
animation.repeatMode = Animation.REVERSE
|
||||
imageView.startAnimation(animation)
|
||||
}
|
||||
|
||||
private fun stopAnimate() {
|
||||
left_select_image.clearAnimation()
|
||||
right_select_image.clearAnimation()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -128,24 +128,20 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--左右转向灯-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.turnlight.TurnLightView
|
||||
<com.mogo.eagle.core.function.hmi.ui.turnlight.TurnLightViewStatus
|
||||
android:id="@+id/turnLightView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="42px" />
|
||||
|
||||
<!--刹车ui-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.turnlight.BrakeView
|
||||
<com.mogo.eagle.core.function.hmi.ui.turnlight.BrakeViewStatus
|
||||
android:id="@+id/brakeView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible"
|
||||
android:background="#ffffff"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/layout_brake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_marginBottom="20px"
|
||||
android:background="@drawable/module_blank_nor"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_brake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/module_light_nor"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brake"
|
||||
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:visibility="visible" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_brake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/module_blank_nor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_brake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/module_light_nor"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brake"
|
||||
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:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/image_brake"
|
||||
app:layout_constraintTop_toTopOf="@+id/image_brake" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/turn_light_layout"
|
||||
android:background="@drawable/module_turn_light_bg"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginTop="220px"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_nor_image"
|
||||
android:src="@drawable/module_arrow_left_nor"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="15px"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_nor_image"
|
||||
android:src="@drawable/module_arrow_right_nor"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="15px"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_select_image"
|
||||
android:src="@drawable/module_arrow_left_select_nor"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="15px"
|
||||
android:layout_marginTop="3px"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_select_image"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/module_arrow_right_select_nor"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="15px"
|
||||
android:layout_marginTop="3px"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/turn_light_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:background="@drawable/module_turn_light_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_nor_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="15px"
|
||||
android:src="@drawable/module_arrow_left_nor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_nor_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="15px"
|
||||
android:src="@drawable/module_arrow_right_nor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_select_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="15px"
|
||||
android:layout_marginTop="3px"
|
||||
android:src="@drawable/module_arrow_left_select_nor"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_select_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginTop="3px"
|
||||
android:layout_marginRight="15px"
|
||||
android:src="@drawable/module_arrow_right_select_nor"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user