合并大唐高鸿obu,增加debug入口,去掉了vrMode按钮入口
This commit is contained in:
@@ -4,15 +4,18 @@ import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -207,6 +210,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private TextView seekHelpNum;
|
||||
|
||||
private View debugPanel;
|
||||
|
||||
private AdasNoticeHelper adasNoticeHelper = new AdasNoticeHelper();
|
||||
private CameraLiveNoticeHelper mCameraLiveNoticeHelper = new CameraLiveNoticeHelper();
|
||||
|
||||
@@ -234,6 +239,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
seekHelpGroup = findViewById(R.id.module_ext_id_seek_help_notice_group);
|
||||
seekHelpNum = findViewById(R.id.module_ext_id_seek_help_notice_number);
|
||||
debugPanel = findViewById(R.id.debugPanel);
|
||||
|
||||
NoMapTopViewShaderHelper.getInstance().initShaderView(findViewById(R.id.module_ext_id_top_container_shader));
|
||||
|
||||
@@ -472,20 +478,41 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
});
|
||||
|
||||
debugPanel.setOnClickListener(view -> {
|
||||
if (SystemClock.elapsedRealtime() - lastDebugPanelClickTime > 1000) {
|
||||
debugPanelClickCount = 1;
|
||||
}else{
|
||||
debugPanelClickCount++;
|
||||
}
|
||||
|
||||
lastDebugPanelClickTime = SystemClock.elapsedRealtime();
|
||||
|
||||
if (debugPanelClickCount == 10) {
|
||||
// show panel
|
||||
debugPanelGroup.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
initDebugPanel();
|
||||
|
||||
}
|
||||
|
||||
private int debugPanelClickCount = 0;
|
||||
private long lastDebugPanelClickTime = 0;
|
||||
|
||||
private EditText etTimes;
|
||||
private Group groupFix;
|
||||
|
||||
private void enterVrMode(){
|
||||
tvEnterVrMode.setVisibility(View.GONE);
|
||||
// tvEnterVrMode.setVisibility(View.GONE);
|
||||
mMove2CurrentLocation.setVisibility(View.GONE);
|
||||
mUploadRoadCondition.setVisibility(View.GONE);
|
||||
mWeatherContainer.setVisibility(View.GONE);
|
||||
mMsgContainer.setVisibility(View.GONE);
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
|
||||
tvExitVrMode.setVisibility(View.VISIBLE);
|
||||
// tvExitVrMode.setVisibility(View.VISIBLE);
|
||||
TopViewAnimHelper.getInstance().enterVrMode();
|
||||
TopViewNoLinkageAnimHelper.getInstance().enterVrMode();
|
||||
mNaviInfo = vrModeNavInfoView;
|
||||
@@ -497,14 +524,14 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private void exitVrMode(){
|
||||
EntranceViewHolder.getInstance().forceHideNoticeView();
|
||||
tvEnterVrMode.setVisibility(View.VISIBLE);
|
||||
// tvEnterVrMode.setVisibility(View.VISIBLE);
|
||||
mMove2CurrentLocation.setVisibility(View.VISIBLE);
|
||||
mUploadRoadCondition.setVisibility(View.VISIBLE);
|
||||
groupUserHead.setVisibility(View.VISIBLE);
|
||||
// mWeatherContainer.setVisibility(View.VISIBLE);
|
||||
// mMsgContainer.setVisibility(View.VISIBLE);
|
||||
|
||||
tvExitVrMode.setVisibility(View.GONE);
|
||||
// tvExitVrMode.setVisibility(View.GONE);
|
||||
TopViewAnimHelper.getInstance().exitVrMode();
|
||||
TopViewNoLinkageAnimHelper.getInstance().exitVrMode();
|
||||
mNaviInfo = animNavInfoView;
|
||||
@@ -1219,4 +1246,68 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
public void onLocationChanged(MogoLocation location) {
|
||||
vrModeNavInfoView.refreshCurrentSpeed((int) (location.getSpeed() * 3.6F));
|
||||
}
|
||||
|
||||
|
||||
private Group debugPanelGroup;
|
||||
private ImageButton ibDebugPanelClose;
|
||||
private Button btnOpenLog,btnCloseLog,btnOpenV2XPanel;
|
||||
private RadioButton rbCidi,rbHuali, rbGohigh;
|
||||
private void initDebugPanel() {
|
||||
debugPanelGroup = findViewById(R.id.groupDebugPanel);
|
||||
ibDebugPanelClose = findViewById(R.id.ibDebugPanelClose);
|
||||
btnOpenLog = findViewById(R.id.btnOpenLog);
|
||||
btnCloseLog = findViewById(R.id.btnCloseLog);
|
||||
btnOpenV2XPanel = findViewById(R.id.btnOpenV2xPanel);
|
||||
rbCidi = findViewById(R.id.rbCidiObu);
|
||||
rbHuali = findViewById(R.id.rbHualiObu);
|
||||
rbGohigh = findViewById(R.id.rbGoHighObu);
|
||||
|
||||
ibDebugPanelClose.setOnClickListener(v -> debugPanelGroup.setVisibility(View.GONE));
|
||||
|
||||
btnOpenLog.setOnClickListener(v->{
|
||||
Intent intent = new Intent("com.mogo.ACTION");
|
||||
intent.putExtra("oper", 1);
|
||||
getContext().sendBroadcast(intent);
|
||||
debugPanelGroup.setVisibility(View.GONE);
|
||||
});
|
||||
|
||||
btnCloseLog.setOnClickListener(v -> {
|
||||
Intent intent = new Intent("com.mogo.ACTION");
|
||||
intent.putExtra("oper", 2);
|
||||
getContext().sendBroadcast(intent);
|
||||
debugPanelGroup.setVisibility(View.GONE);
|
||||
});
|
||||
|
||||
btnOpenV2XPanel.setOnClickListener(v -> {
|
||||
Intent intent = new Intent("com.v2x.test_panel_control");
|
||||
intent.putExtra("TextPanelOpenStatus", true);
|
||||
getContext().sendBroadcast(intent);
|
||||
debugPanelGroup.setVisibility(View.GONE);
|
||||
});
|
||||
|
||||
switch (DebugConfig.getObuType()) {
|
||||
case DebugConfig.OBU_TYPE_CIDI:
|
||||
rbCidi.setChecked(true);
|
||||
break;
|
||||
case DebugConfig.OBU_TYPE_HUALI:
|
||||
rbHuali.setChecked(true);
|
||||
break;
|
||||
default:
|
||||
rbGohigh.setChecked(true);
|
||||
break;
|
||||
}
|
||||
|
||||
rbCidi.setOnClickListener(v -> exchangeObuType(DebugConfig.OBU_TYPE_CIDI));
|
||||
rbHuali.setOnClickListener(v -> exchangeObuType(DebugConfig.OBU_TYPE_HUALI));
|
||||
rbGohigh.setOnClickListener(v -> exchangeObuType(DebugConfig.OBU_TYPE_GOHIGH));
|
||||
|
||||
}
|
||||
|
||||
private void exchangeObuType(int obuType) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt("OBU_TYPE", obuType);
|
||||
DebugConfig.setObuType(obuType);
|
||||
Intent intent = new Intent("com.mogo.launcher.v2x.action.EXCHANGE_OBU_TYPE");
|
||||
intent.putExtra("obuType", obuType);
|
||||
getContext().sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<View
|
||||
android:id="@+id/debugPanelBg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#88000000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/ibDebugPanelClose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/module_common_close_selector"
|
||||
app:layout_constraintRight_toRightOf="@id/debugPanelBg"
|
||||
app:layout_constraintTop_toTopOf="@id/debugPanelBg" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLogSetTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="LOG SET"
|
||||
android:textColor="#fff"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/debugPanelBg"
|
||||
app:layout_constraintTop_toTopOf="@id/debugPanelBg" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnOpenLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="打开日志"
|
||||
android:textColor="#fff"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvLogSetTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLogSetTitle" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnCloseLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="关闭日志"
|
||||
android:textColor="#fff"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnOpenLog"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLogSetTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2xSetTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="V2X SET"
|
||||
android:textColor="#fff"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvLogSetTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnOpenLog" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnOpenV2xPanel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="打开V2X面板"
|
||||
android:textColor="#fff"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvV2xSetTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvV2xSetTitle" />
|
||||
<TextView
|
||||
android:id="@+id/tvObuSetTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="OBU SET (设置完成后需要重启)"
|
||||
android:textColor="#fff"
|
||||
app:layout_constraintLeft_toLeftOf="@id/btnOpenV2xPanel"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnOpenV2xPanel"
|
||||
android:textSize="30sp" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgObuSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvObuSetTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvObuSetTitle">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbCidiObu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="Cidi\n(北小营)"
|
||||
android:textColor="#fff"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbHualiObu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="华砺智行\n(苏州)"
|
||||
android:textColor="#fff"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbGoHighObu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="大唐高鸿\n(11.11国展)"
|
||||
android:textColor="#fff"
|
||||
android:textSize="20sp" />
|
||||
</RadioGroup>
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/groupDebugPanel"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:constraint_referenced_ids="btnCloseLog,btnOpenLog,btnOpenV2xPanel,tvObuSetTitle,tvLogSetTitle,tvV2xSetTitle,rgObuSet,ibDebugPanelClose,debugPanelBg" />
|
||||
</merge>
|
||||
@@ -219,6 +219,7 @@
|
||||
android:layout_marginBottom="@dimen/module_ext_enter_vr_mode_margin_bottom"
|
||||
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="VR"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/module_ext_enter_vr_mode_text_size"
|
||||
@@ -352,4 +353,9 @@
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="etTimes,btnFix" />
|
||||
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
layout="@layout/include_debug_panel" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -295,4 +295,8 @@
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
|
||||
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
layout="@layout/include_debug_panel" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -8,15 +8,15 @@
|
||||
android:id="@+id/module_ext_id_weather_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/module_ext_height"
|
||||
android:layout_marginStart="@dimen/module_ext_weather_margin_start"
|
||||
android:background="@drawable/module_ext_shadow_bkg"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/module_ext_weather_container_paddingLeft"
|
||||
android:paddingEnd="@dimen/module_ext_weather_container_paddingRight"
|
||||
android:visibility="invisible"
|
||||
app:layout_goneMarginLeft="@dimen/module_ext_notice_margin_start"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_ext_id_msg"
|
||||
android:layout_marginStart="@dimen/module_ext_weather_margin_start"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginLeft="@dimen/module_ext_notice_margin_start"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
@@ -61,9 +61,9 @@
|
||||
android:id="@+id/module_ext_id_msg_counter"
|
||||
android:layout_width="@dimen/module_ext_msg_counter_width"
|
||||
android:layout_height="@dimen/module_ext_msg_counter_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/module_ext_drawable_msg_bkg"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_msg_counter_textSize"
|
||||
tools:text="···" />
|
||||
@@ -73,26 +73,35 @@
|
||||
android:id="@+id/ivUserHeadBoard"
|
||||
android:layout_width="@dimen/module_ext_user_avator_board_size"
|
||||
android:layout_height="@dimen/module_ext_user_avator_board_size"
|
||||
android:background="@drawable/model_ext_default_user_head_board"
|
||||
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginTop="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
|
||||
android:background="@drawable/model_ext_default_user_head_board"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivUserHeadImg"
|
||||
android:layout_width="@dimen/module_ext_user_avator_size"
|
||||
android:layout_height="@dimen/module_ext_user_avator_size"
|
||||
android:src="@drawable/model_ext_default_user_head"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintTop_toTopOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintRight_toRightOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivUserHeadBoard"/>
|
||||
app:layout_constraintTop_toTopOf="@id/ivUserHeadBoard"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupUserHead"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/groupUserHead"
|
||||
app:constraint_referenced_ids="ivUserHeadBoard,ivUserHeadImg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/debugPanel"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="@dimen/dp_200"
|
||||
android:background="#00000000"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</merge>
|
||||
Reference in New Issue
Block a user