[自动驾驶按钮样式修改]
This commit is contained in:
yangyakun
2024-05-06 18:01:51 +08:00
parent 02a2e411b9
commit 21bf873a5d
34 changed files with 114 additions and 62 deletions

View File

@@ -395,7 +395,7 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv));
ctvAutopilotStatusIv.setImageResource(R.drawable.bus_disable_autopilot_icon);
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatus.setBackgroundResource(R.drawable.start_failure);
ctvAutopilotStatus.setBackgroundResource(R.drawable.common_autopilot_start_fail);
} else {
ctvAutopilotStatusTv.setTextColor(AbsMogoApplication.getApp().getColor(R.color.bus_autopilot_text_color_normal));
ctvAutopilotStatusIv.setImageResource(R.drawable.bus_ic_autopilot);
@@ -403,22 +403,22 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv));
if(canStartAuto){
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatus.setBackgroundResource(R.drawable.press_start_status);
ctvAutopilotStatus.setBackgroundResource(R.drawable.common_autopilot_press);
}else {
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.bus_autopilot_text_color_disable));
ctvAutopilotStatusIv.setImageResource(R.drawable.bus_disable_autopilot_icon);
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatus.setBackgroundResource(R.drawable.start_failure);
ctvAutopilotStatus.setBackgroundResource(R.drawable.common_autopilot_start_fail);
}
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == autopilotStatus) {
ctvAutopilotStatusTv.setText(R.string.bus_loading_autopilot_runnig_tv);
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatus.setBackgroundResource(R.drawable.start_success);
ctvAutopilotStatus.setBackgroundResource(R.drawable.common_autopilot_in_autopilot);
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
== autopilotStatus){
ctvAutopilotStatusTv.setText(R.string.bus_pingxing_driver);
ctvAutopilotStatus.setClickable(false);
ctvAutopilotStatus.setBackgroundResource(R.drawable.pingxingjiashi);
ctvAutopilotStatus.setBackgroundResource(R.drawable.common_autopilot_pxjs);
}
}
}

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/press_start_status">
<item android:state_pressed="true" android:drawable="@drawable/common_autopilot_press">
</item>
<item android:drawable="@drawable/start_failure">
<item android:drawable="@drawable/common_autopilot_start_fail">
</item>
</selector>

View File

@@ -172,9 +172,11 @@
<RelativeLayout
android:id="@+id/module_mogo_och_autopilot_status"
android:layout_width="@dimen/dp_616"
android:layout_height="@dimen/dp_180"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_m_1"
android:layout_height="@dimen/dp_185"
android:layout_marginStart="@dimen/dp_9"
android:layout_marginTop="-31dp"
android:paddingTop="@dimen/dp_27"
android:paddingBottom="@dimen/dp_32"
android:background="@drawable/bus_autopilot_0_1_status_bg"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"
@@ -207,7 +209,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_m_10"
android:layout_marginTop="-27dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/module_mogo_och_autopilot_status"
app:layout_goneMarginTop="@dimen/module_mogo_och_station_panel_container_margin_top_no_call" />