UI-bus下方向盘外光圈模糊渐变

This commit is contained in:
liujing
2022-05-23 18:09:44 +08:00
parent c2ef744ee6
commit 30a3c879e5
4 changed files with 18 additions and 12 deletions

View File

@@ -81,10 +81,10 @@ public class SteeringWheelView extends ConstraintLayout {
steeringCircularV.setProgress((int) (180 * 100) / 360, 1000);
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
steeringCircularVAlpha = findViewById(R.id.steering_circular_alpha);
steeringCircularVAlpha.setBackWidth(12);
steeringCircularVAlpha.setBlurMaskFilter(BlurMaskFilter.Blur.NORMAL, 12);
steeringCircularVAlpha.setBackWidth(8);
steeringCircularVAlpha.setBackColor(R.color.hmi_clear_00);
steeringCircularVAlpha.setProgColor(R.color.hmi_light_blue_alpha);
steeringCircularVAlpha.setProgColor(R.color.hmi_light_blue_alpha_00, R.color.hmi_light_blue_alpha_ff);
steeringCircularVAlpha.setBlurMaskFilter(BlurMaskFilter.Blur.NORMAL, 12);
steeringCircularVAlpha.setProgress((int) (180 * 100) / 360, 1000);
}
}
@@ -185,7 +185,12 @@ public class SteeringWheelView extends ConstraintLayout {
Log.d(TAG, "onAutopilotSteeringData error");
}
animationWithSteeringData(steering);
steeringCircularV.setProgress((int) (-steering * 100) / 360, 1000);
if (steeringCircularV != null) {
steeringCircularV.setProgress((int) (-steering * 100) / 360, 1000);
}
if (steeringCircularVAlpha != null) {
steeringCircularVAlpha.setProgress((int) (-steering * 100) / 360, 1000);
}
}
});

View File

@@ -25,7 +25,7 @@
android:layout_marginTop="@dimen/dp_50"
android:layout_marginRight="-10px"
android:gravity="right"
android:text="-18°"
android:text="180°"
android:textColor="#415479"
android:textSize="@dimen/dp_26"
android:visibility="invisible"
@@ -39,7 +39,7 @@
android:layout_marginLeft="-10px"
android:layout_marginTop="@dimen/dp_50"
android:gravity="left"
android:text="18°"
android:text="180°"
android:textColor="#415479"
android:textSize="@dimen/dp_26"
app:layout_constraintLeft_toRightOf="@+id/autopilot_iv"

View File

@@ -24,7 +24,7 @@
android:layout_marginTop="@dimen/dp_130"
android:layout_marginRight="-10px"
android:gravity="right"
android:text="-18°"
android:text="180°"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/dp_37"
android:visibility="invisible"
@@ -38,7 +38,7 @@
android:layout_marginLeft="-10px"
android:layout_marginTop="@dimen/dp_130"
android:gravity="left"
android:text="18°"
android:text="180°"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/dp_37"
app:layout_constraintLeft_toRightOf="@+id/autopilot_iv"
@@ -90,6 +90,6 @@
android:layout_marginTop="@dimen/dp_30"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/steering_circular" />
app:layout_constraintTop_toBottomOf="@+id/steering_circular_alpha" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -55,8 +55,9 @@
<color name="hmi_traffic_light_yellow_color_up">#FFFFE198</color>
<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_dark_blue">#3261B6</color>
<color name="hmi_light_back_bg">#1EBBCFF6</color>
<color name="hmi_light_blue_alpha">#6C79C4</color>
<color name="hmi_clear_00">#0045D3FF</color>
<color name="hmi_light_blue_alpha_00">#D945D3FF</color>
<color name="hmi_light_blue_alpha_ff">#D93261B6</color>
<color name="hmi_clear_00">#00FFFFFF</color>
</resources>