Explorar el Código

修改云教练SDK版本的延迟检测动效效果

Pq hace 9 meses
padre
commit
644f26b713
Se han modificado 26 ficheros con 84 adiciones y 89 borrados
  1. 2 2
      BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java
  2. 1 0
      BaseLibrary/src/main/res/values/colors.xml
  3. 1 0
      accompanySDK/src/main/java/com/daya/accompanysdk/manager/AccompanyHelper.java
  4. 29 35
      accompanySDK/src/main/java/com/daya/accompanysdk/widget/CustomDelayCheckView.java
  5. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_check_prepare.png
  6. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_icon_back.png
  7. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip1.png
  8. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip2.png
  9. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip3.png
  10. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip4.png
  11. BIN
      accompanySDK/src/main/res/drawable-xhdpi/ac_icon_tip.png
  12. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_check_prepare.png
  13. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_delay_check_bg.png
  14. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_delay_check_bg2.png
  15. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_back.png
  16. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip1.png
  17. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip2.png
  18. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip3.png
  19. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip4.png
  20. BIN
      accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_tip.png
  21. 51 52
      accompanySDK/src/main/res/layout/ac_custom_delay_check_layout.xml
  22. 0 0
      accompanySDK/src/main/res/raw/ac_delaycheck_bottom_bg_anim.json
  23. 0 0
      accompanySDK/src/main/res/raw/ac_delaycheck_bubble_anim.json
  24. 0 0
      accompanySDK/src/main/res/raw/ac_delaycheck_left_anim.json
  25. 0 0
      accompanySDK/src/main/res/raw/ac_delaycheck_right_anim.json
  26. 0 0
      accompanySDK/src/main/res/raw/ac_delaycheck_shooting_star_anim.json

+ 2 - 2
BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java

@@ -16,8 +16,8 @@ public abstract class WebConstants {
     public static final String WEB_URL = "web_url";//
     public static final String WEB_TITLE = "title";//
     //临时测试
-    public static final String WEB_SOCKET_URL_TEST = "wss://dev.colexiu.com/audioAnalysis";
-//    public static final String WEB_SOCKET_URL_TEST = "wss://test.kt.colexiu.com/audioAnalysis_kt";
+//    public static final String WEB_SOCKET_URL_TEST = "wss://dev.colexiu.com/audioAnalysis";
+    public static final String WEB_SOCKET_URL_TEST = "wss://test.kt.colexiu.com/audioAnalysis_kt";
     public static final String WEB_SOCKET_URL_RELEASE = "wss://mec.colexiu.com/audioAnalysis";
     public static final String WEB_SOCKET_URL_PRERELEASE = "wss://dev.kt.colexiu.com/audioAnalysis_kt";
 

+ 1 - 0
BaseLibrary/src/main/res/values/colors.xml

@@ -218,4 +218,5 @@
     <color name="color_ff5151">#FF5151</color>
     <color name="color_131415">#131415</color>
     <color name="color_f73f3b">#F73F3B</color>
+    <color name="color_2cb99e">#2CB99E</color>
 </resources>

+ 1 - 0
accompanySDK/src/main/java/com/daya/accompanysdk/manager/AccompanyHelper.java

@@ -235,6 +235,7 @@ public class AccompanyHelper {
      * @param c_orientation
      */
     public void startAccompanyPageByToken(Context context, String url, int orientation, int c_orientation){
+        url = "https://dev.colexiu.com/klx-music-score/?id=85992220";
         boolean status = url.contains("?");
         String userAuthorization = CacheHelper.getUserToken();
         if (status) {

+ 29 - 35
accompanySDK/src/main/java/com/daya/accompanysdk/widget/CustomDelayCheckView.java

@@ -29,11 +29,13 @@ public class CustomDelayCheckView extends BaseDelayCheckView {
     private View mViewRetry;
     private LottieAnimationView mViewAnim1;
     private LottieAnimationView mViewAnim2;
+    private LottieAnimationView mViewAnim3;
+    private LottieAnimationView mViewAnim4;
+    private LottieAnimationView mViewAnim5;
     private ImageView mIvBall;
     private ImageView mIvCenter;
     private ImageView mIvTip;
     private LinearLayout mLlEarphoneTip;
-    private ObjectAnimator ballAnimator;
     private ObjectAnimator mCenterAnim;
     private ConstraintLayout mCsRoot;
 
@@ -58,10 +60,11 @@ public class CustomDelayCheckView extends BaseDelayCheckView {
     public void initView() {
         super.initView();
         mIvBack = findViewById(R.id.iv_close);
-        mIvBall = findViewById(R.id.iv_ball);
-        ImageView iv_ball2 = findViewById(R.id.iv_ball2);
         mViewAnim1 = findViewById(R.id.view_anim1);
         mViewAnim2 = findViewById(R.id.view_anim2);
+        mViewAnim3 = findViewById(R.id.view_anim3);
+        mViewAnim4 = findViewById(R.id.view_anim4);
+        mViewAnim5 = findViewById(R.id.view_anim5);
         mIvTip = findViewById(R.id.iv_tip);
         mViewRetry = findViewById(R.id.view_retry);
         mIvCenter = findViewById(R.id.iv_center);
@@ -72,29 +75,24 @@ public class CustomDelayCheckView extends BaseDelayCheckView {
 
     private void fitPad() {
         boolean isTablet = QMUIDeviceHelper.isTablet(getContext());
-        ConstraintSet constraintSet =new ConstraintSet();
-        constraintSet.clone(mCsRoot);
-        constraintSet.connect(R.id.iv_center,ConstraintSet.TOP, R.id.iv_tip, ConstraintSet.BOTTOM);
-        constraintSet.connect(R.id.iv_center,ConstraintSet.LEFT, ConstraintSet.PARENT_ID, ConstraintSet.LEFT);
-        constraintSet.connect(R.id.iv_center,ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT);
-        if(isTablet){
-            constraintSet.connect(R.id.iv_center,ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM);
-            constraintSet.setMargin(R.id.iv_tip,ConstraintSet.TOP, SizeUtils.dp2px(50));
-        }
-        constraintSet.applyTo(mCsRoot);
+//        ConstraintSet constraintSet =new ConstraintSet();
+//        constraintSet.clone(mCsRoot);
+//        constraintSet.connect(R.id.iv_center,ConstraintSet.TOP, R.id.iv_tip, ConstraintSet.BOTTOM);
+//        constraintSet.connect(R.id.iv_center,ConstraintSet.LEFT, ConstraintSet.PARENT_ID, ConstraintSet.LEFT);
+//        constraintSet.connect(R.id.iv_center,ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT);
+//        if(isTablet){
+//            constraintSet.connect(R.id.iv_center,ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM);
+//            constraintSet.setMargin(R.id.iv_tip,ConstraintSet.TOP, SizeUtils.dp2px(50));
+//        }
+//        constraintSet.applyTo(mCsRoot);
     }
 
     @Override
     public void initData() {
         super.initData();
-        ballAnimator = ObjectAnimator.ofFloat(mIvBall, "rotation", 0f, 360f);
-        ballAnimator.setDuration(8000);
-        ballAnimator.setRepeatCount(ValueAnimator.INFINITE);
-        ballAnimator.setInterpolator(new LinearInterpolator());
-        ballAnimator.start();
 
         mCenterAnim = ObjectAnimator.ofFloat(mIvCenter, "translationY", 0f, 24f);
-        mCenterAnim.setDuration(1000);
+        mCenterAnim.setDuration(2000);
         mCenterAnim.setRepeatCount(ValueAnimator.INFINITE);
         mCenterAnim.setInterpolator(new LinearInterpolator());
         mCenterAnim.setRepeatMode(ValueAnimator.REVERSE);
@@ -135,18 +133,18 @@ public class CustomDelayCheckView extends BaseDelayCheckView {
     }
 
     private int getMainAnimRes(int step) {
-        if (step == CHECK_PREPARE) {
-            return R.drawable.ac_check_prepare;
-        }
-        if (step == CHECK_ING) {
-            return R.drawable.ac_check_ing;
-        }
-        if (step == CHECK_SUCCESS) {
-            return R.drawable.ac_check_success;
-        }
-        if (step == CHECK_FAIL) {
-            return R.drawable.ac_check_fail;
-        }
+//        if (step == CHECK_PREPARE) {
+//            return R.drawable.ac_check_prepare;
+//        }
+//        if (step == CHECK_ING) {
+//            return R.drawable.ac_check_ing;
+//        }
+//        if (step == CHECK_SUCCESS) {
+//            return R.drawable.ac_check_success;
+//        }
+//        if (step == CHECK_FAIL) {
+//            return R.drawable.ac_check_fail;
+//        }
         return R.drawable.ac_check_prepare;
     }
 
@@ -200,10 +198,6 @@ public class CustomDelayCheckView extends BaseDelayCheckView {
         if (mIvCenter != null) {
             mIvCenter.clearAnimation();
         }
-        if (ballAnimator != null) {
-            ballAnimator.cancel();
-            ballAnimator =null;
-        }
         if (mCenterAnim != null) {
             mCenterAnim.cancel();
             mCenterAnim =null;

BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_check_prepare.png


BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_icon_back.png


BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip1.png


BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip2.png


BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip3.png


BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_icon_delay_check_tip4.png


BIN
accompanySDK/src/main/res/drawable-xhdpi/ac_icon_tip.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_check_prepare.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_delay_check_bg.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_delay_check_bg2.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_back.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip1.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip2.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip3.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_delay_check_tip4.png


BIN
accompanySDK/src/main/res/drawable-xxhdpi/ac_icon_tip.png


+ 51 - 52
accompanySDK/src/main/res/layout/ac_custom_delay_check_layout.xml

@@ -13,20 +13,12 @@
         android:scaleType="centerCrop"
         android:src="@drawable/ac_delay_check_bg" />
 
-    <ImageView
-        android:scaleType="centerCrop"
-        android:visibility="visible"
-        android:id="@+id/iv_star"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:src="@drawable/ac_delay_check_bg2" />
-
-
     <com.airbnb.lottie.LottieAnimationView
         android:id="@+id/view_anim2"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_gravity="center"
+        app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent"
         app:lottie_autoPlay="true"
@@ -35,46 +27,28 @@
         app:lottie_clipToCompositionBounds="false"
         app:lottie_rawRes="@raw/ac_delaycheck_shooting_star_anim" />
 
-    <FrameLayout
-        android:id="@+id/fl_ball"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintRight_toRightOf="parent">
-
-        <ImageView
-            android:layout_marginBottom="12dp"
-            android:id="@+id/iv_ball"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="-40dp"
-            android:src="@drawable/ac_icon_ball" />
-    </FrameLayout>
 
-    <FrameLayout
-        android:id="@+id/fl_ball2"
-        android:layout_width="wrap_content"
+    <com.airbnb.lottie.LottieAnimationView
+        android:id="@+id/view_anim3"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintLeft_toLeftOf="parent">
-
-        <ImageView
-            android:layout_marginBottom="70dp"
-            android:id="@+id/iv_ball2"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="-45dp"
-            android:src="@drawable/ac_icon_ball2" />
-    </FrameLayout>
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:lottie_autoPlay="true"
+        app:lottie_imageAssetsFolder="acc_lottie/accompany/images/"
+        app:lottie_loop="true"
+        app:lottie_clipToCompositionBounds="true"
+        app:lottie_rawRes="@raw/ac_delaycheck_bottom_bg_anim" />
 
     <com.airbnb.lottie.LottieAnimationView
         android:id="@+id/view_anim1"
-        android:layout_width="204dp"
-        android:layout_height="130dp"
+        android:layout_width="96dp"
+        android:layout_height="87dp"
+        android:layout_marginStart="11dp"
+        app:layout_constraintLeft_toRightOf="@+id/iv_center"
         android:layout_gravity="center"
-        android:layout_marginTop="84dp"
-        android:layout_marginStart="32dp"
-        app:layout_constraintLeft_toLeftOf="parent"
+        android:layout_marginTop="41dp"
         app:layout_constraintTop_toTopOf="parent"
         app:lottie_autoPlay="true"
         app:lottie_imageAssetsFolder="acc_lottie/accompany/images/"
@@ -82,8 +56,34 @@
         app:lottie_clipToCompositionBounds="false"
         app:lottie_rawRes="@raw/ac_delaycheck_bubble_anim" />
 
+    <com.airbnb.lottie.LottieAnimationView
+        android:id="@+id/view_anim4"
+        android:layout_width="96dp"
+        android:layout_height="180dp"
+        android:layout_marginStart="11dp"
+        app:layout_constraintRight_toRightOf="parent"
+        android:layout_gravity="center"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:lottie_autoPlay="true"
+        app:lottie_imageAssetsFolder="acc_lottie/accompany/images/"
+        app:lottie_loop="true"
+        app:lottie_clipToCompositionBounds="false"
+        app:lottie_rawRes="@raw/ac_delaycheck_right_anim" />
 
 
+    <com.airbnb.lottie.LottieAnimationView
+        android:id="@+id/view_anim5"
+        android:layout_width="220dp"
+        android:layout_height="162dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        android:layout_gravity="center"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:lottie_autoPlay="true"
+        app:lottie_imageAssetsFolder="acc_lottie/accompany/images/"
+        app:lottie_loop="true"
+        app:lottie_clipToCompositionBounds="false"
+        app:lottie_rawRes="@raw/ac_delaycheck_left_anim" />
+
     <ImageView
         android:id="@+id/iv_close"
         android:layout_width="wrap_content"
@@ -95,18 +95,17 @@
         app:layout_constraintTop_toTopOf="parent" />
 
     <ImageView
-        app:layout_constraintBottom_toTopOf="@+id/iv_center"
+        app:layout_constraintBottom_toBottomOf="parent"
         android:id="@+id/iv_tip"
         android:layout_width="0dp"
         app:layout_constraintWidth_percent="0.418"
         android:layout_height="wrap_content"
         android:adjustViewBounds="true"
-        android:layout_marginTop="20dp"
+        android:layout_marginBottom="27dp"
         app:layout_constraintVertical_chainStyle="packed"
         android:src="@drawable/ac_icon_delay_check_tip1"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        app:layout_constraintRight_toRightOf="parent" />
 
     <View
         android:id="@+id/view_retry"
@@ -118,22 +117,23 @@
 
 
     <ImageView
-        app:layout_constraintTop_toBottomOf="@+id/iv_tip"
+        app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
         android:src="@drawable/ac_check_prepare"
         android:id="@+id/iv_center"
         android:layout_width="0dp"
         android:adjustViewBounds="true"
-        app:layout_constraintWidth_percent="0.383"
+        app:layout_constraintWidth_percent="0.367"
         android:layout_height="wrap_content"/>
 
 
     <LinearLayout
+        tools:visibility="visible"
         android:visibility="gone"
         android:id="@+id/ll_earphone_tip"
-        android:layout_marginBottom="46dp"
-        app:layout_constraintBottom_toBottomOf="parent"
+        android:layout_marginTop="24dp"
+        app:layout_constraintTop_toTopOf="parent"
         android:layout_width="wrap_content"
         android:layout_height="38dp"
         android:background="@drawable/acc_shape_70000000_19dp"
@@ -141,7 +141,6 @@
         android:orientation="horizontal"
         android:paddingStart="11dp"
         android:paddingEnd="7dp"
-        tools:visibility ="visible"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent">
 
@@ -167,7 +166,7 @@
             android:paddingStart="10dp"
             android:paddingEnd="10dp"
             android:text="我知道了"
-            android:textColor="@color/color_01c1b5"
+            android:textColor="@color/color_2cb99e"
             android:textSize="@dimen/sp_14" />
 
     </LinearLayout>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
accompanySDK/src/main/res/raw/ac_delaycheck_bottom_bg_anim.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
accompanySDK/src/main/res/raw/ac_delaycheck_bubble_anim.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
accompanySDK/src/main/res/raw/ac_delaycheck_left_anim.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
accompanySDK/src/main/res/raw/ac_delaycheck_right_anim.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
accompanySDK/src/main/res/raw/ac_delaycheck_shooting_star_anim.json


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio