优化卡片滑动性能:探路视频播放、C位事件逻辑;定制化app列表;修改小智动画策略;其他优化;
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.extensions;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
@@ -30,7 +31,8 @@ public class ExtensionsFragment extends MvpFragment< ExtensionsView, ExtensionsP
|
||||
|
||||
private static final String TAG = "ExtensionsFragment";
|
||||
|
||||
private JSurfaceView mVoiceIcon;
|
||||
private ImageView mVoiceIcon;
|
||||
private AnimationDrawable mAnim;
|
||||
private TextView mVoiceMsg;
|
||||
|
||||
private TextView mTime;
|
||||
@@ -55,6 +57,7 @@ public class ExtensionsFragment extends MvpFragment< ExtensionsView, ExtensionsP
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mVoiceIcon = findViewById( R.id.module_ext_id_voice );
|
||||
mAnim = ( AnimationDrawable ) mVoiceIcon.getBackground();
|
||||
mVoiceMsg = findViewById( R.id.module_ext_id_voice_msg );
|
||||
|
||||
mVoiceIcon.setOnClickListener( view -> {
|
||||
@@ -79,7 +82,7 @@ public class ExtensionsFragment extends MvpFragment< ExtensionsView, ExtensionsP
|
||||
} );
|
||||
mMsgCounter = findViewById( R.id.module_ext_id_msg_counter );
|
||||
|
||||
mVoiceIcon.setFrames( AnimRes.sRes );
|
||||
// mVoiceIcon.setFrames( AnimRes.sRes );
|
||||
|
||||
mMogoFragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation( getContext() );
|
||||
mMogoFragmentManager.addMainFragmentStackTransactionListener( size -> {
|
||||
@@ -101,19 +104,22 @@ public class ExtensionsFragment extends MvpFragment< ExtensionsView, ExtensionsP
|
||||
public void onActivityCreated( @Nullable Bundle savedInstanceState ) {
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
mAnalytics = ( IMogoAnalytics ) ARouter.getInstance().build( MogoServicePaths.PATH_UTILS_ANALYTICS ).navigation( getContext() );
|
||||
mVoiceIcon.startAnim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mVoiceIcon.startAnim();
|
||||
if ( mAnim != null ) {
|
||||
mAnim.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
mVoiceIcon.stop();
|
||||
if ( mAnim != null ) {
|
||||
mAnim.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -82,6 +82,7 @@ public class JSurfaceView extends SurfaceView implements Runnable, SurfaceHolder
|
||||
}
|
||||
bRunning = true;
|
||||
mThread = new Thread( this );
|
||||
mThread.setName( TAG + "thread" );
|
||||
mThread.start();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00000"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00001"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00002"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00003"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00004"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00005"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00006"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00007"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00008"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00009"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00010"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00011"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00012"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00013"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00014"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00015"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00016"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00017"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00018"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00019"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00020"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00021"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00022"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00023"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00024"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00025"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00026"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00027"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00028"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00029"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00030"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00031"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00032"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00033"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00034"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00035"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00036"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00037"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00038"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00039"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00040"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00041"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00042"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00043"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00044"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00045"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00046"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00047"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00048"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00049"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00050"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00051"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00052"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00053"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00054"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00055"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00056"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00057"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00058"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00059"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00060"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00061"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00062"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00063"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00064"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00065"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00066"
|
||||
android:duration="100" />
|
||||
<item
|
||||
android:drawable="@drawable/mogo_tts_icon_00067"
|
||||
android:duration="100" />
|
||||
</animation-list>
|
||||
@@ -8,13 +8,17 @@
|
||||
android:paddingLeft="@dimen/module_ext_paddingLeft"
|
||||
android:paddingRight="@dimen/module_ext_paddingRight">
|
||||
|
||||
<com.mogo.module.extensions.anim.JSurfaceView
|
||||
<ImageView
|
||||
android:id="@+id/module_ext_id_voice"
|
||||
android:layout_width="@dimen/module_ext_voice_icon_width"
|
||||
android:layout_height="@dimen/module_ext_voice_icon_height"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="@dimen/module_ext_voice_icon_width"
|
||||
android:layout_height="@dimen/module_ext_voice_icon_height"
|
||||
android:background="@drawable/module_ext_frame_anim_voice"/>
|
||||
|
||||
<!-- <com.mogo.module.extensions.anim.JSurfaceView-->
|
||||
<!-- />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_ext_id_voice_msg"
|
||||
|
||||
Reference in New Issue
Block a user