Merge branch 'op' into dev_robotaxi-d-app-module_270_220510_2.7.0
This commit is contained in:
@@ -56,6 +56,7 @@ class CircularProgressView @JvmOverloads constructor(
|
||||
mProgPaint.isDither = true // 设置抖动
|
||||
mProgPaint.strokeWidth = typedArray.getDimension(R.styleable.CircularProgressView_progWidth, 10.0f)
|
||||
mProgPaint.color = typedArray.getColor(R.styleable.CircularProgressView_progColor, Color.BLUE)
|
||||
// mProgPaint.setPathEffect()
|
||||
// 初始化进度圆环渐变色
|
||||
val startColor = typedArray.getColor(R.styleable.CircularProgressView_progStartColor, -1)
|
||||
val firstColor = typedArray.getColor(R.styleable.CircularProgressView_progFirstColor, -1)
|
||||
@@ -64,8 +65,6 @@ class CircularProgressView @JvmOverloads constructor(
|
||||
} else {
|
||||
mColorArray = null
|
||||
}
|
||||
|
||||
|
||||
typedArray.recycle();
|
||||
}
|
||||
|
||||
@@ -102,6 +101,12 @@ class CircularProgressView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
fun setBlurMaskFilter(blur: BlurMaskFilter.Blur, radius: Float) {
|
||||
var blur: BlurMaskFilter = BlurMaskFilter(radius, blur)
|
||||
mProgPaint.setMaskFilter(blur)
|
||||
invalidate()
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前进度
|
||||
* @return 当前进度(0-100)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.BlurMaskFilter;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -75,13 +76,14 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
tapPositionView = findViewById(R.id.tap_position);
|
||||
steeringCircularV = findViewById(R.id.steering_circular);
|
||||
steeringCircularV.setBackWidth(8);
|
||||
steeringCircularV.setBackColor(R.color.hmi_light_blue_00);
|
||||
steeringCircularV.setBackColor(R.color.hmi_light_back_bg);
|
||||
steeringCircularV.setProgColor(R.color.hmi_light_blue, R.color.hmi_dark_blue);
|
||||
steeringCircularV.setProgress((int) (180 * 100) / 360, 1000);
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
steeringCircularVAlpha = findViewById(R.id.steering_circular_alpha);
|
||||
steeringCircularVAlpha.setAlpha(0.4f);
|
||||
steeringCircularVAlpha.setBackColor(R.color.hmi_light_blue_00);
|
||||
steeringCircularVAlpha.setBackWidth(12);
|
||||
steeringCircularVAlpha.setBlurMaskFilter(BlurMaskFilter.Blur.NORMAL, 12);
|
||||
steeringCircularVAlpha.setBackColor(R.color.hmi_clear_00);
|
||||
steeringCircularVAlpha.setProgColor(R.color.hmi_light_blue_alpha);
|
||||
steeringCircularVAlpha.setProgress((int) (180 * 100) / 360, 1000);
|
||||
}
|
||||
|
||||
@@ -17,20 +17,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--底层默认进度条,无进度值改变动作-->
|
||||
<ProgressBar
|
||||
android:id="@+id/blue_circle"
|
||||
android:layout_width="@dimen/dp_260"
|
||||
android:layout_height="@dimen/dp_260"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginLeft="@dimen/dp_85"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:layout_marginRight="@dimen/dp_85"
|
||||
android:indeterminateDrawable="@drawable/bg_steering_outer_taxi"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/steering_tv_left"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -61,12 +47,12 @@
|
||||
<!--进度值改变状态进度条-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
|
||||
android:id="@+id/steering_circular"
|
||||
android:layout_width="@dimen/dp_260"
|
||||
android:layout_height="@dimen/dp_260"
|
||||
android:layout_width="@dimen/dp_278"
|
||||
android:layout_height="@dimen/dp_278"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:outlineAmbientShadowColor="#1EBBCFF6"
|
||||
android:layout_marginTop="@dimen/dp_122"
|
||||
android:padding="@dimen/dp_12"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -76,15 +62,15 @@
|
||||
<!--状态条阴影-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
|
||||
android:id="@+id/steering_circular_alpha"
|
||||
android:layout_width="@dimen/dp_274"
|
||||
android:layout_height="@dimen/dp_274"
|
||||
android:layout_width="@dimen/dp_280"
|
||||
android:layout_height="@dimen/dp_280"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_122"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:padding="@dimen/dp_12"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:progWidth="22px"
|
||||
app:progress="0" />
|
||||
|
||||
<ImageView
|
||||
@@ -104,6 +90,6 @@
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/blue_circle" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/steering_circular" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -56,6 +56,7 @@
|
||||
<color name="hmi_traffic_light_yellow_color_down">#FFFF9B00</color>
|
||||
<color name="hmi_light_blue">#45D3FF</color>
|
||||
<color name="hmi_dark_blue">#1B5BFF</color>
|
||||
<color name="hmi_light_blue_00">#0045D3FF</color>
|
||||
<color name="hmi_light_blue_alpha">#666C79C4</color>
|
||||
<color name="hmi_light_back_bg">#1EBBCFF6</color>
|
||||
<color name="hmi_light_blue_alpha">#6C79C4</color>
|
||||
<color name="hmi_clear_00">#0045D3FF</color>
|
||||
</resources>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<dimen name="dp_12">12px</dimen>
|
||||
<dimen name="dp_20">20px</dimen>
|
||||
<dimen name="module_v2n_tip_text_margin_right">26px</dimen>
|
||||
<dimen name="warning_distance_right">30px</dimen>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<dimen name="dp_12">12px</dimen>
|
||||
<dimen name="dp_32">42px</dimen>
|
||||
<dimen name="module_v2n_tip_width">628px</dimen>
|
||||
<dimen name="module_v2n_tip_height">188px</dimen>
|
||||
|
||||
Reference in New Issue
Block a user