更新导航入口UI
This commit is contained in:
@@ -17,6 +17,6 @@ public class EmptyIntentHandler implements IntentHandler {
|
||||
|
||||
@Override
|
||||
public void handle( Context context, Intent intent ) {
|
||||
Logger.w( TAG, "空实现." );
|
||||
Logger.w( TAG, "空实现. %s", intent.getAction() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,14 @@ import android.view.WindowManager;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.wm.WindowManagerView;
|
||||
import com.mogo.utils.CommonUtils;
|
||||
import com.mogo.utils.LaunchUtils;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -40,6 +44,7 @@ class AutoNaviIntentHandler {
|
||||
}
|
||||
|
||||
private WindowManagerView mWindowManagerView;
|
||||
private Map< String, Object > mProperties = new HashMap<>();
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
@@ -95,6 +100,12 @@ class AutoNaviIntentHandler {
|
||||
} else {
|
||||
LaunchUtils.launchByPkg( context, "com.mogo.launcher.app" );
|
||||
}
|
||||
if ( mProperties.isEmpty() ) {
|
||||
mProperties.put( "appname", CommonUtils.getAppName( context ) );
|
||||
mProperties.put( "appversion", CommonUtils.getVersionName( context ) );
|
||||
mProperties.put( "from", 9 );
|
||||
}
|
||||
MogoWidgetManger.getInstance().getApis().getAnalyticsApi().track( "appenterfront", mProperties );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
@@ -102,6 +113,7 @@ class AutoNaviIntentHandler {
|
||||
}
|
||||
try {
|
||||
mWindowManagerView.show();
|
||||
MogoWidgetManger.getInstance().getApis().getAnalyticsApi().track( "NAVI_button_show", null );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<gradient android:angle="180" android:endColor="#5CC1FF" android:startColor="#256BFF" />
|
||||
<corners android:radius="@dimen/module_widgets_app_entrance_corner_size" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -3,11 +3,12 @@
|
||||
android:id="@+id/module_widgets_app_entrance_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/module_widgets_app_entrance_bkg"
|
||||
android:background="@drawable/module_widgets_app_entrance_img_bkg"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/module_widgets_app_entrance_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/module_widgets_app_entrance_size"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_widgets_app_entrance_text"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<dimen name="module_widgets_app_entrance_textSize">20px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_padding">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_corner_size">2px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">112px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">929px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">505px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">501px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingTop">10px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingLeft">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_size">71px</dimen>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<dimen name="module_widgets_app_entrance_textSize">20px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_padding">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_corner_size">2px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">112px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">929px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_y">505px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_x">501px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingTop">10px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_paddingLeft">15px</dimen>
|
||||
<dimen name="module_widgets_app_entrance_size">71px</dimen>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-service</string>
|
||||
<string name="module_widgets_app_entrance_text">辅助\n驾驶</string>
|
||||
<string name="module_widgets_app_entrance_text">切换辅助驾驶</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user