diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimRes.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimRes.java index e5b8316cf7..56d70f569f 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimRes.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimRes.java @@ -513,7 +513,20 @@ public class AnimRes { 0 }; + // 背景 + public static final int sBkgRes[] = { + R.drawable.ic_common_bkg, + R.drawable.ic_common_bkg, + R.drawable.ic_common_bkg, + R.drawable.ic_common_bkg, + R.drawable.ic_common_bkg, + R.drawable.ic_runningg_bkg, + R.drawable.ic_common_bkg, + R.drawable.ic_common_bkg + }; + public static final int sKeyPointOfNavigation = 16; + public static final int sCommonBkgRes = R.drawable.ic_common_bkg; public static int sRes[] = sAll[0]; } diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimWrapper.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimWrapper.java index 03af6bcb7d..73233eea1c 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimWrapper.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/AnimWrapper.java @@ -21,7 +21,7 @@ public class AnimWrapper implements Anim { public AnimWrapper( ImageView target, ImageView bkg ) { if ( CarSeries.isF8xxSeries() ) { bkg.setVisibility( View.VISIBLE ); - mDelegate = new OthersAnim( target ); + mDelegate = new OthersAnim( target, bkg ); } else { mDelegate = new KitkatAnim( target ); } diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java index 18fafcd58a..24aeab4b5f 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java @@ -13,13 +13,16 @@ import android.widget.ImageView; */ public class OthersAnim implements Anim { + private ImageView mBkg; private int mStartIndex = 0; private final static int MSG_LOOP = 3003; public static final int MSG_CHANGE = 3004; - public static final long INTERVAL = 50L; + public static final long FRAME_INTERVAL = 50L; private boolean mStarted = false; + public static final long ANIM_INTERVAL = 15 * 1_000L; + private ImageView mImageView; private int mEmojiIndex = 0; @@ -39,7 +42,7 @@ public class OthersAnim implements Anim { mStartIndex = mKeyPoint; } mImageView.setImageResource( AnimRes.sRes[mStartIndex++ % AnimRes.sRes.length] ); - mHandler.sendEmptyMessageDelayed( MSG_LOOP, INTERVAL ); + mHandler.sendEmptyMessageDelayed( MSG_LOOP, FRAME_INTERVAL ); } break; case MSG_CHANGE: @@ -49,11 +52,12 @@ public class OthersAnim implements Anim { mEmojiIndex++; AnimRes.sRes = AnimRes.sAll[mEmojiIndex % AnimRes.sAll.length]; mKeyPoint = AnimRes.sKeyPoint[mEmojiIndex % AnimRes.sKeyPoint.length]; + mBkg.setImageResource( AnimRes.sBkgRes[mEmojiIndex % AnimRes.sBkgRes.length] ); mStartIndex = 0; if ( start ) { start(); } - mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L ); + mHandler.sendEmptyMessageDelayed( MSG_CHANGE, ANIM_INTERVAL ); } break; } @@ -62,10 +66,12 @@ public class OthersAnim implements Anim { private AnimRes.EmojiType mLastType; - public OthersAnim( ImageView imageView ) { + public OthersAnim( ImageView imageView, ImageView bkg ) { this.mImageView = imageView; + mBkg = bkg; mLastType = AnimRes.EmojiType.Others; AnimRes.sRes = AnimRes.sAll[mEmojiIndex]; + mBkg.setImageResource( AnimRes.sCommonBkgRes ); } @Override @@ -75,7 +81,7 @@ public class OthersAnim implements Anim { } mStarted = true; mHandler.sendEmptyMessage( MSG_LOOP ); - mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 30 * 1_000L ); + mHandler.sendEmptyMessageDelayed( MSG_CHANGE, ANIM_INTERVAL ); } @Override @@ -96,14 +102,16 @@ public class OthersAnim implements Anim { mStartIndex = 0; mKeyPoint = AnimRes.sKeyPointOfNavigation; AnimRes.sRes = AnimRes.sNavigation; + mBkg.setImageResource( AnimRes.sCommonBkgRes ); break; case Music: mStartIndex = 0; mKeyPoint = 0; AnimRes.sRes = AnimRes.sMusic; + mBkg.setImageResource( AnimRes.sCommonBkgRes ); break; case Others: - mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 0 * 1_000L ); + mHandler.sendEmptyMessage( MSG_CHANGE ); break; } } @@ -113,5 +121,6 @@ public class OthersAnim implements Anim { stop(); mHandler = null; mImageView = null; + mBkg = null; } } diff --git a/modules/mogo-module-apps/src/main/res-voice-icon/drawable-xhdpi/ic_common_bkg.png b/modules/mogo-module-apps/src/main/res-voice-icon/drawable-xhdpi/ic_common_bkg.png new file mode 100755 index 0000000000..3b9cd709be Binary files /dev/null and b/modules/mogo-module-apps/src/main/res-voice-icon/drawable-xhdpi/ic_common_bkg.png differ diff --git a/modules/mogo-module-apps/src/main/res-voice-icon/drawable-xhdpi/ic_runningg_bkg.png b/modules/mogo-module-apps/src/main/res-voice-icon/drawable-xhdpi/ic_runningg_bkg.png new file mode 100755 index 0000000000..f81081d300 Binary files /dev/null and b/modules/mogo-module-apps/src/main/res-voice-icon/drawable-xhdpi/ic_runningg_bkg.png differ