This commit is contained in:
zhongchao
2022-08-19 19:34:35 +08:00
parent 1065d71714
commit cfcba07fd7
3 changed files with 6 additions and 5 deletions

View File

@@ -73,10 +73,10 @@ class PncActionsView @JvmOverloads constructor(
}
// update view
if(actions.isNullOrEmpty() || getAutoPilotStatusInfo().state != STATUS_AUTOPILOT_RUNNING){
tvHmiPncActions.background = null
this.background = null
tvHmiPncActions.text = ""
}else{
tvHmiPncActions.background = AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
this.background = AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
tvHmiPncActions.text = actions
}
}

View File

@@ -2,17 +2,17 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="@dimen/dp_100">
<TextView
android:id="@+id/tvHmiPncActions"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_96"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingStart="@dimen/dp_72"
android:paddingEnd="@dimen/dp_72"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_48"
android:textSize="@dimen/dp_34"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -15,6 +15,7 @@
<dimen name="dp_18">18px</dimen>
<dimen name="dp_30">30px</dimen>
<dimen name="dp_36">36px</dimen>
<dimen name="dp_34">34px</dimen>
<dimen name="dp_38">38px</dimen>
<dimen name="dp_42">42px</dimen>
<dimen name="dp_45">45px</dimen>