导航语音指令
This commit is contained in:
@@ -91,7 +91,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
*/
|
||||
private IMogoModuleProvider mSearchProvider;
|
||||
private boolean mIsLock = true;
|
||||
private View ivMode;
|
||||
private TextView ivMode;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -170,13 +170,16 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
ivMode.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
if (ivMode.isSelected()) {
|
||||
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
} else {
|
||||
mMApUIController.changeMapMode(EnumMapUI.CarUp_2D);
|
||||
} else {
|
||||
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
}
|
||||
ivMode.setSelected(!ivMode.isSelected());
|
||||
ivMode.setText(
|
||||
getString(ivMode.isSelected() ? R.string.mode_car_up : R.string.mode_north_up));
|
||||
}
|
||||
});
|
||||
|
||||
mSpeedLimit = findViewById(R.id.module_entrance_id_speed_limit_container);
|
||||
mSpeedLimitValue = findViewById(R.id.module_entrance_id_speed_limit_value);
|
||||
mSpeedLimitUnit = findViewById(R.id.module_entrance_id_speed_limit_unit);
|
||||
|
||||
BIN
modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_car_up.png
Executable file
BIN
modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_car_up.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 577 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_north_up.png
Executable file
BIN
modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_north_up.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 316 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_car_up.png
Executable file
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_car_up.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_north_up.png
Executable file
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_north_up.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 609 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/icon_north_up" android:state_selected="true"/>
|
||||
<item android:drawable="@drawable/icon_north_up" android:state_checked="true"/>
|
||||
<item android:drawable="@drawable/icon_car_up"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#50526E"
|
||||
android:startColor="#3F4057" />
|
||||
<corners android:radius="@dimen/dp_15"/>
|
||||
|
||||
</shape>
|
||||
|
||||
@@ -113,13 +113,21 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
<TextView
|
||||
android:id="@+id/module_ext_id_north"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/ic_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_entrance_id_navi_info_panel"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_entrance_id_navi_info_panel"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:text="@string/mode_car_up"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_28"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_33"
|
||||
android:background="@drawable/shape_react_gray_round"
|
||||
android:drawableTop="@drawable/selector_icon_north_up"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_entrance_id_navi_info_panel"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/module_entrance_id_navi_info_panel"
|
||||
android:layout_height="@dimen/dp_120"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_entrance_id_operation_panel"
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
<string name="module_ext_str_exit_navi">退出导航</string>
|
||||
<string name="module_ext_str_continue_navi">继续导航</string>
|
||||
<string name="module_ext_str_exit_path">退出全览</string>
|
||||
<string name="mode_car_up">车头</string>
|
||||
<string name="mode_north_up">正北</string>
|
||||
|
||||
<string-array name="module_ext_str_arr_ai_tips">
|
||||
<string-array name="module_ext_str_arr_ai_tips">
|
||||
<item>你好小智,播放音乐</item>
|
||||
<item>你好小智,我要听音乐</item>
|
||||
<item>你好小智,播放赵磊的歌</item>
|
||||
|
||||
Reference in New Issue
Block a user