opt
@@ -35,9 +35,32 @@ android {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.res.srcDirs = ['src/main/res', 'src/main/res-voice-icon']
|
||||
f8xx.res.srcDirs = ['src/main/res', 'src/main/res-voice-icon']
|
||||
f80x.res.srcDirs = ['src/main/res', 'src/main/res-voice-icon']
|
||||
f8Amap.res.srcDirs = ['src/main/res', 'src/main/res-voice-icon']
|
||||
}
|
||||
|
||||
flavorDimensions "product"
|
||||
|
||||
productFlavors {
|
||||
f8xx {
|
||||
dimension "product"
|
||||
}
|
||||
// f系列-分体机
|
||||
f80x {
|
||||
dimension "product"
|
||||
}
|
||||
// f系列-分体机-高德
|
||||
f8Amap {
|
||||
dimension "product"
|
||||
}
|
||||
e8xx {
|
||||
dimension "product"
|
||||
}
|
||||
em4 {
|
||||
dimension "product"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -44,6 +44,7 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
private RecyclerView mNavigatorAppsList;
|
||||
private AppIndicatorAdapter mAppIndicatorAdapter;
|
||||
|
||||
private ImageView mAIAssistBkg;
|
||||
private ImageView mAIAssist;
|
||||
private View mAIAssistContainer;
|
||||
private AnimWrapper mAnim;
|
||||
@@ -71,9 +72,10 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
mNavigatorAppsList.setAdapter( mAppIndicatorAdapter );
|
||||
|
||||
mAIAssistContainer = findViewById( R.id.module_apps_id_ai_assist_container );
|
||||
mAIAssistBkg = findViewById( R.id.module_apps_id_ai_assist_bkg );
|
||||
mAIAssist = findViewById( R.id.module_apps_id_ai_assist );
|
||||
|
||||
mAnim = new AnimWrapper( mAIAssist );
|
||||
mAnim = new AnimWrapper( mAIAssist, mAIAssistBkg );
|
||||
boolean naviStatus = AppServiceHandler.getApis().getMapServiceApi().getNavi( getContext() ).isNaviing();
|
||||
if ( naviStatus ) {
|
||||
setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Navigation );
|
||||
|
||||
@@ -82,17 +82,7 @@ public class AnimRes {
|
||||
R.drawable.ic_music_00022,
|
||||
R.drawable.ic_music_00023,
|
||||
R.drawable.ic_music_00024,
|
||||
R.drawable.ic_music_00025,
|
||||
R.drawable.ic_music_00026,
|
||||
R.drawable.ic_music_00027,
|
||||
R.drawable.ic_music_00028,
|
||||
R.drawable.ic_music_00029,
|
||||
R.drawable.ic_music_00030,
|
||||
R.drawable.ic_music_00031,
|
||||
R.drawable.ic_music_00032,
|
||||
R.drawable.ic_music_00033,
|
||||
R.drawable.ic_music_00034,
|
||||
R.drawable.ic_music_00035
|
||||
R.drawable.ic_music_00025
|
||||
};
|
||||
|
||||
public static final int sBlink[] = {
|
||||
@@ -500,76 +490,30 @@ public class AnimRes {
|
||||
R.drawable.ic_sleep_00041
|
||||
};
|
||||
|
||||
public static final int sAll[][] = new int[][]{{
|
||||
R.drawable.mogo_tts_icon_00000,
|
||||
R.drawable.mogo_tts_icon_00001,
|
||||
R.drawable.mogo_tts_icon_00002,
|
||||
R.drawable.mogo_tts_icon_00003,
|
||||
R.drawable.mogo_tts_icon_00004,
|
||||
R.drawable.mogo_tts_icon_00005,
|
||||
R.drawable.mogo_tts_icon_00006,
|
||||
R.drawable.mogo_tts_icon_00007,
|
||||
R.drawable.mogo_tts_icon_00008,
|
||||
R.drawable.mogo_tts_icon_00009,
|
||||
R.drawable.mogo_tts_icon_00010,
|
||||
R.drawable.mogo_tts_icon_00011,
|
||||
R.drawable.mogo_tts_icon_00012,
|
||||
R.drawable.mogo_tts_icon_00013,
|
||||
R.drawable.mogo_tts_icon_00014,
|
||||
R.drawable.mogo_tts_icon_00015,
|
||||
R.drawable.mogo_tts_icon_00016,
|
||||
R.drawable.mogo_tts_icon_00017,
|
||||
R.drawable.mogo_tts_icon_00018,
|
||||
R.drawable.mogo_tts_icon_00019,
|
||||
R.drawable.mogo_tts_icon_00020,
|
||||
R.drawable.mogo_tts_icon_00021,
|
||||
R.drawable.mogo_tts_icon_00022,
|
||||
R.drawable.mogo_tts_icon_00023,
|
||||
R.drawable.mogo_tts_icon_00024,
|
||||
R.drawable.mogo_tts_icon_00025,
|
||||
R.drawable.mogo_tts_icon_00026,
|
||||
R.drawable.mogo_tts_icon_00027,
|
||||
R.drawable.mogo_tts_icon_00028,
|
||||
R.drawable.mogo_tts_icon_00029,
|
||||
R.drawable.mogo_tts_icon_00030,
|
||||
R.drawable.mogo_tts_icon_00031,
|
||||
R.drawable.mogo_tts_icon_00032,
|
||||
R.drawable.mogo_tts_icon_00033,
|
||||
R.drawable.mogo_tts_icon_00034,
|
||||
R.drawable.mogo_tts_icon_00035,
|
||||
R.drawable.mogo_tts_icon_00036,
|
||||
R.drawable.mogo_tts_icon_00037,
|
||||
R.drawable.mogo_tts_icon_00038,
|
||||
R.drawable.mogo_tts_icon_00039,
|
||||
R.drawable.mogo_tts_icon_00040,
|
||||
R.drawable.mogo_tts_icon_00041,
|
||||
R.drawable.mogo_tts_icon_00042,
|
||||
R.drawable.mogo_tts_icon_00043,
|
||||
R.drawable.mogo_tts_icon_00044,
|
||||
R.drawable.mogo_tts_icon_00045,
|
||||
R.drawable.mogo_tts_icon_00046,
|
||||
R.drawable.mogo_tts_icon_00047,
|
||||
R.drawable.mogo_tts_icon_00048,
|
||||
R.drawable.mogo_tts_icon_00049,
|
||||
R.drawable.mogo_tts_icon_00050,
|
||||
R.drawable.mogo_tts_icon_00051,
|
||||
R.drawable.mogo_tts_icon_00052,
|
||||
R.drawable.mogo_tts_icon_00053,
|
||||
R.drawable.mogo_tts_icon_00054,
|
||||
R.drawable.mogo_tts_icon_00055,
|
||||
R.drawable.mogo_tts_icon_00056,
|
||||
R.drawable.mogo_tts_icon_00057,
|
||||
R.drawable.mogo_tts_icon_00058,
|
||||
R.drawable.mogo_tts_icon_00059,
|
||||
R.drawable.mogo_tts_icon_00060,
|
||||
R.drawable.mogo_tts_icon_00061,
|
||||
R.drawable.mogo_tts_icon_00062,
|
||||
R.drawable.mogo_tts_icon_00063,
|
||||
R.drawable.mogo_tts_icon_00064,
|
||||
R.drawable.mogo_tts_icon_00065,
|
||||
R.drawable.mogo_tts_icon_00066,
|
||||
R.drawable.mogo_tts_icon_00067
|
||||
}};
|
||||
public static final int sAll[][] = new int[][]{
|
||||
sOverlook,
|
||||
sBlink,
|
||||
sDaily,
|
||||
sHappy1,
|
||||
sReading,
|
||||
sRunning,
|
||||
sHappy2,
|
||||
sSleep
|
||||
};
|
||||
|
||||
// 需要循环的点
|
||||
public static final int sKeyPoint[] = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
47,
|
||||
26,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
public static final int sKeyPointOfNavigation = 16;
|
||||
|
||||
public static int sRes[] = sAll[0];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
@@ -17,8 +18,9 @@ public class AnimWrapper implements Anim {
|
||||
private Anim mDelegate;
|
||||
private boolean mIsStarted = false;
|
||||
|
||||
public AnimWrapper( ImageView target ) {
|
||||
public AnimWrapper( ImageView target, ImageView bkg ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
bkg.setVisibility( View.VISIBLE );
|
||||
mDelegate = new OthersAnim( target );
|
||||
} else {
|
||||
mDelegate = new KitkatAnim( target );
|
||||
|
||||
@@ -17,12 +17,13 @@ public class OthersAnim implements Anim {
|
||||
|
||||
private final static int MSG_LOOP = 3003;
|
||||
public static final int MSG_CHANGE = 3004;
|
||||
public static final long INTERVAL = 100L;
|
||||
public static final long INTERVAL = 50L;
|
||||
private boolean mStarted = false;
|
||||
|
||||
private ImageView mImageView;
|
||||
|
||||
private int mEmojiIndex = 0;
|
||||
private int mKeyPoint = 0;
|
||||
|
||||
private Handler mHandler = new Handler( Looper.getMainLooper() ) {
|
||||
@Override
|
||||
@@ -34,6 +35,9 @@ public class OthersAnim implements Anim {
|
||||
if ( AnimRes.sRes.length == 0 ) {
|
||||
return;
|
||||
}
|
||||
if ( mStartIndex >= AnimRes.sRes.length - 1 ) {
|
||||
mStartIndex = mKeyPoint;
|
||||
}
|
||||
mImageView.setImageResource( AnimRes.sRes[mStartIndex++ % AnimRes.sRes.length] );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_LOOP, INTERVAL );
|
||||
}
|
||||
@@ -44,6 +48,7 @@ public class OthersAnim implements Anim {
|
||||
stop();
|
||||
mEmojiIndex++;
|
||||
AnimRes.sRes = AnimRes.sAll[mEmojiIndex % AnimRes.sAll.length];
|
||||
mKeyPoint = AnimRes.sKeyPoint[mEmojiIndex % AnimRes.sKeyPoint.length];
|
||||
mStartIndex = 0;
|
||||
if ( start ) {
|
||||
start();
|
||||
@@ -70,7 +75,7 @@ public class OthersAnim implements Anim {
|
||||
}
|
||||
mStarted = true;
|
||||
mHandler.sendEmptyMessage( MSG_LOOP );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 30 * 1_000L );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,10 +94,12 @@ public class OthersAnim implements Anim {
|
||||
switch ( type ) {
|
||||
case Navigation:
|
||||
mStartIndex = 0;
|
||||
mKeyPoint = AnimRes.sKeyPointOfNavigation;
|
||||
AnimRes.sRes = AnimRes.sNavigation;
|
||||
break;
|
||||
case Music:
|
||||
mStartIndex = 0;
|
||||
mKeyPoint = 0;
|
||||
AnimRes.sRes = AnimRes.sMusic;
|
||||
break;
|
||||
case Others:
|
||||
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |