fix UI problem
This commit is contained in:
@@ -3,7 +3,10 @@ package com.mogo.module.apps.applaunch;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.impl.amap.navi.NaviClient;
|
||||
import com.mogo.module.apps.AppServiceHandler;
|
||||
import com.mogo.module.apps.R;
|
||||
import com.mogo.module.apps.model.AppInfo;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -17,14 +20,23 @@ public class GuideShowLauncher extends BaseAppLauncher {
|
||||
@Override
|
||||
public void launch(Context context, AppInfo appInfo) {
|
||||
if (appInfo != null && APP_INFO_NAME_GUIDE_SHOW.equals(appInfo.getName())) {
|
||||
AppServiceHandler.getMogoGuideShow().playGuideVideo((Activity) context,(s) -> {
|
||||
Logger.d(TAG, s);
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
}else{
|
||||
if ( getNext() != null ) {
|
||||
getNext().launch( context, appInfo );
|
||||
if (!NaviClient.getInstance(context).isNaviing()) {
|
||||
AppServiceHandler.getMogoGuideShow().playGuideVideo((Activity) context, (s) -> {
|
||||
Logger.d(TAG, s);
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
} else {
|
||||
AIAssist.getInstance(context).speakTTSVoice(context.getString(R.string.module_apps_str_guide_warning));
|
||||
processChain(context,appInfo);
|
||||
}
|
||||
} else {
|
||||
processChain(context, appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void processChain(Context context, AppInfo appInfo) {
|
||||
if (getNext() != null) {
|
||||
getNext().launch(context, appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<string name="app_name">mogo-module-apps</string>
|
||||
<string name="module_apps_str_no_app">APP 未安装</string>
|
||||
<string name="module_apps_str_no_guide_show">新手引导服务未加载</string>
|
||||
<string name="module_apps_str_guide_warning">提示为了您的安全,导航中不可播放视频</string>
|
||||
<string-array name="module_apps_array_filter_packages">
|
||||
<item>com.mogo.launcher</item>
|
||||
</string-array>
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
android:id="@+id/tvAuthorizeContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:lineSpacingExtra="@dimen/dp_15"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_44" />
|
||||
|
||||
@@ -173,13 +174,18 @@
|
||||
android:id="@+id/tvAuthorizeButtonContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_44" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorizeLastContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_44" />
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -191,6 +197,7 @@
|
||||
android:layout_marginTop="@dimen/dp_62"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_55"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
Reference in New Issue
Block a user