@@ -215,7 +215,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private TextView tvRed;
|
||||
private TextView tvGreen;
|
||||
|
||||
private CheckedTextView ctvAutopilotStatus;
|
||||
// private CheckedTextView ctvAutopilotStatus;
|
||||
|
||||
/**
|
||||
* 内部变量标识是否在vrMode,用于方法执行过滤,避免重复或异常调用
|
||||
@@ -285,7 +285,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
|
||||
mUserHeadImg = findViewById(R.id.ivUserHeadImg);
|
||||
groupFix = findViewById(R.id.groupFix);
|
||||
ctvAutopilotStatus = findViewById(R.id.module_mogo_autopilot_status);
|
||||
// ctvAutopilotStatus = findViewById(R.id.module_mogo_autopilot_status);
|
||||
|
||||
ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
|
||||
if (rootView != null) {
|
||||
@@ -356,16 +356,16 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
});
|
||||
}
|
||||
|
||||
onAutopilotStatusChanged(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING);
|
||||
// onAutopilotStatusChanged(
|
||||
// MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING);
|
||||
|
||||
ctvAutopilotStatus.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
// 如果能自动驾驶,就自动驾驶,不能就提示
|
||||
autopilotStatusClick();
|
||||
}
|
||||
});
|
||||
// ctvAutopilotStatus.setOnClickListener(new OnPreventFastClickListener() {
|
||||
// @Override
|
||||
// public void onClickImpl(View v) {
|
||||
// // 如果能自动驾驶,就自动驾驶,不能就提示
|
||||
// autopilotStatusClick();
|
||||
// }
|
||||
// });
|
||||
|
||||
dealWeatherContainer();
|
||||
|
||||
@@ -414,16 +414,16 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态改变
|
||||
*
|
||||
* @param isInAutopilot true - 在自动驾驶中 false - 不在自动驾驶中
|
||||
*/
|
||||
public void onAutopilotStatusChanged(boolean isInAutopilot) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
ctvAutopilotStatus.setChecked(isInAutopilot);
|
||||
});
|
||||
}
|
||||
// /**
|
||||
// * 自动驾驶状态改变
|
||||
// *
|
||||
// * @param isInAutopilot true - 在自动驾驶中 false - 不在自动驾驶中
|
||||
// */
|
||||
// public void onAutopilotStatusChanged(boolean isInAutopilot) {
|
||||
// getActivity().runOnUiThread(() -> {
|
||||
// ctvAutopilotStatus.setChecked(isInAutopilot);
|
||||
// });
|
||||
// }
|
||||
|
||||
private void autopilotStatusClick() {
|
||||
EntranceViewHolder.getInstance().entranceAutopilotStatusClick();
|
||||
@@ -443,7 +443,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mMsgContainer.setVisibility(View.GONE);
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
ctvAutopilotStatus.setVisibility(View.VISIBLE);
|
||||
// ctvAutopilotStatus.setVisibility(View.VISIBLE);
|
||||
// tvExitVrMode.setVisibility(View.VISIBLE);
|
||||
TopViewAnimHelper.getInstance().enterVrMode();
|
||||
TopViewNoLinkageAnimHelper.getInstance().enterVrMode();
|
||||
@@ -1438,6 +1438,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
@Override
|
||||
public void onStateChanged(int state, String reason) {
|
||||
ctvAutopilotStatus.setChecked(state == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING);
|
||||
// ctvAutopilotStatus.setChecked(state == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="45px" android:topLeftRadius="45px" android:topRightRadius="20px" />
|
||||
<gradient android:angle="315" android:endColor="#2B6EFF" android:startColor="#2B6EFF" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="45px" android:topLeftRadius="45px" android:topRightRadius="20px" />
|
||||
<gradient android:angle="315" android:endColor="#3B4577" android:startColor="#3B4577" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
|
||||
@@ -6,27 +6,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/module_mogo_autopilot_status"
|
||||
android:layout_width="@dimen/module_mogo_autopilot_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_autopilot_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_autopilot_status_margin_left"
|
||||
android:layout_marginTop="@dimen/module_mogo_autopilot_status_margin_top"
|
||||
android:background="@drawable/module_mogo_autopilot_status_bg"
|
||||
android:drawableLeft="@drawable/module_ext_ic_autopilot"
|
||||
android:drawablePadding="@dimen/dp_30"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingLeft="@dimen/module_mogo_autopilot_status_padding"
|
||||
android:text="自动驾驶"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_mogo_autopilot_status_text_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
layout="@layout/module_ext_layout_extensions"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -9,10 +9,5 @@
|
||||
<dimen name="module_switch_image">50px</dimen>
|
||||
<dimen name="module_switch_image_circle">60px</dimen>
|
||||
|
||||
<dimen name="module_mogo_autopilot_status_bg_width">460px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_bg_height">140px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_left">20px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_top">530px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_padding">92px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_text_size">44px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -251,11 +251,5 @@
|
||||
<dimen name="module_switch_image">35px</dimen>
|
||||
<dimen name="module_switch_image_circle">38px</dimen>
|
||||
|
||||
<dimen name="module_mogo_autopilot_status_bg_width">300px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_bg_height">100px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_left">20px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_top">345px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_padding">20px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_text_size">30px</dimen>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user