增加了测试VR的入口,调整小地图为默认的夜间模式

This commit is contained in:
董宏宇
2020-12-21 20:10:27 +08:00
parent b83738ed57
commit eff36419b4
3 changed files with 33 additions and 7 deletions

View File

@@ -138,9 +138,9 @@ public class SmallMapDirectionView extends RoundLayout {
// 2D模式
options.setTilt(0);
// 黑夜模式
//options.setNaviNight(true);
options.setNaviNight(true);
// 自定义地图样式
options.setCustomMapStylePath("/mnt/sdcard/amap/style.data");
// options.setCustomMapStylePath("/mnt/sdcard/amap/style.data");
mAMapNaviView.setViewOptions(options);
}

View File

@@ -57,6 +57,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
private Button mBtnTriggerCallUserInfo;
private Button mBtnTriggerEventUgc;
private Button mBtnTriggerTrafficSearch;
private Button nBtnTriggerVR;
private Button btnTriggerRearVIPCarTip,
btnTriggerVehicleBrakes,
@@ -116,6 +117,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
mBtnTriggerEventUgc = findViewById(R.id.btnTriggerEventUgc);
mBtnTriggerCallUserInfo = findViewById(R.id.btnTriggerCallUserInfo);
mBtnTriggerTrafficSearch = findViewById(R.id.btnTriggerTrafficSearch);
nBtnTriggerVR = findViewById(R.id.btnTriggerVR);
switch (showType) {
case 0:
@@ -130,6 +132,12 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
break;
}
nBtnTriggerVR.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
V2XServiceManager.getMoGoStatusManager().setVrMode("nBtnTriggerVR", true);
}
});
btnTriggerRearVIPCarTip = findViewById(R.id.btnTriggerRearVIPCarTip);
btnTriggerVehicleBrakes = findViewById(R.id.btnTriggerVehicleBrakes);
@@ -167,7 +175,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
mogoDriverInfo.setSn("12345678");
mogoDriverInfo.setUserName("测试");
mogoDriverInfo.setUserHead("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600872867592&di=994e371880ca6ae2814f553e0d0e4139&imgtype=0&src=http%3A%2F%2Fp3.ssl.cdn.btime.com%2Ft014c5d8a1e5cef12ba.jpg%3Fsize%3D506x543");
if ( V2XServiceManager.getCarsChattingProvider() != null ) {
if (V2XServiceManager.getCarsChattingProvider() != null) {
V2XServiceManager.getCarsChattingProvider().showUserWindow("CAR_CALL_USER_TO_" + V2XConst.MODULE_NAME, mogoDriverInfo, context);
}
});
@@ -267,7 +275,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
});
mBtnTriggerTrafficSearch.setOnClickListener(v-> V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus());
mBtnTriggerTrafficSearch.setOnClickListener(v -> V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus());
/*

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
@@ -54,6 +55,20 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btnTriggerVR"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:background="#6BCF23"
android:padding="@dimen/dp_10"
android:text="开启VR模式"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_22"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</com.google.android.flexbox.FlexboxLayout>
<com.google.android.flexbox.FlexboxLayout
@@ -67,7 +82,8 @@
app:alignItems="center"
app:flexDirection="row"
app:flexWrap="wrap"
app:justifyContent="flex_start">
app:justifyContent="flex_start"
tools:visibility="visible">
<TextView
android:layout_width="match_parent"
@@ -207,7 +223,8 @@
app:alignItems="center"
app:flexDirection="row"
app:flexWrap="wrap"
app:justifyContent="flex_start">
app:justifyContent="flex_start"
tools:visibility="visible">
<TextView
@@ -276,7 +293,8 @@
app:alignItems="center"
app:flexDirection="row"
app:flexWrap="wrap"
app:justifyContent="flex_start">
app:justifyContent="flex_start"
tools:visibility="visible">
<TextView
android:layout_width="match_parent"