[add] 四个蒙层角渐变动画

This commit is contained in:
liujing
2022-04-14 18:32:54 +08:00
parent e72317b288
commit da1ddb084b
12 changed files with 54 additions and 70 deletions

View File

@@ -632,7 +632,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
* 闪动动画
*/
fun flicker(view: View) {
val alphaAnimation = AlphaAnimation(0f, 1.0f)
val alphaAnimation = AlphaAnimation(0f, 0.88f)
alphaAnimation.setDuration(600)
alphaAnimation.setInterpolator(LinearInterpolator())
alphaAnimation.setRepeatCount(Animation.INFINITE)

View File

@@ -130,7 +130,7 @@ class V2XWarningView @JvmOverloads constructor(
hmiWarningLeftImg.visibility = View.GONE
hmiWarningLeftTopImg.visibility = View.GONE
hmiWarningLeftBottomImg.visibility = View.GONE
hmiWarningRightTopImg.visibility = View.VISIBLE
hmiWarningRightTopImg.visibility = View.GONE
hmiWarningRightBottomImg.visibility = View.VISIBLE
}
ALERT_WARNING_BOTTOM_LEFT -> {
@@ -174,7 +174,11 @@ class V2XWarningView @JvmOverloads constructor(
removeCallbacks(closeWarningTask)
when (direction) {
ALERT_WARNING_TOP -> {
hmiWarningTopImg.visibility = View.GONE
// hmiWarningTopImg.visibility = View.GONE
hmiWarningRightTopImg.visibility = View.GONE
// hmiWarningLeftTopImg.visibility = View.GONE
// hmiWarningLeftBottomImg.visibility = View.GONE
// hmiWarningRightBottomImg.visibility = View.GONE
}
ALERT_WARNING_RIGHT -> {
hmiWarningRightImg.visibility = View.GONE

View File

@@ -8,7 +8,7 @@
<ImageView
android:id="@+id/hmiWarningTopImg"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_290"
android:layout_height="@dimen/dp_328"
android:background="@drawable/module_hmi_warning_bkg_top"
android:visibility="gone"
tools:visibility="invisible" />
@@ -16,7 +16,7 @@
<!--左方-->
<ImageView
android:id="@+id/hmiWarningLeftImg"
android:layout_width="@dimen/dp_290"
android:layout_width="@dimen/dp_328"
android:layout_height="match_parent"
android:background="@drawable/module_hmi_warning_bkg_left"
android:visibility="gone"
@@ -25,25 +25,25 @@
<!--左上角-->
<ImageView
android:id="@+id/hmiWarningLeftTopImg"
android:layout_width="@dimen/dp_730"
android:layout_width="@dimen/dp_1600"
android:layout_height="match_parent"
android:background="@drawable/module_hmi_warning_bkg_left_top"
android:background="@drawable/top_left"
android:visibility="gone"
tools:visibility="invisible" />
<!--左下角-->
<ImageView
android:id="@+id/hmiWarningLeftBottomImg"
android:layout_width="@dimen/dp_730"
android:layout_width="@dimen/dp_1600"
android:layout_height="match_parent"
android:background="@drawable/module_hmi_warning_bkg_left_top"
android:background="@drawable/bottom_left"
android:visibility="gone"
tools:visibility="invisible" />
<!--右方-->
<ImageView
android:id="@+id/hmiWarningRightImg"
android:layout_width="@dimen/dp_290"
android:layout_width="@dimen/dp_328"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@drawable/module_hmi_warning_bkg_right"
@@ -63,10 +63,10 @@
<!--右下角-->
<ImageView
android:id="@+id/hmiWarningRightBottomImg"
android:layout_width="@dimen/dp_730"
android:layout_height="@dimen/dp_730"
android:layout_width="@dimen/dp_1600"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@drawable/module_hmi_warning_bkg_right_bottom"
android:background="@drawable/bottom_right"
android:visibility="gone"
tools:visibility="invisible" />
@@ -74,7 +74,7 @@
<ImageView
android:id="@+id/hmiWarningBottomImg"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_290"
android:layout_height="@dimen/dp_328"
android:layout_gravity="bottom"
android:background="@drawable/module_hmi_warning_bkg_bottom"
android:visibility="gone"