Просмотр исходного кода

1.应用升级为3.x版本
2.修改任务界面点击播放问题
3.修改权限问题
4.修改登陆后vip图片在vip状态下不消失问题

FailedToRead 2 лет назад
Родитель
Сommit
45170e8655
35 измененных файлов с 1624 добавлено и 439 удалено
  1. 1 0
      .idea/gradle.xml
  2. 8 6
      .idea/misc.xml
  3. 16 8
      app/build.gradle
  4. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_userread_count.png
  5. 75 24
      app/src/fragmentRecommend/layout/fragment_main_recommend.xml
  6. 92 0
      app/src/fragmentUser/layout/fragment_main_character_version_three.xml
  7. 9 2
      app/src/main/java/com/edufound/reader/activity/MainActivity.java
  8. 1 1
      app/src/main/java/com/edufound/reader/activity/SmallFullVideoActivity.java
  9. 8 0
      app/src/main/java/com/edufound/reader/activity/SplashActivity.java
  10. 114 14
      app/src/main/java/com/edufound/reader/adapter/SlideVideoAdapter.java
  11. 6 4
      app/src/main/java/com/edufound/reader/application/EApplication.java
  12. 1 1
      app/src/main/java/com/edufound/reader/base/BaseActivity.java
  13. 13 1
      app/src/main/java/com/edufound/reader/contract/CharacterFragmentContract.java
  14. 21 2
      app/src/main/java/com/edufound/reader/contract/RecommendFragmentContract.java
  15. 5 4
      app/src/main/java/com/edufound/reader/cusview/AutoPollRecyclerView.java
  16. 13 2
      app/src/main/java/com/edufound/reader/fragment/CharacterFragment.java
  17. 178 0
      app/src/main/java/com/edufound/reader/fragment/CharacterFragment3.java
  18. 129 10
      app/src/main/java/com/edufound/reader/fragment/RecommendFragment.java
  19. 1 0
      app/src/main/java/com/edufound/reader/model/CharacterFragmentModel.java
  20. 6 0
      app/src/main/java/com/edufound/reader/model/RecommendFragmentModel.java
  21. 0 2
      app/src/main/java/com/edufound/reader/popwindow/PopWindowUtil.java
  22. 26 3
      app/src/main/java/com/edufound/reader/presenter/CharacterFragmentPresenter.java
  23. 261 0
      app/src/main/java/com/edufound/reader/presenter/CharacterFragmentPresenterVersionThree.java
  24. 6 3
      app/src/main/java/com/edufound/reader/presenter/MainPresenter.java
  25. 9 2
      app/src/main/java/com/edufound/reader/presenter/MyTabFragmentPresenter.java
  26. 40 13
      app/src/main/java/com/edufound/reader/presenter/PopWindowPresneter.java
  27. 63 6
      app/src/main/java/com/edufound/reader/presenter/RecommendFragmentPresenter.java
  28. 0 4
      app/src/main/java/com/edufound/reader/presenter/RecordPresenter.java
  29. 5 1
      app/src/main/java/com/edufound/reader/presenter/SplashPresenter.java
  30. 0 3
      app/src/main/java/com/edufound/reader/services/RecordServices.java
  31. 2 0
      app/src/main/java/com/edufound/reader/tmailsdk/TMailSDKUtil.java
  32. 23 7
      app/src/main/java/com/edufound/reader/util/EfunboxUtil.java
  33. 142 0
      app/src/main/java/com/edufound/reader/util/FloatingAnimation.java
  34. 22 6
      app/src/main/res/layout/adapter_item_slidevideo.xml
  35. 328 310
      app/src/main/res/layout/popupwindow_record_status.xml

+ 1 - 0
.idea/gradle.xml

@@ -16,6 +16,7 @@
             <option value="$PROJECT_DIR$/app" />
           </set>
         </option>
+        <option name="resolveModulePerSourceSet" value="false" />
       </GradleProjectSettings>
     </option>
   </component>

+ 8 - 6
.idea/misc.xml

@@ -121,6 +121,7 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/activityLoginAlert/drawable/main_left_tab_follow_small_selector.xml" value="0.2185" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/activityLoginAlert/drawable/main_left_tab_myinfo_small_selector.xml" value="0.2185" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/activityLoginAlert/drawable/main_left_tab_recommend_small_selector.xml" value="0.2185" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/activityLoginAlert/drawable/popup_record_uploading_loading_anim.xml" value="0.212" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/drawable/adapter_item_slidevideo_tab_item_bg.xml" value="0.2245" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/drawable/adapter_item_video_tab_item_bg.xml" value="0.2165" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/drawable/list_divider_horizontal.xml" value="0.2185" />
@@ -141,7 +142,8 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentRecommend/layout/slide_video_marqueen_item.xml" value="0.67" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/activity_mycollection.xml" value="0.2542579075425791" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/activity_smallfull_video.xml" value="0.21897810218978103" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/adapter_item_record_authority.xml" value="0.9846547314578005" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/adapter_item_record_authority.xml" value="0.5" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/fragment_main_character_version_three.xml" value="0.2791970802919708" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/popupwindow_bind_wechat.xml" value="0.2913625304136253" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/popupwindow_cancellation_account.xml" value="0.2913625304136253" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentUser/layout/popupwindow_exit_login.xml" value="0.2384428223844282" />
@@ -169,7 +171,7 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_saffloer.xml" value="0.5" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_saffloer_sign_layout_item.xml" value="0.75" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_saffloer_window_item.xml" value="0.2542579075425791" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_splash.xml" value="0.26094890510948904" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_splash.xml" value="1.1" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_test.xml" value="0.24452554744525548" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_userinfo_setting.xml" value="0.2" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_web.xml" value="0.18" />
@@ -182,7 +184,7 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/adapter_item_record_user.xml" value="1.0" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/adapter_item_safflower.xml" value="0.2542579075425791" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/adapter_item_safflower_v2.xml" value="0.19829683698296838" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/adapter_item_slidevideo.xml" value="0.5" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/adapter_item_slidevideo.xml" value="0.25" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/anim_getfollow.xml" value="0.2542579075425791" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/cusjzplayer_controller.xml" value="0.2542579075425791" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/cusview_model_view_b.xml" value="0.2" />
@@ -191,13 +193,13 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/cusview_model_view_f.xml" value="0.5" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/cusview_model_view_g.xml" value="0.28284671532846717" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/first_tip.xml" value="0.2542579075425791" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_character.xml" value="0.2615571776155718" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_character.xml" value="0.33" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_event.xml" value="0.16" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_user.xml" value="0.25" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_user.xml" value="0.5" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/player_controller.xml" value="0.25790754257907544" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_exit_app.xml" value="0.2402676399026764" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_mi_sound_qrcode_layout.xml" value="0.18" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_record_status.xml" value="0.2451338199513382" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_record_status.xml" value="0.5" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_registration_events.xml" value="0.25" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_show_ranklist.xml" value="0.6077669902912621" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_show_rule.xml" value="0.26763990267639903" />

+ 16 - 8
app/build.gradle

@@ -13,8 +13,8 @@ android {
         applicationId "com.edufound.reader"
         minSdkVersion 21 //>23导致无法直接签名
         targetSdkVersion 30
-        versionCode 22
-        versionName "2.2"
+        versionCode 30
+        versionName "3.0"
         flavorDimensions "versionCode"
         manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
         ndk {
@@ -49,6 +49,12 @@ android {
                         def newoutputFile = "";
                         if (channel == ("2006")) {
                             newoutputFile = "\\义方\\"
+                        } else if (channel == ("3002")) {
+                            newoutputFile = "\\天猫精灵\\"
+                        } else if (channel == ("3003")) {
+                            newoutputFile = "\\小度音响\\"
+                        } else if (channel == ("2016")) {
+                            newoutputFile = "\\小爱音响\\"
                         }
                         output.outputFileName = new File(newoutputFile, fileName)
                     }
@@ -201,12 +207,14 @@ dependencies {
     //超长图imageview
     implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
 
-    //blibili弹幕
-    implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
-    implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
 
-//    # Other ABIs: optional
-    implementation 'com.github.ctiao:ndkbitmap-armv5:0.9.21'
-    implementation 'com.github.ctiao:ndkbitmap-x86:0.9.21'
+    // 1. Use Guava in your implementation only:
+    implementation("com.google.guava:guava:31.1-jre")
+    implementation("com.google.guava:guava:31.1-android")
 
+    //FloatingViewLib(https://github.com/UFreedom/FloatingView/blob/master/README_CN.md)
+    implementation 'com.ufreedom.uikit:FloatingViewLib:1.0.2'
+
+    //SimpleRatingBar(https://github.com/williamyyu/SimpleRatingBar)
+    implementation 'com.github.ome450901:SimpleRatingBar:1.4.0'
 }

BIN
app/src/fragmentRecommend/drawable/fragment_recommend_userread_count.png


+ 75 - 24
app/src/fragmentRecommend/layout/fragment_main_recommend.xml

@@ -6,6 +6,7 @@
     android:gravity="center">
 
     <FrameLayout
+        android:id="@+id/fragment_recommend_layout"
         android:layout_width="1002dp"
         android:layout_height="700dp"
         android:layout_gravity="center"
@@ -28,16 +29,18 @@
                 android:layout_height="0dp"
                 android:layout_gravity="center"
                 android:layout_weight="3"
-                android:paddingTop="10dp">
+                android:paddingLeft="20dp"
+                android:paddingTop="10dp"
+                android:paddingRight="20dp">
 
                 <FrameLayout
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
-                    android:layout_weight="1.5">
+                    android:layout_weight="1.6">
 
                     <FrameLayout
                         android:id="@+id/fragment_recommend_user_head_layout"
-                        android:layout_width="272dp"
+                        android:layout_width="262dp"
                         android:layout_height="61dp"
                         android:layout_gravity="center">
 
@@ -83,24 +86,25 @@
                             android:maxLength="11"
                             android:text="*****"
                             android:textColor="@color/fragment_recommend_user_color"
-                            android:textSize="28dp"></TextView>
+                            android:textSize="26dp"></TextView>
                     </FrameLayout>
 
                 </FrameLayout>
 
+
                 <FrameLayout
+                    android:id="@+id/fragment_recommend_userread_count_layout"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
                     android:layout_weight="1">
 
                     <FrameLayout
-                        android:id="@+id/fragment_recommend_comment_layout"
-                        android:layout_width="160dp"
+                        android:layout_width="150dp"
                         android:layout_height="61dp"
                         android:layout_gravity="center">
 
                         <ImageView
-                            android:layout_width="143dp"
+                            android:layout_width="133dp"
                             android:layout_height="52dp"
                             android:layout_gravity="center|right"
                             android:scaleType="fitXY"
@@ -115,13 +119,12 @@
                                 android:layout_width="52dp"
                                 android:layout_height="52dp"
                                 android:layout_gravity="center"
-                                android:src="@drawable/fragment_recommend_comment" />
-
+                                android:src="@drawable/fragment_recommend_userread_count" />
 
                         </FrameLayout>
 
                         <TextView
-                            android:id="@+id/fragment_recommend_comment_num"
+                            android:id="@+id/fragment_recommend_userread_num"
                             android:layout_width="match_parent"
                             android:layout_height="55dp"
                             android:layout_gravity="center|top"
@@ -129,55 +132,56 @@
                             android:gravity="center"
                             android:text="0"
                             android:textColor="@color/fragment_recommend_user_color"
-                            android:textSize="28dp"></TextView>
+                            android:textSize="26dp"></TextView>
                     </FrameLayout>
 
                 </FrameLayout>
 
+
                 <FrameLayout
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
                     android:layout_weight="1">
 
                     <FrameLayout
-                        android:id="@+id/fragment_recommend_collection_layout"
-                        android:layout_width="160dp"
+                        android:id="@+id/fragment_recommend_comment_layout"
+                        android:layout_width="150dp"
                         android:layout_height="61dp"
                         android:layout_gravity="center">
 
                         <ImageView
-                            android:layout_width="143dp"
+                            android:layout_width="133dp"
                             android:layout_height="52dp"
                             android:layout_gravity="center|right"
                             android:scaleType="fitXY"
                             android:src="@drawable/fragment_recommend_userhead_bg"></ImageView>
 
                         <FrameLayout
-                            android:layout_width="54dp"
+                            android:layout_width="52dp"
                             android:layout_height="match_parent">
 
 
                             <ImageView
-                                android:id="@+id/fragment_recommend_collection_icon"
                                 android:layout_width="52dp"
                                 android:layout_height="52dp"
-                                android:layout_gravity="center|left"
-                                android:src="@drawable/fragment_recommend_collection_icon" />
+                                android:layout_gravity="center"
+                                android:src="@drawable/fragment_recommend_comment" />
 
 
                         </FrameLayout>
 
                         <TextView
-                            android:id="@+id/fragment_recommend_collection_status"
+                            android:id="@+id/fragment_recommend_comment_num"
                             android:layout_width="match_parent"
                             android:layout_height="55dp"
                             android:layout_gravity="center|top"
-                            android:layout_marginLeft="15dp"
+                            android:layout_marginLeft="10dp"
                             android:gravity="center"
-                            android:text="未收藏"
+                            android:text="0"
                             android:textColor="@color/fragment_recommend_user_color"
-                            android:textSize="28dp"></TextView>
+                            android:textSize="26dp"></TextView>
                     </FrameLayout>
+
                 </FrameLayout>
 
                 <FrameLayout
@@ -187,12 +191,12 @@
 
                     <FrameLayout
                         android:id="@+id/fragment_recommend_thumbs_layout"
-                        android:layout_width="160dp"
+                        android:layout_width="150dp"
                         android:layout_height="61dp"
                         android:layout_gravity="center">
 
                         <ImageView
-                            android:layout_width="143dp"
+                            android:layout_width="133dp"
                             android:layout_height="52dp"
                             android:layout_gravity="center|right"
                             android:scaleType="fitXY"
@@ -226,6 +230,53 @@
                     </FrameLayout>
                 </FrameLayout>
 
+                <FrameLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1">
+
+                    <FrameLayout
+                        android:id="@+id/fragment_recommend_collection_layout"
+                        android:layout_width="150dp"
+                        android:layout_height="61dp"
+                        android:layout_gravity="center">
+
+                        <ImageView
+                            android:layout_width="133dp"
+                            android:layout_height="52dp"
+                            android:layout_gravity="center|right"
+                            android:scaleType="fitXY"
+                            android:src="@drawable/fragment_recommend_userhead_bg"></ImageView>
+
+                        <FrameLayout
+                            android:layout_width="54dp"
+                            android:layout_height="match_parent">
+
+
+                            <ImageView
+                                android:id="@+id/fragment_recommend_collection_icon"
+                                android:layout_width="52dp"
+                                android:layout_height="52dp"
+                                android:layout_gravity="center|left"
+                                android:src="@drawable/fragment_recommend_collection_icon" />
+
+
+                        </FrameLayout>
+
+                        <TextView
+                            android:id="@+id/fragment_recommend_collection_status"
+                            android:layout_width="match_parent"
+                            android:layout_height="55dp"
+                            android:layout_gravity="center|top"
+                            android:layout_marginLeft="18dp"
+                            android:gravity="center"
+                            android:text="未收藏"
+                            android:textColor="@color/fragment_recommend_user_color"
+                            android:textSize="26dp"></TextView>
+                    </FrameLayout>
+                </FrameLayout>
+
+
             </LinearLayout>
 
             <FrameLayout

+ 92 - 0
app/src/fragmentUser/layout/fragment_main_character_version_three.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_gravity="center"
+    android:layout_marginLeft="25dp"
+    android:paddingTop="30dp">
+
+
+    <HorizontalScrollView
+        android:id="@+id/fragment_main_character_scrollview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:scrollbars="none">
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal">
+
+            <FrameLayout
+                android:id="@+id/item1"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent">
+
+                <FrameLayout
+                    android:layout_width="326dp"
+                    android:layout_height="match_parent"
+                    android:divider="@drawable/fragment_user_info_divider"
+                    android:orientation="vertical"
+                    android:showDividers="middle">
+
+
+                    <ImageView
+                        android:id="@+id/fragment_main_character_img"
+                        android:layout_width="match_parent"
+                        android:layout_height="598dp"
+                        android:layout_gravity="bottom"
+                        android:layout_marginBottom="35dp"
+                        android:scaleType="fitXY"></ImageView>
+
+                </FrameLayout>
+            </FrameLayout>
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:divider="@drawable/fragment_user_info_divider"
+                android:orientation="vertical"
+                android:paddingLeft="30dp"
+                android:showDividers="middle">
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center|left"
+                    android:paddingLeft="10dp"
+                    android:text="全部资源"
+                    android:textColor="@color/white"
+                    android:textSize="26dp"></TextView>
+
+
+                <LinearLayout
+                    android:id="@+id/fragment_character_linearlayout"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:orientation="horizontal">
+
+                    <FrameLayout
+                        android:id="@+id/character_version_three_fragment_layout"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:visibility="gone"></FrameLayout>
+
+                </LinearLayout>
+            </LinearLayout>
+
+            <Space
+                android:id="@+id/fragment_main_character_bottomview"
+                android:layout_width="50dp"
+                android:layout_height="match_parent"></Space>
+        </LinearLayout>
+    </HorizontalScrollView>
+
+
+</FrameLayout>

+ 9 - 2
app/src/main/java/com/edufound/reader/activity/MainActivity.java

@@ -12,6 +12,7 @@ import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RadioButton;
@@ -65,10 +66,12 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
     @BindView(id = R.id.activity_main_exitapp_icon)
     ImageView mExitApp;
 
-
     @BindView(id = R.id.main_left_tab_linearlayout)
     LinearLayout mTabLayout;
 
+    @BindView(id = R.id.main_fragment_layout)
+    FrameLayout mFragmentLayout;
+
     @Override
     public int getLayoutId() {
         return R.layout.activity_main;
@@ -233,7 +236,11 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
 //            exitParams.leftMargin = SizeUtils.dp2px(mActivity, 10);
             mExitApp.setLayoutParams(exitParams);
         }
-        int defaultIndex = getIntent().getIntExtra("defaultIndex", defaultValue);
+        int a = getIntent().getIntExtra("defaultIndex", defaultValue);
+        if (a < 0) {
+            a = defaultValue;
+        }
+        int defaultIndex = a;
         mRadioGroupTab.postDelayed(new Runnable() {
             @Override
             public void run() {

+ 1 - 1
app/src/main/java/com/edufound/reader/activity/SmallFullVideoActivity.java

@@ -54,7 +54,7 @@ public class SmallFullVideoActivity extends BaseMvpActivity<SmallFullVideoPresen
                 }
                 return;
             }
-            if (into_Page.equals("MyCollection")) {
+            if (into_Page != null && into_Page.equals("MyCollection")) {
                 Intent i = new Intent();
                 setResult(MyCollectionModel.ACTIVITY_BACK_RESULT, i);
             }

+ 8 - 0
app/src/main/java/com/edufound/reader/activity/SplashActivity.java

@@ -2,12 +2,20 @@ package com.edufound.reader.activity;
 
 import android.app.Activity;
 import android.graphics.drawable.BitmapDrawable;
+import android.os.Message;
+import android.view.MotionEvent;
+import android.view.View;
+
+import androidx.annotation.NonNull;
 
 import com.edufound.reader.R;
 import com.edufound.reader.base.BaseMvpActivity;
 import com.edufound.reader.contract.SplashContract;
 import com.edufound.reader.presenter.SplashPresenter;
 import com.orhanobut.logger.Logger;
+import com.willy.ratingbar.RotationRatingBar;
+
+import java.util.logging.Handler;
 
 public class SplashActivity extends BaseMvpActivity<SplashPresenter> implements SplashContract.View {
     Activity mActivity;

+ 114 - 14
app/src/main/java/com/edufound/reader/adapter/SlideVideoAdapter.java

@@ -5,14 +5,19 @@ import android.app.Activity;
 import android.content.Intent;
 import android.graphics.Color;
 import android.graphics.Rect;
+import android.os.Build;
+import android.os.Message;
 import android.view.LayoutInflater;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.CompoundButton;
 import android.widget.FrameLayout;
+import android.widget.HorizontalScrollView;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.Switch;
+import android.widget.TextView;
 
 import com.edufound.reader.R;
 import com.edufound.reader.bean.ChannelCodeEnum;
@@ -35,8 +40,10 @@ import com.orhanobut.logger.Logger;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.logging.Handler;
 
 import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
@@ -57,7 +64,6 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
 
 
     public void addMored(List<UserRecordBean> listData) {
-
         mListData.addAll(listData);
     }
 
@@ -174,10 +180,10 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
                 public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                     if (b) {
                         holder.mMarqueen.setVisibility(View.VISIBLE);
-                        holder.mMarqueen.start();
+//                        holder.mMarqueen.start();
                     } else {
                         holder.mMarqueen.setVisibility(View.INVISIBLE);
-                        holder.mMarqueen.stop();
+//                        holder.mMarqueen.stop();
                     }
                 }
             });
@@ -221,6 +227,18 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
     public void onViewDetachedFromWindow(@NonNull VideoHolder holder) {
         super.onViewDetachedFromWindow(holder);
 //        holder.mSwitch.setChecked(false);
+        holder.moveHandler.removeMessages(1);
+        holder.handlerRunning = false;
+    }
+
+
+    @Override
+    public void onViewAttachedToWindow(@NonNull VideoHolder holder) {
+        super.onViewAttachedToWindow(holder);
+        if (holder.mScrollView != null) {
+            holder.handlerRunning = true;
+            holder.moveHandler.sendEmptyMessageDelayed(1, holder.mScrollViewMovedelayMillis);
+        }
     }
 
     @Override
@@ -238,40 +256,55 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
 class VideoHolder extends RecyclerView.ViewHolder {
     public View mItemView;
     public RvListJzvdStd mVideo;
-    public AutoPollRecyclerView mMarqueen;
+    public LinearLayout mMarqueen;
     public Switch mSwitch;
     public FrameLayout mEventFrame;
     public FrameLayout mTagLayout;
+    public FrameLayout mNotClickFrame;
     public Activity mContext;
+    public HorizontalScrollView mScrollView;
+    public int mScrollViewMovedelayMillis = 50;
+    public boolean handlerRunning = false;
 
     public VideoHolder(Activity context, @NonNull View itemView) {
         super(itemView);
         mContext = context;
         mItemView = itemView;
         mVideo = itemView.findViewById((R.id.slidevideo_video));
+        mNotClickFrame = itemView.findViewById(R.id.adapter_item_slidevideo_danmu_bg);
         mSwitch = itemView.findViewById(R.id.slidevideo_video_switch);
         mEventFrame = itemView.findViewById(R.id.adapter_item_slidevideo_event_frame);
         mTagLayout = itemView.findViewById(R.id.adapter_item_slidevideo_tagLayout);
         mTagLayout.setVisibility(View.GONE);
         mEventFrame.setVisibility(View.GONE);
         mSwitch.setVisibility(View.INVISIBLE);
-//        if (!Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
         mMarqueen = itemView.findViewById(R.id.slidevideo_video_marqueen);
-        mSwitch.setChecked(false);
+        mSwitch.setChecked(true);
         if (mSwitch.isChecked()) {
             mMarqueen.setVisibility(View.VISIBLE);
-            mMarqueen.start();
+            if (mScrollView != null) {
+                moveHandler.sendEmptyMessageDelayed(1, mScrollViewMovedelayMillis);
+            }
         } else {
             mMarqueen.setVisibility(View.INVISIBLE);
-            mMarqueen.stop();
+            if (mScrollView != null) {
+                moveHandler.removeMessages(1);
+            }
+
         }
-//        }
+        mNotClickFrame.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                return true;
+            }
+        });
 
     }
 
 
     public void initDanMu(String exampleId) {
-        OkHttpClient.doGetAsync(mContext, new HttpInfo.Builder().setUrl(Consts.getFinalApi() + "/posts/list").addParam("columnId", exampleId).addParam("pageNo", String.valueOf(1)).addParam("pageSize", "1000"), new Callback() {
+        OkHttpClient.doGetAsync(mContext, new HttpInfo.Builder().setUrl(Consts.getFinalApi() + "/posts/list").addParam("columnId", exampleId).addParam("pageNo", String.valueOf(1)).addParam("pageSize", "100"), new Callback() {
+            @RequiresApi(api = Build.VERSION_CODES.M)
             @Override
             public void onSuccess(HttpInfo info) throws IOException {
                 HttpResultBean<HttpResultDataListBean<CommentListBean>> bean = info.getRetDetail(new TypeToken<HttpResultBean<HttpResultDataListBean<CommentListBean>>>() {
@@ -283,10 +316,63 @@ class VideoHolder extends RecyclerView.ViewHolder {
                     return;
                 }
                 mSwitch.setVisibility(View.VISIBLE);
-                SlideVideoDanMarqueenAdapter adapter = new SlideVideoDanMarqueenAdapter(mContext, bean.getData().getList());
-                mMarqueen.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
-                mMarqueen.addItemDecoration(new SpacesItemDecoration(SizeUtils.dp2px(mContext, 23)));
-                mMarqueen.setAdapter(adapter);
+
+                boolean isNeedAdd = false;
+                List<CommentListBean> list = null;
+                if (bean.getData().getList().size() < 6) {
+                    list = bean.getData().getList();
+                    isNeedAdd = true;
+                }
+                if (isNeedAdd) {
+                    for (int i = 0; i < 3; i++) {
+                        bean.getData().getList().addAll(list);
+                    }
+                }
+
+                for (int i = 0; i < bean.getData().getList().size(); i++) {
+                    FrameLayout layout = (FrameLayout) LayoutInflater.from(mContext).inflate(R.layout.slide_video_marqueen_item, null, false);
+                    TextView tv = layout.findViewById(R.id.item_marqueen_text);
+                    tv.setText(bean.getData().getList().get(i).getDetailDesc());
+                    mMarqueen.addView(layout);
+                }
+                mScrollView = (HorizontalScrollView) mMarqueen.getParent();
+                mScrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
+                    @Override
+                    public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
+                        View view = ((HorizontalScrollView) v).getChildAt(0);
+                        //判断是否滑动栏到底了,如果是,就让iv这个图片隐藏,否则显示
+                        if (view.getMeasuredWidth() <= v.getScrollX() + v.getWidth()) {
+                            //滑动到底部了
+                            Logger.e("滑动到最后了");
+                            mScrollView.postDelayed(new Runnable() {
+                                @Override
+                                public void run() {
+                                    mScrollView.scrollTo(0, 0);
+                                }
+                            }, 2000);
+
+                        } else {
+                        }
+                    }
+                });
+                mScrollView.setOnTouchListener(new View.OnTouchListener() {
+                    @Override
+                    public boolean onTouch(View v, MotionEvent event) {
+                        return true;
+                    }
+                });
+                mMarqueen.postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        if (!handlerRunning) {
+                            moveHandler.sendEmptyMessageDelayed(1, mScrollViewMovedelayMillis);
+                        }
+                    }
+                }, 500);
+//                SlideVideoDanMarqueenAdapter adapter = new SlideVideoDanMarqueenAdapter(mContext, bean.getData().getList());
+//                mMarqueen.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, true));
+//                mMarqueen.addItemDecoration(new SpacesItemDecoration(SizeUtils.dp2px(mContext, 23)));
+//                mMarqueen.setAdapter(adapter);
             }
 
             @Override
@@ -295,6 +381,20 @@ class VideoHolder extends RecyclerView.ViewHolder {
             }
         });
     }
+
+    android.os.Handler moveHandler = new android.os.Handler(new android.os.Handler.Callback() {
+        @Override
+        public boolean handleMessage(@NonNull Message msg) {
+            switch (msg.what) {
+                case 1:
+                    mScrollView.scrollBy(2, 0);
+                    moveHandler.sendEmptyMessageDelayed(1, mScrollViewMovedelayMillis);
+                    break;
+            }
+            return false;
+        }
+    });
+
 }
 
 class SpacesItemDecoration extends RecyclerView.ItemDecoration {

+ 6 - 4
app/src/main/java/com/edufound/reader/application/EApplication.java

@@ -19,6 +19,7 @@ import com.baidu.duer.botsdk.BotSdk;
 import com.baidu.duer.botsdk.util.HeartBeatReporter;
 import com.edufound.reader.activity.CrashDialogActivity;
 import com.edufound.reader.activity.MainActivity;
+import com.edufound.reader.activity.SplashActivity;
 import com.edufound.reader.bean.ChannelCodeEnum;
 import com.edufound.reader.botsdk.BotConstants;
 import com.edufound.reader.botsdk.BotMessageListener;
@@ -62,7 +63,7 @@ public class EApplication extends Application {
             Consts.setmApplicAtion(this);
 
             //初始化异常监听
-            initException();
+//            initException();
 
             XmlPullParserFactory.newInstance().setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
 
@@ -192,8 +193,9 @@ public class EApplication extends Application {
                 new Handler(Looper.getMainLooper()).post(new Runnable() {
                     @Override
                     public void run() {
-                        toast.setText("Cockroach.install:onUncaughtExceptionHappened");
-                        toast.show();
+//                        toast.setText("Cockroach.install:onUncaughtExceptionHappened");
+//                        toast.show();
+                        Logger.e("Cockroach.install:onUncaughtExceptionHappened");
                     }
                 });
             }
@@ -285,7 +287,7 @@ public class EApplication extends Application {
         for (int i = 0; i < EApplication.mActivityList.size(); i++) {
             EApplication.mActivityList.get(i).finish();
         }
-        Intent intent = new Intent(Consts.getmApplicAtion(), MainActivity.class);
+        Intent intent = new Intent(Consts.getmApplicAtion(), SplashActivity.class);
         if (defaultIndex != -1) {
             intent.putExtra("defaultIndex", defaultIndex);
         }

+ 1 - 1
app/src/main/java/com/edufound/reader/base/BaseActivity.java

@@ -86,8 +86,8 @@ import io.reactivex.rxjava3.functions.Consumer;
 public abstract class BaseActivity extends AppCompatActivity {
 
     private static final int SHOW_FOLLOW = 0x5512;
-    private static final int SHOW_FIRST_TIP = 0x5513;
     private static final int TMAIL_INIT_SUCCESS = 0x5514;
+    private static final int SHOW_FIRST_TIP = 0x5513;
     private static final int TMAIL_INIT_ERROR = 0x5515;
     public CompositeDisposable mCompositeDisposable;
     //按home键的receiver

+ 13 - 1
app/src/main/java/com/edufound/reader/contract/CharacterFragmentContract.java

@@ -1,8 +1,10 @@
 package com.edufound.reader.contract;
 
 import android.app.Activity;
+import android.widget.FrameLayout;
 import android.widget.GridLayout;
 import android.widget.HorizontalScrollView;
+import android.widget.LinearLayout;
 import android.widget.Space;
 
 import com.edufound.reader.base.BaseView;
@@ -22,6 +24,10 @@ public interface CharacterFragmentContract {
         void getExampleAllSuccess();
 
         Space getBottomView();
+
+        FrameLayout getFragmentLayout();
+
+        HorizontalScrollView getScrllView();
     }
 
     interface Presenter {
@@ -29,9 +35,15 @@ public interface CharacterFragmentContract {
 
         void initGridLayout(GridLayout gridLayout);
 
-        void onDestory(GridLayout layout);
+        void initLinearLayout(LinearLayout linearLayout);
+
+        void onDestory(GridLayout layout, LinearLayout linearLayout);
 
         void getExampleAll();
 
+        void setVideoDanMuStatus(boolean bool);
+
+        void setVideoMarqueenStatus(int status);
+
     }
 }

+ 21 - 2
app/src/main/java/com/edufound/reader/contract/RecommendFragmentContract.java

@@ -2,13 +2,16 @@ package com.edufound.reader.contract;
 
 import android.app.Activity;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.Switch;
+
+import androidx.recyclerview.widget.RecyclerView;
 
 import com.edufound.reader.base.BaseView;
 import com.edufound.reader.bean.UserRecordBean;
+import com.edufound.reader.fragment.RecommendFragment;
 import com.okhttplib.callback.Callback;
 
-import androidx.recyclerview.widget.RecyclerView;
-
 public interface RecommendFragmentContract {
     interface Model {
         /**
@@ -33,6 +36,12 @@ public interface RecommendFragmentContract {
 
         void getMyFollowAllVideo(Activity activity, int pageIndex, Callback callback);
 
+
+        /**
+         * 获取当前exampleId下所有朗读视频
+         */
+        void getListByExampleId(Activity activity, String exampleId, Callback callback);
+
     }
 
     interface View extends BaseView {
@@ -54,6 +63,7 @@ public interface RecommendFragmentContract {
 
         void showAllUi();
 
+        RecommendFragment.ChangeCharacterListener getChangeCharacterListener();
 
 
     }
@@ -82,5 +92,14 @@ public interface RecommendFragmentContract {
 
         void getMyFollowAllVideo();
 
+
+        void getListByExampleId(String exampleId);
+
+        Switch getPlayingSwitch();
+
+        LinearLayout getPlayingMarqueen();
+
+
+        void clearAll();
     }
 }

+ 5 - 4
app/src/main/java/com/edufound/reader/cusview/AutoPollRecyclerView.java

@@ -7,6 +7,7 @@ import android.view.MotionEvent;
 import java.lang.ref.WeakReference;
 
 import androidx.recyclerview.widget.RecyclerView;
+
 import io.reactivex.rxjava3.annotations.Nullable;
 
 public class AutoPollRecyclerView extends RecyclerView {
@@ -57,14 +58,14 @@ public class AutoPollRecyclerView extends RecyclerView {
         switch (e.getAction()) {
             case MotionEvent.ACTION_DOWN:
                 if (running)
-                    stop();
-                break;
+//                    stop();
+                    break;
             case MotionEvent.ACTION_UP:
             case MotionEvent.ACTION_CANCEL:
             case MotionEvent.ACTION_OUTSIDE:
                 if (canRun)
-                    start();
-                break;
+//                    start();
+                    break;
         }
         return super.onTouchEvent(e);
     }

+ 13 - 2
app/src/main/java/com/edufound/reader/fragment/CharacterFragment.java

@@ -5,6 +5,7 @@ import android.graphics.Rect;
 import android.os.Build;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.FrameLayout;
 import android.widget.GridLayout;
 import android.widget.HorizontalScrollView;
 import android.widget.ImageView;
@@ -134,10 +135,20 @@ public class CharacterFragment extends BaseMvpFragment<CharacterFragmentPresente
     }
 
     @Override
+    public FrameLayout getFragmentLayout() {
+        return null;
+    }
+
+    @Override
+    public HorizontalScrollView getScrllView() {
+        return mScrollView;
+    }
+
+    @Override
     public void onDestroy() {
         isNeedLoad = true;
         mGridLayout.removeAllViews();
-        mPresenter.onDestory(mGridLayout);
+        mPresenter.onDestory(mGridLayout, null);
         super.onDestroy();
     }
 
@@ -160,6 +171,6 @@ public class CharacterFragment extends BaseMvpFragment<CharacterFragmentPresente
     @Override
     public void onDestroyView() {
         super.onDestroyView();
-        mPresenter.onDestory(mGridLayout);
+        mPresenter.onDestory(mGridLayout, null);
     }
 }

+ 178 - 0
app/src/main/java/com/edufound/reader/fragment/CharacterFragment3.java

@@ -0,0 +1,178 @@
+package com.edufound.reader.fragment;
+
+import android.annotation.SuppressLint;
+import android.graphics.Rect;
+import android.os.Build;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.GridLayout;
+import android.widget.HorizontalScrollView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.Space;
+
+import androidx.annotation.RequiresApi;
+
+import com.edufound.reader.R;
+import com.edufound.reader.activity.SafflowerActivity;
+import com.edufound.reader.base.BaseMvpFragment;
+import com.edufound.reader.bean.UserEventEnum;
+import com.edufound.reader.contract.CharacterFragmentContract;
+import com.edufound.reader.presenter.CharacterFragmentPresenter;
+import com.edufound.reader.presenter.CharacterFragmentPresenterVersionThree;
+import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.EfunboxUtil;
+import com.edufound.reader.util.GlideUtils;
+import com.jakewharton.rxbinding4.view.RxView;
+import com.orhanobut.logger.Logger;
+
+import io.reactivex.rxjava3.functions.Consumer;
+
+public class CharacterFragment3 extends BaseMvpFragment<CharacterFragmentPresenterVersionThree> implements CharacterFragmentContract.View {
+
+
+    View mRootView;
+    HorizontalScrollView mScrollView;
+    LinearLayout mLinearLayout;
+    Space mBottomView;
+    Rect mScreenRect;
+    boolean isNeedLoad = false;
+    FrameLayout mFragmentLayout;
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    @Override
+    protected void initView(View view) {
+        mRootView = view;
+        mPresenter = new CharacterFragmentPresenterVersionThree(getContext(), getFragmentManager());
+        mPresenter.attachView(this);
+        mScreenRect = new Rect(0, 0, Consts.getScreenSize()[0], Consts.getScreenSize()[1]);
+        //初始化左侧广告UI
+        ImageView mCharacterImage = view.findViewById(R.id.fragment_main_character_img);
+        if (Consts.isIsHaveFlowerEvent()) {
+            GlideUtils.loadImageSizeKipMemoryCache(getContext(), "http://reader-apk.ai160.com/reader-apk/res/character_image.png", mCharacterImage);
+        } else {
+            GlideUtils.loadImageSizeKipMemoryCache(getContext(), "http://reader-apk.ai160.com/reader-apk/res/character_image_1.png", mCharacterImage);
+        }
+        mScrollView = view.findViewById(R.id.fragment_main_character_scrollview);
+
+        mLinearLayout = view.findViewById(R.id.fragment_character_linearlayout);
+        mBottomView = view.findViewById(R.id.fragment_main_character_bottomview);
+        mFragmentLayout = view.findViewById(R.id.character_version_three_fragment_layout);
+        addUiClick(mCharacterImage, o -> {
+            if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
+                mPresenter.getUserApi().postUserEvent(getActivity(), UserEventEnum.EVENT_INTEGRAL.getEvent());
+                toNextActivity(SafflowerActivity.class);
+            }
+        });
+
+        mPresenter.getExampleAll();
+
+
+    }
+
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.fragment_main_character_version_three;
+    }
+
+    @SuppressLint("AutoDispose")
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    @Override
+    protected void initViewListener() {
+
+
+        RxView.scrollChangeEvents(mScrollView).subscribe(viewScrollChangeEvent -> {
+//            Logger.e("滑动滑动");
+            if (mBottomView.getLocalVisibleRect(mScreenRect)) {
+                if (isNeedLoad) {
+                    isNeedLoad = false;
+                    mPresenter.initLinearLayout(mLinearLayout);
+                }
+            } else {
+                isNeedLoad = true;
+            }
+//            mPresenter.setVideoDanMuStatus(false);
+//            mPresenter.setVideoMarqueenStatus(View.INVISIBLE);
+        });
+
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void onError(String errMessage) {
+
+    }
+
+    @Override
+    public ViewGroup getRootView() {
+        return (ViewGroup) mRootView;
+    }
+
+    @Override
+    public void addUiClick(View view, Consumer onNext) {
+        addUiClickListener(view, onNext);
+    }
+
+    @Override
+    public void getExampleAllSuccess() {
+        mPresenter.initLinearLayout(mLinearLayout);
+    }
+
+    @Override
+    public Space getBottomView() {
+        return mBottomView;
+    }
+
+    @Override
+    public FrameLayout getFragmentLayout() {
+        return mFragmentLayout;
+    }
+
+    @Override
+    public HorizontalScrollView getScrllView() {
+        return mScrollView;
+    }
+
+    @Override
+    public void onDestroy() {
+        isNeedLoad = true;
+        mLinearLayout.removeAllViews();
+        mPresenter.onDestory(null, mLinearLayout);
+        super.onDestroy();
+    }
+
+    @Override
+    public void onGetDisconnect() {
+
+    }
+
+    @Override
+    public void onGetMobileConnect() {
+
+    }
+
+    @Override
+    public void onGetWifiConnect() {
+
+    }
+
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        mFragmentLayout.removeAllViews();
+        mPresenter.onDestory(null, mLinearLayout);
+    }
+}

+ 129 - 10
app/src/main/java/com/edufound/reader/fragment/RecommendFragment.java

@@ -12,6 +12,9 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
 import com.baidu.duer.bot.directive.payload.AmountInfo;
 import com.baidu.duer.botsdk.BotIntent;
 import com.edufound.reader.R;
@@ -25,17 +28,21 @@ import com.edufound.reader.bean.UserEventEnum;
 import com.edufound.reader.bean.UserRecordBean;
 import com.edufound.reader.contract.RecommendFragmentContract;
 import com.edufound.reader.cusview.CusToast;
+import com.edufound.reader.presenter.PopWindowPresneter;
 import com.edufound.reader.presenter.RecommendFragmentPresenter;
 import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.DeviceUtil;
 import com.edufound.reader.util.EfunboxUtil;
+import com.edufound.reader.util.FloatingAnimation;
 import com.edufound.reader.util.GlideUtils;
 import com.edufound.reader.util.MMKVUtil;
 import com.orhanobut.logger.Logger;
+import com.ufreedom.floatingview.Floating;
+import com.ufreedom.floatingview.FloatingBuilder;
+import com.ufreedom.floatingview.FloatingElement;
 
 import java.util.HashMap;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
+import java.util.List;
 
 import io.reactivex.rxjava3.annotations.Nullable;
 
@@ -43,6 +50,7 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
 
 
     View mRootView;
+    FrameLayout mREcommendLayout;
     RecyclerView mRecyclerView;
     FrameLayout mUserHeadLayout;
     FrameLayout mCommentLayout;
@@ -60,9 +68,13 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     TextView mUserPhone;
     TextView mCommentCount;
     TextView mCollentStatus;
+    TextView mUserReadNum;
     TextView mThumbCount;
+    ImageView mCollectIconView;
     ImageView isFollow;
+    ImageView mThumbIconView;
     ImageView isUserVip;
+    FrameLayout mUserReadCountLayout;
 
     //默认是推荐 mFragmentType=0
     //关注 mFragmentType=1
@@ -78,8 +90,14 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     String mDataJson = null;
 
     String intoPage;
+    float mRootViewScaleX = 0;
+    float mRootViewScaleY = 0;
+
+    boolean isShowReadCount = false;
 
 
+    ChangeCharacterListener mChangeCharacterListener;
+
     public RecommendFragment(int type) {
         mFragmentType = type;
     }
@@ -93,6 +111,7 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
         mRootView.setVisibility(View.INVISIBLE);
         mPresenter = new RecommendFragmentPresenter(getContext());
         mPresenter.attachView(this);
+        mREcommendLayout = view.findViewById(R.id.fragment_recommend_layout);
         mRecyclerView = view.findViewById(R.id.fragment_recommend_recyclerview);
         mUserHeadLayout = view.findViewById(R.id.fragment_recommend_user_head_layout);
         mCommentLayout = view.findViewById(R.id.fragment_recommend_comment_layout);
@@ -106,8 +125,13 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
         mCommentCount = view.findViewById(R.id.fragment_recommend_comment_num);
         mCollentStatus = view.findViewById(R.id.fragment_recommend_collection_status);
         mThumbCount = view.findViewById(R.id.fragment_recommend_thumbs_num);
+        mCollectIconView = view.findViewById(R.id.fragment_recommend_collection_icon);
+        mThumbIconView = view.findViewById(R.id.fragment_recommend_thumbs_icon);
         isFollow = view.findViewById(R.id.fragment_main_recommend_isfollow);
         isUserVip = view.findViewById(R.id.fragment_recommend_app_user_isvip);
+        mUserReadCountLayout = view.findViewById(R.id.fragment_recommend_userread_count_layout);
+        mUserReadNum = view.findViewById(R.id.fragment_recommend_userread_num);
+        mUserReadCountLayout.setVisibility(View.GONE);
 
 
         if (!Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
@@ -159,6 +183,33 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     protected void initViewListener() {
 
 
+        if (Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())) {
+            //小米渠道,加个回调监听
+            EfunboxUtil.setMISoundLoginCallBack(new PopWindowPresneter.MISoundLoginCallBack() {
+                @Override
+                public void success() {
+                    if (EfunboxUtil.checkIsVip()) {
+                        if (isUserVip != null) {
+                            isUserVip.setVisibility(View.INVISIBLE);
+                        }
+                    }
+                    EfunboxUtil.clearMISoundLoginCallBack();
+                }
+
+                @Override
+                public void closeWindow() {
+
+                }
+            });
+        }
+
+        if (mRootViewScaleX > 0) {
+            mREcommendLayout.setScaleX(mRootViewScaleX);
+        }
+        if (mRootViewScaleY > 0) {
+            mREcommendLayout.setScaleY(mRootViewScaleY);
+        }
+
         if (hideBottom) {
             mVideoUp.setVisibility(View.GONE);
             mVideoNext.setVisibility(View.GONE);
@@ -242,6 +293,15 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     }
 
 
+    public void setLayoutViewScale(float x, float y) {
+        mRootViewScaleX = x;
+        mRootViewScaleY = y;
+    }
+
+    public void showUserReadCount(boolean bool) {
+        isShowReadCount = bool;
+    }
+
     public void scrollPosition(int position) {
         startPosition = position;
     }
@@ -277,18 +337,26 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
             mUserPhone.setText(bean.getUser().getNickName());
         }
         mCommentCount.setText(bean.getUserRead().getCommentAmount());
-
+        if (isShowReadCount) {
+            mUserReadCountLayout.setVisibility(View.VISIBLE);
+            addUiClickListener(mUserReadCountLayout, o -> {
+                mPresenter.getListByExampleId(bean.getUserRead().getExampleId());
+            });
+            mUserReadNum.setText(EfunboxUtil.checkNum10000(bean.getUserRead().getReadAmount()));
+        }
         if (bean.getIsFavorites() || bean.getFavoritesBean() != null) {
             mCollentStatus.setText("已收藏");
-            ((ImageView) mCollectionLayout.findViewById(R.id.fragment_recommend_collection_icon)).setImageResource(R.drawable.fragment_recommend_collection_icon_s);
+
+            mCollectIconView.setImageResource(R.drawable.fragment_recommend_collection_icon_s);
         } else {
             mCollentStatus.setText("未收藏");
-            ((ImageView) mCollectionLayout.findViewById(R.id.fragment_recommend_collection_icon)).setImageResource(R.drawable.fragment_recommend_collection_icon);
+            mCollectIconView.setImageResource(R.drawable.fragment_recommend_collection_icon);
         }
         if (bean.getIsLike()) {
-            ((ImageView) mThumbsLayout.findViewById(R.id.fragment_recommend_thumbs_icon)).setImageResource(R.drawable.fragment_recommend_thumbs_up_s);
+
+            mThumbIconView.setImageResource(R.drawable.fragment_recommend_thumbs_up_s);
         } else {
-            ((ImageView) mThumbsLayout.findViewById(R.id.fragment_recommend_thumbs_icon)).setImageResource(R.drawable.fragment_recommend_thumbs_up);
+            mThumbIconView.setImageResource(R.drawable.fragment_recommend_thumbs_up);
         }
 
         if (!bean.getUserRead().getTag().equals("ACTIVITY")) {
@@ -318,13 +386,28 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
         }
 
         addUiClickListener(mCollectionLayout, o -> {
+            //收藏
             if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
                 mPresenter.doFavorites(bean.getUserRead());
+
             }
         });
         addUiClickListener(mThumbsLayout, o -> {
+            //点赞
             if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
                 mPresenter.doLike(bean.getUserRead());
+                ImageView imageView = new ImageView(getActivity());
+                imageView.setLayoutParams(new ViewGroup.LayoutParams(mThumbIconView.getMeasuredWidth(), mThumbIconView.getMeasuredHeight()));
+                imageView.setImageDrawable(mThumbIconView.getDrawable());
+                Floating floating = new Floating(getActivity());
+                FloatingElement builder = new FloatingBuilder()
+                        .anchorView(mThumbIconView)
+                        .targetView(imageView)
+                        .offsetX(0)
+                        .offsetY(0)
+                        .floatingTransition(new FloatingAnimation.PlaneFloating(DeviceUtil.getHeight(getActivity())))
+                        .build();
+                floating.startFloating(builder);
             }
         });
         mThumbCount.setText(bean.getUserRead().getLikeAmount());
@@ -349,6 +432,18 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
             mCollentStatus.setText("未收藏");
             ((ImageView) mCollectionLayout.findViewById(R.id.fragment_recommend_collection_icon)).setImageResource(R.drawable.fragment_recommend_collection_icon);
         }
+        ImageView imageView = new ImageView(getActivity());
+        imageView.setLayoutParams(new ViewGroup.LayoutParams(mCollectIconView.getMeasuredWidth(), mCollectIconView.getMeasuredHeight()));
+        imageView.setImageDrawable(mCollectIconView.getDrawable());
+        Floating floating = new Floating(getActivity());
+        FloatingElement builder = new FloatingBuilder()
+                .anchorView(mCollectionLayout)
+                .targetView(imageView)
+                .offsetX(0)
+                .offsetY(0)
+                .floatingTransition(new FloatingAnimation.PlaneFloating(DeviceUtil.getHeight(getActivity())))
+                .build();
+        floating.startFloating(builder);
     }
 
     @Override
@@ -356,6 +451,7 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
         if (!count.equals(mThumbCount.getText().toString())) {
             ((ImageView) mThumbsLayout.findViewById(R.id.fragment_recommend_thumbs_icon)).setImageResource(R.drawable.fragment_recommend_thumbs_up_s);
         }
+
         mThumbCount.setText(count);
     }
 
@@ -406,12 +502,19 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     }
 
 
-    @Override
-    public void onDestroy() {
+    public void danMuStatus(boolean bool) {
+        mPresenter.getPlayingSwitch().setChecked(bool);
+    }
 
+    public void playingMarqueenStatus(int status) {
+        mPresenter.getPlayingMarqueen().setVisibility(status);
+    }
 
+    @Override
+    public void onDestroy() {
         mPresenter.activityDestory();
         mPresenter.detachView();
+        mPresenter.clearAll();
         super.onDestroy();
     }
 
@@ -477,4 +580,20 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     }
 
 
+    public void setChangeCharacterListener(ChangeCharacterListener listener) {
+        mChangeCharacterListener = listener;
+    }
+
+
+    @Override
+    public ChangeCharacterListener getChangeCharacterListener() {
+        return mChangeCharacterListener;
+    }
+
+
+    public interface ChangeCharacterListener {
+        void changeDataList(UserRecordBean list);
+    }
+
 }
+

+ 1 - 0
app/src/main/java/com/edufound/reader/model/CharacterFragmentModel.java

@@ -10,6 +10,7 @@ import com.okhttplib.callback.Callback;
 
 public class CharacterFragmentModel implements CharacterFragmentContract.Model {
     public static final int LOAD_GRID = 0x1231;
+    public static final int LOAD_LINEARLAYOUT = 0x1232;
     private String API = Consts.getFinalApi();
 
     @Override

+ 6 - 0
app/src/main/java/com/edufound/reader/model/RecommendFragmentModel.java

@@ -45,4 +45,10 @@ public class RecommendFragmentModel implements RecommendFragmentContract.Model {
     public void getMyFollowAllVideo(Activity activity, int pageIndex, Callback callback) {
         OkHttpClient.doGetAsync(activity, new HttpInfo.Builder().setUrl(API + "/fans/interest").addParam("pageNo", String.valueOf(pageIndex)).addParam("pageSize", "100"), callback);
     }
+
+    @Override
+    public void getListByExampleId(Activity activity, String exampleId, Callback callback) {
+        OkHttpClient.doGetAsync(activity, new HttpInfo.Builder().setUrl(API + "/userRead").addParam("exampleId", exampleId), callback);
+    }
+
 }

+ 0 - 2
app/src/main/java/com/edufound/reader/popwindow/PopWindowUtil.java

@@ -467,9 +467,7 @@ public class PopWindowUtil {
         mPresenter.initMiSoundLoginWindow(context, dialog_view, type, new PopWindowPresneter.MISoundLoginCallBack() {
             @Override
             public void success() {
-                Logger.e("popupwindow第一层的callback");
                 if (callBack != null) {
-                    Logger.e("调用传过来的callback的success");
                     callBack.success();
                 }
                 mPopupWindow.dismiss();

+ 26 - 3
app/src/main/java/com/edufound/reader/presenter/CharacterFragmentPresenter.java

@@ -12,6 +12,7 @@ import android.view.View;
 import android.widget.FrameLayout;
 import android.widget.GridLayout;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -88,16 +89,28 @@ public class CharacterFragmentPresenter extends BasePresenter<CharacterFragmentC
     }
 
     @Override
-    public void onDestory(GridLayout layout) {
+    public void initLinearLayout(LinearLayout linearLayout) {
+
+    }
+
+    @Override
+    public void onDestory(GridLayout layout, LinearLayout linearLayout) {
         if (mCharacterHandler != null) {
             mCharacterHandler.removeMessages(CharacterFragmentModel.LOAD_GRID);
             mCharacterHandler = null;
         }
-        layout.removeAllViews();
-        layout = null;
+        if (layout != null) {
+            layout.removeAllViews();
+            layout = null;
+        }
+        if (linearLayout != null) {
+            linearLayout.removeAllViews();
+            linearLayout = null;
+        }
         mView = null;
     }
 
+
     @Override
     public void getExampleAll() {
         mModel.getExampleAll(mView.getActivity(), new Callback() {
@@ -116,6 +129,16 @@ public class CharacterFragmentPresenter extends BasePresenter<CharacterFragmentC
         });
     }
 
+    @Override
+    public void setVideoDanMuStatus(boolean bool) {
+
+    }
+
+    @Override
+    public void setVideoMarqueenStatus(int status) {
+        
+    }
+
 
     private void setGridItemView(GridLayout gridLayout, int index) {
 

+ 261 - 0
app/src/main/java/com/edufound/reader/presenter/CharacterFragmentPresenterVersionThree.java

@@ -0,0 +1,261 @@
+package com.edufound.reader.presenter;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.GridLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+
+import com.edufound.reader.R;
+import com.edufound.reader.activity.SmallFullVideoActivity;
+import com.edufound.reader.apiserver.UserApiServerImpl;
+import com.edufound.reader.base.BaseActivity;
+import com.edufound.reader.base.BasePresenter;
+import com.edufound.reader.bean.HttpResultBean;
+import com.edufound.reader.bean.HttpResultDataListBean;
+import com.edufound.reader.bean.UserRecordBean;
+import com.edufound.reader.contract.CharacterFragmentContract;
+import com.edufound.reader.cusview.CusToast;
+import com.edufound.reader.fragment.RecommendFragment;
+import com.edufound.reader.model.CharacterFragmentModel;
+import com.edufound.reader.util.EfunboxUtil;
+import com.edufound.reader.util.GlideUtils;
+import com.edufound.reader.util.MMKVUtil;
+import com.edufound.reader.util.SizeUtils;
+import com.google.common.collect.Lists;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.okhttplib.HttpInfo;
+import com.okhttplib.callback.Callback;
+import com.orhanobut.logger.Logger;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import cn.jzvd.Jzvd;
+
+public class CharacterFragmentPresenterVersionThree extends BasePresenter<CharacterFragmentContract.View> implements CharacterFragmentContract.Presenter {
+    Context mContext;
+    CharacterFragmentModel mModel;
+    UserApiServerImpl mUserApi;
+    List<UserRecordBean> mDataList;
+    int mListStart = 0;
+    int mListEnd = 6;
+    List<List<UserRecordBean>> mLoadDataList;
+    RecommendFragment mRecommendFragment;
+    FragmentManager mFragmentManager;
+
+    public CharacterFragmentPresenterVersionThree(Context context, FragmentManager fragmentManager) {
+        mModel = new CharacterFragmentModel();
+        mUserApi = new UserApiServerImpl();
+        mContext = context;
+        mFragmentManager = fragmentManager;
+//        mDataList = new ArrayList<>();
+//        for (int i = 0; i < 100; i++) {
+//            mDataList.add("i=" + i);
+//        }
+
+
+    }
+
+    public UserApiServerImpl getUserApi() {
+        return mUserApi;
+    }
+
+    @Override
+    public void initGridLayout(GridLayout gridLayout) {
+    }
+
+    @Override
+    public void initLinearLayout(LinearLayout linearLayout) {
+        if (mLoadDataList == null || mLoadDataList.size() <= 0) {
+            return;
+        }
+        int timeCount = 0;
+        for (int j = mListStart; j < mListEnd; j++) {
+            timeCount++;
+            Message message = new Message();
+            message.obj = linearLayout;
+            message.what = CharacterFragmentModel.LOAD_LINEARLAYOUT;
+            message.arg1 = j;
+            mCharacterHandler.sendMessageDelayed(message, 50 * timeCount);
+        }
+        mListStart = mListEnd;
+        if (mListEnd + 3 > mLoadDataList.size()) {
+            mListEnd = mLoadDataList.size();
+        } else {
+            mListEnd = mListEnd + 3;
+        }
+    }
+
+    @Override
+    public void onDestory(GridLayout layout, LinearLayout linearLayout) {
+        if (mCharacterHandler != null) {
+            mCharacterHandler.removeMessages(CharacterFragmentModel.LOAD_GRID);
+            mCharacterHandler = null;
+            if (mRecommendFragment != null) {
+                mFragmentManager.beginTransaction().remove(mRecommendFragment);
+                mRecommendFragment = null;
+            }
+            Jzvd.releaseAllVideos();
+        }
+        if (layout != null) {
+            layout.removeAllViews();
+            layout = null;
+        }
+        if (linearLayout != null) {
+            linearLayout.removeAllViews();
+            linearLayout = null;
+        }
+        mView = null;
+    }
+
+    @Override
+    public void getExampleAll() {
+        mModel.getExampleAll(mView.getActivity(), new Callback() {
+            @Override
+            public void onSuccess(HttpInfo info) throws IOException {
+                HttpResultBean<HttpResultDataListBean<UserRecordBean>> bean = info.getRetDetail(new TypeToken<HttpResultBean<HttpResultDataListBean<UserRecordBean>>>() {
+                }.getType());
+                mDataList = bean.getData().getList();
+                mLoadDataList = Lists.partition(mDataList, 2);
+                mView.getExampleAllSuccess();
+            }
+
+            @Override
+            public void onFailure(HttpInfo info) throws IOException {
+
+            }
+        });
+    }
+
+    @Override
+    public void setVideoDanMuStatus(boolean bool) {
+        if (mRecommendFragment != null) {
+            mRecommendFragment.danMuStatus(bool);
+        }
+    }
+
+    @Override
+    public void setVideoMarqueenStatus(int status) {
+        if (mRecommendFragment != null) {
+            mRecommendFragment.playingMarqueenStatus(status);
+        }
+    }
+
+
+    private void setLinearLayoutItem(LinearLayout linearLayout, int index) {
+
+        //得改一下,变成2个一组
+        if (mView == null) {
+            return;
+        }
+        LinearLayout layout = new LinearLayout(mContext);
+        layout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT));
+        layout.setOrientation(LinearLayout.VERTICAL);
+
+//
+        List<UserRecordBean> data = mLoadDataList.get(index);
+        for (int i = 0; i < data.size(); i++) {
+            View view = LayoutInflater.from(mContext).inflate(R.layout.adapter_item_record_authority, null);
+            ImageView imgIcon = view.findViewById(R.id.adapter_item_record_authority_icon);
+            TextView name = view.findViewById(R.id.adapter_item_record_authority_name);
+            TextView allcount = view.findViewById(R.id.adapter_item_record_authority_allcount_num);
+            TextView looknum = view.findViewById(R.id.adapter_item_record_authority_look_num);
+            TextView thumbnum = view.findViewById(R.id.adapter_item_record_authority_thumb_num);
+            TextView startnum = view.findViewById(R.id.adapter_item_record_authority_start_num);
+            GlideUtils.loadImage(mContext, data.get(i).getUserRead().getCoverImg(), imgIcon);
+            name.setText(data.get(i).getUserRead().getTitle());
+            allcount.setText(EfunboxUtil.checkNum10000(data.get(i).getUserRead().getReadAmount()));
+            looknum.setText(EfunboxUtil.checkNum10000(data.get(i).getUserRead().getPlayAmount()));
+            thumbnum.setText(EfunboxUtil.checkNum10000(data.get(i).getUserRead().getLikeAmount()));
+            startnum.setText(EfunboxUtil.checkNum10000(data.get(i).getUserRead().getFavoritesAmount()));
+            int finalI = i;
+            mView.addUiClick(view, o -> {
+//                Bundle bundle = new Bundle();
+//                bundle.putString("index", index + "");
+//                bundle.putString("dataJson", "getmmkv");
+//                bundle.putString("intoPage", "Character");
+//                //数据太多了。直接传不过去,通过MMKV写一下再读一下
+//                MMKVUtil.getInstance().encode("video_data", ((BaseActivity) mView.getActivity()).getGson().toJson(mDataList));
+//                ((BaseActivity) mView.getActivity()).toNextActivity(SmallFullVideoActivity.class, bundle);
+//                CusToast.getInstance(mContext).show(finalI + "", 3000);
+                if (mRecommendFragment != null) {
+                    mFragmentManager.beginTransaction().remove(mRecommendFragment);
+                    mRecommendFragment = null;
+                }
+                mRecommendFragment = new RecommendFragment(2);
+                FragmentTransaction transaction = mFragmentManager.beginTransaction();
+                transaction.addToBackStack(null);
+                transaction.replace(R.id.character_version_three_fragment_layout, mRecommendFragment);
+                List<UserRecordBean> list = new ArrayList<>();
+                list.add(data.get(finalI));
+                mRecommendFragment.setDataJson(new Gson().toJson(list));
+                mRecommendFragment.hiddenBottomView();
+                mRecommendFragment.showUserReadCount(true);
+                mRecommendFragment.setLayoutViewScale(0.92f, 0.92f);
+                mRecommendFragment.setChangeCharacterListener(new RecommendFragment.ChangeCharacterListener() {
+                    @Override
+                    public void changeDataList(UserRecordBean list) {
+                        data.remove(finalI);
+                        data.add(finalI, list);
+                    }
+                });
+                transaction.commit();
+//                mView.getFragmentLayout().setBackgroundColor(Color.RED);
+                linearLayout.removeView(mView.getFragmentLayout());
+                if (index - 1 < 0) {
+                    linearLayout.addView(mView.getFragmentLayout(), 0);
+                } else {
+                    linearLayout.addView(mView.getFragmentLayout(), index);
+                }
+                mView.getFragmentLayout().setVisibility(View.VISIBLE);
+
+                mView.getScrllView().postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        //- SizeUtils.dp2px(mContext, 100)
+                        mView.getScrllView().smoothScrollTo(mView.getFragmentLayout().getLeft() + view.getWidth() - (view.getWidth() / 6), 0);
+                    }
+                }, 200);
+
+            });
+
+
+            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(new LinearLayout.LayoutParams(SizeUtils.dp2px(mContext, 415), SizeUtils.dp2px(mContext, 290)));
+            params.setMargins(SizeUtils.dp2px(mContext, 10), 0, SizeUtils.dp2px(mContext, 20), SizeUtils.dp2px(mContext, 20));
+            view.setLayoutParams(params);
+            layout.addView(view);
+        }
+        linearLayout.addView(layout);
+    }
+
+
+    Handler mCharacterHandler = new Handler(new Handler.Callback() {
+        @Override
+        public boolean handleMessage(Message msg) {
+            switch (msg.what) {
+                case CharacterFragmentModel.LOAD_LINEARLAYOUT:
+                    setLinearLayoutItem((LinearLayout) msg.obj, msg.arg1);
+                    break;
+                default:
+                    throw new IllegalStateException("Unexpected value: " + msg.what);
+            }
+            return false;
+        }
+    });
+
+}

+ 6 - 3
app/src/main/java/com/edufound/reader/presenter/MainPresenter.java

@@ -38,6 +38,7 @@ import com.edufound.reader.cusview.ModelViewE;
 import com.edufound.reader.cusview.ModelViewF;
 import com.edufound.reader.cusview.ModelViewWidthA;
 import com.edufound.reader.fragment.CharacterFragment;
+import com.edufound.reader.fragment.CharacterFragment3;
 import com.edufound.reader.fragment.EventFragment;
 import com.edufound.reader.fragment.MyTabFragment;
 import com.edufound.reader.fragment.RecommendFragment;
@@ -78,7 +79,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
     RecommendFragment mRecommendFragment;
     FragmentManager mFragmentManager;
     RecommendFragment mFollowFragment;
-    CharacterFragment mCharacterFragment;
+    CharacterFragment3 mCharacterFragment;
     int mRadioCheckIndex = -1;
 
     public MainPresenter(FragmentManager fragmentManager) {
@@ -172,7 +173,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
                 mRecommendFragment = null;
                 mEventFragment = null;
                 if (mCharacterFragment == null) {
-                    mCharacterFragment = new CharacterFragment();
+                    mCharacterFragment = new CharacterFragment3();
                 }
                 changeFragmentLayout(mCharacterFragment);
                 mUserApi.postUserEvent(mView.getActivity(), UserEventEnum.EVENT_RESOURCES.getEvent());
@@ -395,6 +396,8 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
                         }.getType());
                         if (!TextUtils.isEmpty(bean.getData())) {
                             Consts.setIsYFVip(true);
+                        } else {
+                            Consts.setIsYFVip(false);
                         }
                     }
 
@@ -475,7 +478,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
         mUserFragment = new MyTabFragment();
         mRecommendFragment = new RecommendFragment(0);
         mFollowFragment = new RecommendFragment(1);
-        mCharacterFragment = new CharacterFragment();
+        mCharacterFragment = new CharacterFragment3();
     }
 
 

+ 9 - 2
app/src/main/java/com/edufound/reader/presenter/MyTabFragmentPresenter.java

@@ -7,6 +7,7 @@ import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
@@ -332,7 +333,6 @@ public class MyTabFragmentPresenter extends BasePresenter<MyTabFragmentContract.
                 HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
                 }.getType());
                 if (Boolean.valueOf(bean.getData())) {
-
                 } else {
                     Logger.e("没有购买");
                 }
@@ -354,7 +354,14 @@ public class MyTabFragmentPresenter extends BasePresenter<MyTabFragmentContract.
                 Logger.e("获取是否有权限:" + info.getRetDetail());
                 HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
                 }.getType());
-                mView.getIsBuySuccess(TimeUtil.timeStamp2Date(Long.valueOf(bean.getData()), "yyyy-MM-dd"));
+                if (!TextUtils.isEmpty(bean.getData())) {
+                    Consts.setIsYFVip(true);
+                    mView.getIsBuySuccess(TimeUtil.timeStamp2Date(Long.valueOf(bean.getData()), "yyyy-MM-dd"));
+                } else {
+                    Consts.setIsYFVip(false);
+
+                }
+
             }
 
             @Override

+ 40 - 13
app/src/main/java/com/edufound/reader/presenter/PopWindowPresneter.java

@@ -7,6 +7,7 @@ import android.graphics.Rect;
 import android.os.Handler;
 import android.os.Message;
 import android.text.TextUtils;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.inputmethod.InputMethodManager;
@@ -57,6 +58,8 @@ import com.okhttplib.HttpInfo;
 import com.okhttplib.callback.Callback;
 import com.okhttplib.callback.ProgressCallback;
 import com.orhanobut.logger.Logger;
+import com.willy.ratingbar.RotationRatingBar;
+import com.willy.ratingbar.ScaleRatingBar;
 
 import org.json.JSONObject;
 
@@ -89,7 +92,14 @@ public class PopWindowPresneter {
         FrameLayout mUploadingFrame = dialog_view.findViewById(R.id.popupwindow_record_status_uploading_frame);
         FrameLayout mUploadingSuccessFrame = dialog_view.findViewById(R.id.popupwindow_record_status_uploading_success_frame);
         FrameLayout mUploadingErrorFrame = dialog_view.findViewById(R.id.popupwindow_record_status_uploading_error_frame);
-        LinearLayout startLayout = mOverFrame.findViewById(R.id.popupwindow_record_status_over_start_layout);
+//        LinearLayout startLayout = mOverFrame.findViewById(R.id.popupwindow_record_status_over_start_layout);
+        ScaleRatingBar rotationRatingBar = mOverFrame.findViewById(R.id.popupwindow_record_status_over_ratingbar);
+        rotationRatingBar.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                return true;
+            }
+        });
         FrameLayout mRePlay = mOverFrame.findViewById(R.id.popupwindow_record_status_over_replay);
         FrameLayout mUpload = mOverFrame.findViewById(R.id.popupwindow_record_status_over_upload);
 //        float a = bean.getOverall() / 100f;//百分制
@@ -115,20 +125,28 @@ public class PopWindowPresneter {
             //5个星星
             startCount = 5;
         }
+//        startCount = 3;
         //先显示评测报告,处理测评报告逻辑
         {
             mOverFrame.setVisibility(View.VISIBLE);
-            startLayout.removeAllViews();
-            for (int i = 0; i < 5; i++) {
-                ImageView start = new ImageView(activity);
-                if (i < startCount) {
-                    start.setImageResource(R.drawable.popup_record_status_over_stars_true);
-                } else {
-                    start.setImageResource(R.drawable.popup_record_status_over_stars_false);
-                }
-                start.setLayoutParams(new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 1));
-                startLayout.addView(start);
+//            startLayout.removeAllViews();
+            Message startMessage = null;
+            for (int i = 0; i < startCount; i++) {
+                startMessage = new Message();
+                startMessage.arg1 = i + 1;
+                startMessage.obj = rotationRatingBar;
+                startMessage.what = 0x1315;
+//                ImageView start = new ImageView(activity);
+//                if (i < startCount) {
+//                    start.setImageResource(R.drawable.popup_record_status_over_stars_true);
+//                } else {x
+//                    start.setImageResource(R.drawable.popup_record_status_over_stars_false);
+//                }
+//                start.setLayoutParams(new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 1));
+//                startLayout.addView(start);
+                handler.sendMessageDelayed(startMessage, i * 200);
             }
+
             TextView completionText = mOverFrame.findViewById(R.id.popupwindow_record_status_over_completion_text);
             TextView correctrateText = mOverFrame.findViewById(R.id.popupwindow_record_status_over_correctrate_text);
             TextView speedText = mOverFrame.findViewById(R.id.popupwindow_record_status_over_speed_text);
@@ -651,7 +669,6 @@ public class PopWindowPresneter {
                                     handler.sendEmptyMessageDelayed(0x1313, 1000);
                                     return;
                                 } else {
-                                    Logger.e("info.getR:" + info.getRetDetail());
                                     handler.removeMessages(0x1313);
                                     loginSuccess = true;
                                     HttpResultBean<UserBean> bean = info.getRetDetail(new TypeToken<HttpResultBean<UserBean>>() {
@@ -671,7 +688,6 @@ public class PopWindowPresneter {
                                             } catch (Exception e) {
                                                 e.printStackTrace();
                                             } finally {
-                                                miSoundLoginCallback.success();
                                                 if (Consts.getUmengChannel().equals(ChannelCodeEnum.YIFANG.getChannelCode()) ||
                                                         Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode()) ||
                                                         Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())
@@ -685,16 +701,22 @@ public class PopWindowPresneter {
                                                                 }.getType());
                                                                 if (!TextUtils.isEmpty(bean.getData())) {
                                                                     Consts.setIsYFVip(true);
+                                                                } else {
+                                                                    Consts.setIsYFVip(false);
                                                                 }
+                                                                miSoundLoginCallback.success();
                                                             }
 
                                                             @Override
                                                             public void onFailure(HttpInfo info) throws IOException {
+                                                                Logger.e("查询权限接口失败");
+                                                                Consts.setIsYFVip(false);
 
                                                             }
                                                         });
                                                     }
                                                 }
+
                                             }
 
                                         }
@@ -733,6 +755,11 @@ public class PopWindowPresneter {
                     }
                     break;
 
+                case 0x1315:
+                    //星星动画
+                    ((ScaleRatingBar) message.obj).setRating(message.arg1);
+                    break;
+
             }
             return false;
         }

+ 63 - 6
app/src/main/java/com/edufound/reader/presenter/RecommendFragmentPresenter.java

@@ -3,13 +3,16 @@ package com.edufound.reader.presenter;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Outline;
+import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.View;
 import android.view.ViewOutlineProvider;
+import android.widget.LinearLayout;
 import android.widget.Switch;
 import android.widget.Toast;
 
 import com.edufound.reader.R;
+import com.edufound.reader.activity.SmallFullVideoActivity;
 import com.edufound.reader.activity.WebActivity;
 import com.edufound.reader.adapter.SlideVideoAdapter;
 import com.edufound.reader.apiserver.UserApiServerImpl;
@@ -22,6 +25,7 @@ import com.edufound.reader.bean.HttpResultDataListBean;
 import com.edufound.reader.bean.ThroughType;
 import com.edufound.reader.bean.UserRecordBean;
 import com.edufound.reader.contract.RecommendFragmentContract;
+import com.edufound.reader.cusview.AutoPollRecyclerView;
 import com.edufound.reader.cusview.CusToast;
 import com.edufound.reader.cusview.RvListJzvdStd;
 import com.edufound.reader.model.RecommendFragmentModel;
@@ -34,6 +38,7 @@ import com.edufound.reader.util.SizeUtils;
 import com.edufound.reader.util.ThroughUtil;
 import com.edufound.reader.videoutil.OnViewPagerListener;
 import com.edufound.reader.videoutil.ViewPagerLayoutManager;
+import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.okhttplib.HttpInfo;
 import com.okhttplib.callback.Callback;
@@ -65,7 +70,8 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
     int mPageIndex = 1;
     boolean loadOver = false;
     UserApiServerImpl mUserApi;
-
+    Switch onPlayingSwitch;
+    LinearLayout onPlayingMarqueen;
 
     public RecommendFragmentPresenter(Context context) {
         mModel = new RecommendFragmentModel();
@@ -106,6 +112,7 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
                 }
             });
         } else if (type == 1) {
+            Logger.e("获取关注");
             //关注的所有人的所有视频
             initVideoDate(rv, startPosition);
 
@@ -169,7 +176,7 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
                 mCurrentPosition = position;
                 autoPlayVideo(rv);
                 if (mCurrentPosition == 0) {
-                    Toast.makeText(mContext, "到顶了", Toast.LENGTH_SHORT).show();
+//                    Toast.makeText(mContext, "到顶了", Toast.LENGTH_SHORT).show();
                 } else if (mCurrentPosition == (mTotalSize - 1)) {
                     Toast.makeText(mContext, "到底了", Toast.LENGTH_SHORT).show();
                 }
@@ -187,8 +194,6 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
             @Override
             public void onChildViewDetachedFromWindow(View view) {
                 Jzvd jzvd = view.findViewById(R.id.slidevideo_video);
-                Switch switcss = view.findViewById(R.id.slidevideo_video_switch);
-                switcss.setChecked(false);
                 if (jzvd != null && Jzvd.CURRENT_JZVD != null && jzvd.jzDataSource != null &&
                         jzvd.jzDataSource.containsTheUrl(Jzvd.CURRENT_JZVD.jzDataSource.getCurrentUrl())) {
                     if (Jzvd.CURRENT_JZVD != null && Jzvd.CURRENT_JZVD.screen != Jzvd.SCREEN_FULLSCREEN) {
@@ -342,6 +347,7 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
                     mView.setFavorites(true);
                     intent.setAction(BackPageReceiver.BACK_HOME_ADD_VIDEO_ITEM);
                 }
+                mView.getChangeCharacterListener().changeDataList(mDataList.get(mCurrentPosition));
                 intent.putExtra("position", String.valueOf(mCurrentPosition));
                 mContext.sendBroadcast(intent);
             }
@@ -360,7 +366,12 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
             public void onSuccess(HttpInfo info) throws IOException {
                 HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
                 }.getType());
-                mView.setLikes(bean.getData());
+                if (!TextUtils.isEmpty(bean.getData())) {
+                    mView.setLikes(bean.getData());
+                    mDataList.get(mCurrentPosition).setLike(true);
+                    mDataList.get(mCurrentPosition).getUserRead().setLikeAmount(bean.getData());
+                    mView.getChangeCharacterListener().changeDataList(mDataList.get(mCurrentPosition));
+                }
             }
 
             @Override
@@ -443,6 +454,50 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
         });
     }
 
+    @Override
+    public void getListByExampleId(String exampleId) {
+        mModel.getListByExampleId(mView.getActivity(), exampleId, new Callback() {
+            @Override
+            public void onSuccess(HttpInfo info) throws IOException {
+                HttpResultBean<HttpResultDataListBean<UserRecordBean>> bean = info.getRetDetail(new TypeToken<HttpResultBean<HttpResultDataListBean<UserRecordBean>>>() {
+                }.getType());
+                Bundle bundle = new Bundle();
+                bundle.putString("index", 0 + "");
+                bundle.putString("dataJson", new Gson().toJson(bean.getData().getList()));
+                //数据太多了。直接传不过去,通过MMKV写一下再读一下
+                Intent intent = new Intent(mContext, SmallFullVideoActivity.class);
+                intent.putExtra("params_bundle", bundle);
+                mContext.startActivity(intent);
+            }
+
+            @Override
+            public void onFailure(HttpInfo info) throws IOException {
+
+            }
+        });
+    }
+
+    @Override
+    public Switch getPlayingSwitch() {
+        if (onPlayingSwitch != null) {
+            return onPlayingSwitch;
+        }
+        return null;
+    }
+
+    @Override
+    public LinearLayout getPlayingMarqueen() {
+        return onPlayingMarqueen;
+    }
+
+    @Override
+    public void clearAll() {
+        mViewPagerLayoutManager = null;
+        mDataList = null;
+        mAdapter = null;
+        Jzvd.releaseAllVideos();
+    }
+
     private void autoPlayVideo(RecyclerView rv) {
         if (rv == null || rv.getChildAt(0) == null) {
             return;
@@ -461,6 +516,8 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
         int childLayoutPosition = rv.getChildLayoutPosition(childAt);
         mView.setTopStatus(mDataList.get(childLayoutPosition));
         RvListJzvdStd player = rv.getChildAt(0).findViewById(R.id.slidevideo_video);
+        onPlayingSwitch = rv.getChildAt(0).findViewById(R.id.slidevideo_video_switch);
+        onPlayingMarqueen = rv.getChildAt(0).findViewById(R.id.slidevideo_video_marqueen);
         if (player != null) {
             if (player.state == Jzvd.STATE_PLAYING) {
                 //正在播放
@@ -543,7 +600,7 @@ public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentC
             rv.smoothScrollToPosition(mCurrentPosition - 1);
             mCurrentPosition = mCurrentPosition - 1;
         } else if (mCurrentPosition == 0) {
-            Toast.makeText(mContext, "到顶了", Toast.LENGTH_SHORT).show();
+//            Toast.makeText(mContext, "到顶了", Toast.LENGTH_SHORT).show();
 //            CusToast.getInstance(mContext).show("已经是第一个了", 2000);
         }
 

+ 0 - 4
app/src/main/java/com/edufound/reader/presenter/RecordPresenter.java

@@ -101,7 +101,6 @@ public class RecordPresenter extends BasePresenter<RecordContract.View> implemen
         if (Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
             BotRegisterListener.uploadUsage("1", mReadId, "record", "vip");
         }
-        Logger.e("mReadId:" + mReadId);
         mModel.getReadInfo(mView.getActivity(), mReadId, new Callback() {
             @Override
             public void onSuccess(HttpInfo info) throws IOException {
@@ -268,7 +267,6 @@ public class RecordPresenter extends BasePresenter<RecordContract.View> implemen
 
     @Override
     public void showRecordStatusWindow(RecordResultBean bean, UserRecordBean.UserRead userread) {
-        Logger.e("显示录音之后的弹窗");
         PopWindowUtil.showRecordStatusWindow(mView.getActivity(), mView.getRootView(), bean, userread, new PopupRecordStatusListener() {
             @Override
             public void clickReRecord() {
@@ -309,8 +307,6 @@ public class RecordPresenter extends BasePresenter<RecordContract.View> implemen
                 @Override
                 public void onRecordResult(String tokenId, EvalResult result) {
                     Logger.e("录音完成");
-                    Log.e("com.edufound.reader", "record-result:" + result);
-                    Log.e("com.edufound.reader", "record-result.text:" + result.text());
                     try {
                         JSONObject jsonObject = new JSONObject(result.text()).getJSONObject("result");
                         //完全评分

+ 5 - 1
app/src/main/java/com/edufound/reader/presenter/SplashPresenter.java

@@ -124,7 +124,11 @@ public class SplashPresenter extends BasePresenter implements SplashContract.Pre
 
         } else {
             //如果什么都没有得到,就默认跳转首页
-            ((BaseActivity) mView.getActivity()).toNextActivity(MainActivity.class);
+            int defaultIndex = intent.getIntExtra("defaultIndex", -1);
+            Intent intetentt = new Intent(mView.getActivity(), MainActivity.class);
+            intetentt.putExtra("defaultIndex", defaultIndex);
+            mView.getActivity().startActivity(intetentt);
+//            ((BaseActivity) mView.getActivity()).toNextActivity(MainActivity.class);
         }
         mView.getActivity().finish();
     }

+ 0 - 3
app/src/main/java/com/edufound/reader/services/RecordServices.java

@@ -87,7 +87,6 @@ public class RecordServices extends Service {
                 public void onSuccess(Engine engine) {
                     // 创建成功, 请保存engine对象用于后续评测
                     mAiengine = engine;
-                    Logger.e("初始化录音成功");
                     mRecordCreate = true;
                 }
 
@@ -109,7 +108,6 @@ public class RecordServices extends Service {
      * 开始录音(如果没有初始化,就初始化,初始化了直接往下走)
      * */
     public void startRecord(Context context, String name, String refText) {
-        Logger.e("mAiengine:" + (mAiengine == null));
         JSONObject param = new JSONObject();
         try {
             param.put("coreProvideType", "cloud");
@@ -174,7 +172,6 @@ public class RecordServices extends Service {
                     Logger.e("recordServices---onOther");
                 }
             });
-            Logger.e(" ret.errId:" + ret.errId);
             if (0 == ret.errId) {
                 isRecording = true;
                 mRecordCallBack.onRecordStart();

+ 2 - 0
app/src/main/java/com/edufound/reader/tmailsdk/TMailSDKUtil.java

@@ -111,6 +111,8 @@ public class TMailSDKUtil {
                                         Logger.e("bean.getData():" + bean.getData());
                                         if (!TextUtils.isEmpty(bean.getData())) {
                                             Consts.setIsYFVip(true);
+                                        }else{
+                                            Consts.setIsYFVip(false);
                                         }
                                     }
 

+ 23 - 7
app/src/main/java/com/edufound/reader/util/EfunboxUtil.java

@@ -22,6 +22,7 @@ import com.edufound.reader.interfaces.EfunboxInterfaces;
 import com.edufound.reader.listener.PopUtilClickListener;
 import com.edufound.reader.miutil.MiSoundSDKUtil;
 import com.edufound.reader.popwindow.PopWindowUtil;
+import com.edufound.reader.presenter.PopWindowPresneter;
 import com.edufound.reader.receiver.ShowPageLoadingReceiver;
 import com.edufound.reader.tmailsdk.TMailSDKUtil;
 import com.google.gson.Gson;
@@ -170,7 +171,6 @@ public class EfunboxUtil {
     }
 
     public static void userLogin(Context context, View parent) {
-        Logger.e("调用登录方法--Consts.getUmengChannel():" + Consts.getUmengChannel());
         if (Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
             //百度渠道调用百度的授权
             BotRegisterListener.getBaiDuVipInfo();
@@ -184,10 +184,20 @@ public class EfunboxUtil {
             //小米音响--
 //            Intent tologin = new Intent(context, LoginAlertActivity.class);
 //            context.startActivity(tologin);
-            PopWindowUtil.miSoundLoginWindow(context, parent, MiSoundSDKUtil.MI_SOUND_QRCODE_TYPE, null);
+            PopWindowUtil.miSoundLoginWindow(context, parent, MiSoundSDKUtil.MI_SOUND_QRCODE_TYPE, miSoundLoginCallBack);
         }
     }
 
+    static PopWindowPresneter.MISoundLoginCallBack miSoundLoginCallBack;
+
+    public static void setMISoundLoginCallBack(PopWindowPresneter.MISoundLoginCallBack callBack) {
+        miSoundLoginCallBack = callBack;
+    }
+
+    public static void clearMISoundLoginCallBack() {
+        miSoundLoginCallBack = null;
+    }
+
 
     public static void userPay(Activity activity) {
         if (Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
@@ -224,11 +234,17 @@ public class EfunboxUtil {
                     public void onSuccess(HttpInfo info) throws IOException {
                         HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
                         }.getType());
-                        Logger.e("info.getRetDetail():" + info.getRetDetail());
-                        Logger.e("bean.getData():" + bean.getData());
-                        Consts.setIsYFVip(true);
-                        if (callback != null) {
-                            callback.success();
+                        if (!TextUtils.isEmpty(bean.getData())) {
+                            Consts.setIsYFVip(true);
+                            if (callback != null) {
+                                callback.success();
+                            }
+                        } else {
+                            Consts.setIsYFVip(false);
+                            if (callback != null) {
+                                callback.error();
+                            }
+
                         }
                     }
 

+ 142 - 0
app/src/main/java/com/edufound/reader/util/FloatingAnimation.java

@@ -0,0 +1,142 @@
+package com.edufound.reader.util;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
+import android.app.Activity;
+import android.graphics.Path;
+
+import com.ufreedom.floatingview.spring.SimpleReboundListener;
+import com.ufreedom.floatingview.spring.SpringHelper;
+import com.ufreedom.floatingview.transition.BaseFloatingPathTransition;
+import com.ufreedom.floatingview.transition.FloatingPath;
+import com.ufreedom.floatingview.transition.FloatingTransition;
+import com.ufreedom.floatingview.transition.PathPosition;
+import com.ufreedom.floatingview.transition.YumFloating;
+
+public class FloatingAnimation {
+
+
+    public static class PlaneFloating extends BaseFloatingPathTransition {
+
+        private int mScreenHeight;
+
+        public PlaneFloating(int height) {
+            mScreenHeight = height;
+        }
+
+        @Override
+        public FloatingPath getFloatingPath() {
+            Path path = new Path();
+            path.moveTo(0, 0);
+            path.quadTo(100, -300, 0, -600);
+            path.rLineTo(0, -mScreenHeight - 300);
+            return FloatingPath.create(path, false);
+        }
+
+        @Override
+        public void applyFloating(final YumFloating yumFloating) {
+
+            ValueAnimator translateAnimator = ObjectAnimator.ofFloat(getStartPathPosition(), getEndPathPosition());
+            translateAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                @Override
+                public void onAnimationUpdate(ValueAnimator valueAnimator) {
+                    float value = (float) valueAnimator.getAnimatedValue();
+                    PathPosition floatingPosition = getFloatingPosition(value);
+                    yumFloating.setTranslationX(floatingPosition.x);
+                    yumFloating.setTranslationY(floatingPosition.y);
+
+                }
+            });
+            translateAnimator.addListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    super.onAnimationEnd(animation);
+                    yumFloating.setTranslationX(0);
+                    yumFloating.setTranslationY(0);
+                    yumFloating.setAlpha(0f);
+                    yumFloating.clear();
+                }
+            });
+
+
+            SpringHelper.createWithBouncinessAndSpeed(0.0f, 1.0f, 14, 15)
+                    .reboundListener(new SimpleReboundListener() {
+                        @Override
+                        public void onReboundUpdate(double currentValue) {
+                            yumFloating.setScaleX((float) currentValue);
+                            yumFloating.setScaleY((float) currentValue);
+                        }
+                    }).start(yumFloating);
+
+            translateAnimator.setDuration(3000);
+            translateAnimator.start();
+        }
+
+    }
+
+
+    public static class TranslateFloatingTransition implements FloatingTransition {
+
+        private float mTranslateY;
+        private long mDuration;
+
+        public TranslateFloatingTransition() {
+            mTranslateY = -200f;
+            mDuration = 1500;
+        }
+
+
+        public TranslateFloatingTransition(float translateY, long duration) {
+            this.mTranslateY = translateY;
+            this.mDuration = duration;
+        }
+
+        @Override
+        public void applyFloating(final YumFloating yumFloating) {
+
+            ValueAnimator translateAnimator = ObjectAnimator.ofFloat(0, mTranslateY);
+            translateAnimator.setDuration(mDuration);
+            translateAnimator.setStartDelay(50);
+            translateAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                @Override
+                public void onAnimationUpdate(ValueAnimator valueAnimator) {
+                    yumFloating.setTranslationY((Float) valueAnimator.getAnimatedValue());
+                }
+            });
+            translateAnimator.addListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    super.onAnimationEnd(animation);
+                    yumFloating.setTranslationY(0);
+                    yumFloating.setAlpha(0f);
+
+                }
+            });
+
+            ValueAnimator alphaAnimator = ObjectAnimator.ofFloat(1.0f, 0.0f);
+            alphaAnimator.setDuration(mDuration);
+            alphaAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                @Override
+                public void onAnimationUpdate(ValueAnimator valueAnimator) {
+                    yumFloating.setAlpha((Float) valueAnimator.getAnimatedValue());
+                }
+            });
+
+            SpringHelper.createWithBouncinessAndSpeed(0.0f, 1.0f, 10, 15)
+                    .reboundListener(new SimpleReboundListener() {
+                        @Override
+                        public void onReboundUpdate(double currentValue) {
+                            yumFloating.setScaleX((float) currentValue);
+                            yumFloating.setScaleY((float) currentValue);
+                        }
+                    }).start(yumFloating);
+
+            alphaAnimator.start();
+            translateAnimator.start();
+        }
+
+
+    }
+}

+ 22 - 6
app/src/main/res/layout/adapter_item_slidevideo.xml

@@ -9,6 +9,13 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"></com.edufound.reader.cusview.RvListJzvdStd>
 
+    <FrameLayout
+        android:id="@+id/adapter_item_slidevideo_danmu_bg"
+        android:layout_width="match_parent"
+        android:layout_height="120dp"
+        android:clickable="false"
+        android:focusable="false"></FrameLayout>
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="50dp"
@@ -16,15 +23,24 @@
         android:layout_marginTop="34dp"
         android:layout_marginRight="40dp">
 
-        <com.edufound.reader.cusview.AutoPollRecyclerView
-            android:id="@+id/slidevideo_video_marqueen"
-            android:layout_width="9dp"
-            android:layout_height="wrap_content"
+        <HorizontalScrollView
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
             android:layout_gravity="center"
             android:layout_weight="10"
-            android:orientation="horizontal">
+            android:orientation="horizontal"
+            android:scrollbars="none">
+
+            <LinearLayout
+                android:id="@+id/slidevideo_video_marqueen"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:divider="@drawable/fragment_user_info_divider"
+                android:orientation="horizontal"
+                android:showDividers="middle"></LinearLayout>
+
+        </HorizontalScrollView>
 
-        </com.edufound.reader.cusview.AutoPollRecyclerView>
 
         <Switch
             android:id="@+id/slidevideo_video_switch"

+ 328 - 310
app/src/main/res/layout/popupwindow_record_status.xml

@@ -1,250 +1,268 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/translucent_background">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/translucent_background">
 
     <FrameLayout
-            android:layout_width="738dp"
-            android:layout_height="630dp"
-            android:layout_gravity="center">
+        android:layout_width="738dp"
+        android:layout_height="630dp"
+        android:layout_gravity="center">
 
         <!-- 评测完成-->
         <FrameLayout
-                android:id="@+id/popupwindow_record_status_over_frame"
-                android:layout_width="718dp"
-                android:layout_height="630dp"
-                android:layout_gravity="center|left"
-                android:background="@drawable/popup_record_status_over"
-                android:scaleX="0.9"
-                android:scaleY="0.9"
-                android:visibility="gone">
+            android:id="@+id/popupwindow_record_status_over_frame"
+            android:layout_width="718dp"
+            android:layout_height="630dp"
+            android:layout_gravity="center|left"
+            android:background="@drawable/popup_record_status_over"
+            android:scaleX="0.9"
+            android:scaleY="0.9"
+            android:visibility="visible">
 
             <LinearLayout
-                    android:id="@+id/popupwindow_record_status_over_layout"
-                    android:layout_width="685dp"
-                    android:layout_height="400dp"
+                android:id="@+id/popupwindow_record_status_over_layout"
+                android:layout_width="685dp"
+                android:layout_height="400dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="100dp"
+                android:orientation="vertical">
+
+                <!--                <LinearLayout-->
+                <!--                        android:id="@+id/popupwindow_record_status_over_start_layout"-->
+                <!--                        android:layout_width="wrap_content"-->
+                <!--                        android:layout_height="59dp"-->
+                <!--                        android:layout_gravity="center|top"-->
+                <!--                        android:divider="@drawable/popup_record_status_over_stars_divider"-->
+                <!--                        android:orientation="horizontal"-->
+                <!--                        android:showDividers="middle">-->
+
+                <!--                    <ImageView-->
+                <!--                            android:layout_width="58dp"-->
+                <!--                            android:layout_height="match_parent"-->
+                <!--                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>-->
+
+                <!--                    <ImageView-->
+                <!--                            android:layout_width="58dp"-->
+                <!--                            android:layout_height="match_parent"-->
+                <!--                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>-->
+
+                <!--                    <ImageView-->
+                <!--                            android:layout_width="58dp"-->
+                <!--                            android:layout_height="match_parent"-->
+                <!--                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>-->
+
+                <!--                    <ImageView-->
+                <!--                            android:layout_width="58dp"-->
+                <!--                            android:layout_height="match_parent"-->
+                <!--                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>-->
+
+                <!--                    <ImageView-->
+                <!--                            android:layout_width="58dp"-->
+                <!--                            android:layout_height="match_parent"-->
+                <!--                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>-->
+                <!--                </LinearLayout>-->
+                <com.willy.ratingbar.ScaleRatingBar
+                    android:id="@+id/popupwindow_record_status_over_ratingbar"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:layout_gravity="center"
-                    android:layout_marginTop="100dp"
-                    android:orientation="vertical">
-
-                <LinearLayout
-                        android:id="@+id/popupwindow_record_status_over_start_layout"
-                        android:layout_width="wrap_content"
-                        android:layout_height="59dp"
-                        android:layout_gravity="center|top"
-                        android:divider="@drawable/popup_record_status_over_stars_divider"
-                        android:orientation="horizontal"
-                        android:showDividers="middle">
-
-                    <ImageView
-                            android:layout_width="58dp"
-                            android:layout_height="match_parent"
-                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>
-
-                    <ImageView
-                            android:layout_width="58dp"
-                            android:layout_height="match_parent"
-                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>
-
-                    <ImageView
-                            android:layout_width="58dp"
-                            android:layout_height="match_parent"
-                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>
-
-                    <ImageView
-                            android:layout_width="58dp"
-                            android:layout_height="match_parent"
-                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>
-
-                    <ImageView
-                            android:layout_width="58dp"
-                            android:layout_height="match_parent"
-                            android:src="@drawable/popup_record_status_over_stars_true"></ImageView>
-                </LinearLayout>
+                    android:gravity="center"
+                    app:srb_clearRatingEnabled="true"
+                    app:srb_clickable="false"
+                    app:srb_drawableEmpty="@drawable/popup_record_status_over_stars_false"
+                    app:srb_drawableFilled="@drawable/popup_record_status_over_stars_true"
+                    app:srb_isIndicator="false"
+                    app:srb_minimumStars="0"
+                    app:srb_numStars="5"
+                    app:srb_rating="0"
+                    app:srb_scrollable="false"
+                    app:srb_starHeight="60dp"
+                    app:srb_starWidth="60dp"></com.willy.ratingbar.ScaleRatingBar>
 
                 <GridLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="150dp"
-                        android:layout_marginTop="24dp"
-                        android:columnCount="2"
-                        android:paddingLeft="20dp"
-                        android:paddingRight="20dp">
+                    android:layout_width="match_parent"
+                    android:layout_height="150dp"
+                    android:layout_marginTop="15dp"
+                    android:columnCount="2"
+                    android:paddingLeft="20dp"
+                    android:paddingRight="20dp">
 
                     <LinearLayout
-                            android:layout_rowWeight="1"
-                            android:layout_columnWeight="1"
-                            android:gravity="center"
-                            android:orientation="horizontal">
+                        android:layout_rowWeight="1"
+                        android:layout_columnWeight="1"
+                        android:gravity="center"
+                        android:orientation="horizontal">
 
                         <ImageView
-                                android:layout_width="17dp"
-                                android:layout_height="17dp"
-                                android:layout_gravity="center"
-                                android:src="#CDA069"></ImageView>
+                            android:layout_width="17dp"
+                            android:layout_height="17dp"
+                            android:layout_gravity="center"
+                            android:src="#CDA069"></ImageView>
 
                         <TextView
-                                android:layout_width="140dp"
-                                android:layout_height="match_parent"
-                                android:layout_marginLeft="15dp"
-                                android:gravity="center|left"
-                                android:text="完成度:"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:layout_width="140dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginLeft="15dp"
+                            android:gravity="center|left"
+                            android:text="完成度:"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
 
                         <TextView
-                                android:id="@+id/popupwindow_record_status_over_completion_text"
-                                android:layout_width="130dp"
-                                android:layout_height="match_parent"
-                                android:gravity="center|left"
-                                android:text="0/100"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:id="@+id/popupwindow_record_status_over_completion_text"
+                            android:layout_width="130dp"
+                            android:layout_height="match_parent"
+                            android:gravity="center|left"
+                            android:text="0/100"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
                     </LinearLayout>
 
                     <LinearLayout
-                            android:layout_rowWeight="1"
-                            android:layout_columnWeight="1"
-                            android:layout_marginLeft="40dp">
+                        android:layout_rowWeight="1"
+                        android:layout_columnWeight="1"
+                        android:layout_marginLeft="40dp">
 
                         <ImageView
-                                android:layout_width="17dp"
-                                android:layout_height="17dp"
-                                android:layout_gravity="center"
-                                android:src="#CDA069"></ImageView>
+                            android:layout_width="17dp"
+                            android:layout_height="17dp"
+                            android:layout_gravity="center"
+                            android:src="#CDA069"></ImageView>
 
                         <TextView
-                                android:layout_width="140dp"
-                                android:layout_height="match_parent"
-                                android:layout_marginLeft="15dp"
-                                android:gravity="center|left"
-                                android:text="正确率:"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:layout_width="140dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginLeft="15dp"
+                            android:gravity="center|left"
+                            android:text="正确率:"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
 
                         <TextView
-                                android:id="@+id/popupwindow_record_status_over_correctrate_text"
-                                android:layout_width="130dp"
-                                android:layout_height="match_parent"
-                                android:gravity="center|left"
-                                android:text="0/100"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:id="@+id/popupwindow_record_status_over_correctrate_text"
+                            android:layout_width="130dp"
+                            android:layout_height="match_parent"
+                            android:gravity="center|left"
+                            android:text="0/100"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
                     </LinearLayout>
 
                     <LinearLayout
-                            android:layout_rowWeight="1"
-                            android:layout_columnWeight="1"
-                            android:gravity="center"
-                            android:orientation="horizontal">
+                        android:layout_rowWeight="1"
+                        android:layout_columnWeight="1"
+                        android:gravity="center"
+                        android:orientation="horizontal">
 
                         <ImageView
-                                android:layout_width="17dp"
-                                android:layout_height="17dp"
-                                android:layout_gravity="center"
-                                android:src="#CDA069"></ImageView>
+                            android:layout_width="17dp"
+                            android:layout_height="17dp"
+                            android:layout_gravity="center"
+                            android:src="#CDA069"></ImageView>
 
                         <TextView
-                                android:layout_width="140dp"
-                                android:layout_height="match_parent"
-                                android:layout_marginLeft="15dp"
-                                android:gravity="center|left"
-                                android:text="语速:"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:layout_width="140dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginLeft="15dp"
+                            android:gravity="center|left"
+                            android:text="语速:"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
 
                         <TextView
-                                android:id="@+id/popupwindow_record_status_over_speed_text"
-                                android:layout_width="130dp"
-                                android:layout_height="match_parent"
-                                android:gravity="center|left"
-                                android:text="0/100"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:id="@+id/popupwindow_record_status_over_speed_text"
+                            android:layout_width="130dp"
+                            android:layout_height="match_parent"
+                            android:gravity="center|left"
+                            android:text="0/100"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
                     </LinearLayout>
 
                     <LinearLayout
-                            android:layout_rowWeight="1"
-                            android:layout_columnWeight="1"
-                            android:layout_marginLeft="40dp">
+                        android:layout_rowWeight="1"
+                        android:layout_columnWeight="1"
+                        android:layout_marginLeft="40dp">
 
                         <ImageView
-                                android:layout_width="17dp"
-                                android:layout_height="17dp"
-                                android:layout_gravity="center"
-                                android:src="#CDA069"></ImageView>
+                            android:layout_width="17dp"
+                            android:layout_height="17dp"
+                            android:layout_gravity="center"
+                            android:src="#CDA069"></ImageView>
 
                         <TextView
-                                android:layout_width="140dp"
-                                android:layout_height="match_parent"
-                                android:layout_marginLeft="15dp"
-                                android:gravity="center|left"
-                                android:text="语调:"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:layout_width="140dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginLeft="15dp"
+                            android:gravity="center|left"
+                            android:text="语调:"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
 
                         <TextView
-                                android:id="@+id/popupwindow_record_status_over_intonation_text"
-                                android:layout_width="130dp"
-                                android:layout_height="match_parent"
-                                android:gravity="center|left"
-                                android:text="0/100"
-                                android:textColor="#AB722D"
-                                android:textSize="34dp"></TextView>
+                            android:id="@+id/popupwindow_record_status_over_intonation_text"
+                            android:layout_width="130dp"
+                            android:layout_height="match_parent"
+                            android:gravity="center|left"
+                            android:text="0/100"
+                            android:textColor="#AB722D"
+                            android:textSize="34dp"></TextView>
                     </LinearLayout>
                 </GridLayout>
 
                 <Space
-                        android:layout_width="match_parent"
-                        android:layout_height="80dp"></Space>
+                    android:layout_width="match_parent"
+                    android:layout_height="50dp"></Space>
 
                 <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="70dp"
-                        android:orientation="horizontal">
+                    android:layout_width="match_parent"
+                    android:layout_height="70dp"
+                    android:orientation="horizontal">
 
                     <FrameLayout
-                            android:layout_width="0dp"
-                            android:layout_height="match_parent"
-                            android:layout_weight="1">
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1">
 
                         <FrameLayout
-                                android:id="@+id/popupwindow_record_status_over_replay"
-                                android:layout_width="182dp"
-                                android:layout_height="70dp"
-                                android:layout_gravity="center"
-                                android:background="@drawable/main_ok_btn_bg">
+                            android:id="@+id/popupwindow_record_status_over_replay"
+                            android:layout_width="182dp"
+                            android:layout_height="70dp"
+                            android:layout_gravity="center"
+                            android:background="@drawable/main_ok_btn_bg">
 
                             <TextView
-                                    android:layout_width="match_parent"
-                                    android:layout_height="match_parent"
-                                    android:gravity="center"
-                                    android:text="点击重录"
-                                    android:textColor="@color/white"
-                                    android:textSize="31dp"></TextView>
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:gravity="center"
+                                android:text="点击重录"
+                                android:textColor="@color/white"
+                                android:textSize="31dp"></TextView>
                         </FrameLayout>
                     </FrameLayout>
 
                     <FrameLayout
-                            android:layout_width="0dp"
-                            android:layout_height="match_parent"
-                            android:layout_gravity="center"
-                            android:layout_weight="1">
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:layout_weight="1">
 
                         <FrameLayout
-                                android:id="@+id/popupwindow_record_status_over_upload"
-                                android:layout_width="182dp"
-                                android:layout_height="70dp"
-                                android:layout_gravity="center"
-                                android:background="@drawable/main_cancel_btn_bg">
+                            android:id="@+id/popupwindow_record_status_over_upload"
+                            android:layout_width="182dp"
+                            android:layout_height="70dp"
+                            android:layout_gravity="center"
+                            android:background="@drawable/main_cancel_btn_bg">
 
                             <TextView
-                                    android:layout_width="match_parent"
-                                    android:layout_height="match_parent"
-                                    android:gravity="center"
-                                    android:text="上传作品"
-                                    android:textColor="@color/white"
-                                    android:textSize="31dp"></TextView>
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:gravity="center"
+                                android:text="上传作品"
+                                android:textColor="@color/white"
+                                android:textSize="31dp"></TextView>
                         </FrameLayout>
                     </FrameLayout>
                 </LinearLayout>
@@ -254,180 +272,180 @@
 
         <!-- 上传中-->
         <FrameLayout
-                android:id="@+id/popupwindow_record_status_uploading_frame"
-                android:layout_width="718dp"
-                android:layout_height="630dp"
-                android:layout_gravity="center|left"
-                android:background="@drawable/popup_record_status_upload_start"
-                android:scaleX="0.9"
-                android:scaleY="0.9"
-                android:visibility="gone">
+            android:id="@+id/popupwindow_record_status_uploading_frame"
+            android:layout_width="718dp"
+            android:layout_height="630dp"
+            android:layout_gravity="center|left"
+            android:background="@drawable/popup_record_status_upload_start"
+            android:scaleX="0.9"
+            android:scaleY="0.9"
+            android:visibility="gone">
 
             <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="54dp"
-                    android:layout_gravity="center"
-                    android:layout_marginBottom="30dp"
-                    android:text="请耐心等候···"
-                    android:textColor="#AB722D"
-                    android:textSize="40dp"></TextView>
+                android:layout_width="wrap_content"
+                android:layout_height="54dp"
+                android:layout_gravity="center"
+                android:layout_marginBottom="30dp"
+                android:text="请耐心等候···"
+                android:textColor="#AB722D"
+                android:textSize="40dp"></TextView>
 
             <FrameLayout
-                    android:layout_width="197dp"
-                    android:layout_height="197dp"
-                    android:layout_gravity="center"
-                    android:layout_marginTop="120dp">
+                android:layout_width="197dp"
+                android:layout_height="197dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="120dp">
 
                 <ProgressBar
-                        android:layout_width="170dp"
-                        android:layout_height="170dp"
-                        android:layout_centerHorizontal="true"
-                        android:layout_centerVertical="true"
-                        android:layout_gravity="center"
-                        android:indeterminateDrawable="@drawable/popup_record_uploading_loading_anim"></ProgressBar>
+                    android:layout_width="170dp"
+                    android:layout_height="170dp"
+                    android:layout_centerHorizontal="true"
+                    android:layout_centerVertical="true"
+                    android:layout_gravity="center"
+                    android:indeterminateDrawable="@drawable/popup_record_uploading_loading_anim"></ProgressBar>
 
                 <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:gravity="center"
-                        android:text="loading..."
-                        android:textColor="#6CBDFE"
-                        android:textSize="20dp"></TextView>
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:text="loading..."
+                    android:textColor="#6CBDFE"
+                    android:textSize="20dp"></TextView>
             </FrameLayout>
         </FrameLayout>
 
 
         <!-- 上传成功-->
         <FrameLayout
-                android:id="@+id/popupwindow_record_status_uploading_success_frame"
-                android:layout_width="718dp"
-                android:layout_height="630dp"
-                android:layout_gravity="center|left"
-                android:background="@drawable/popup_record_status_upload_success"
-                android:scaleX="0.9"
-                android:scaleY="0.9"
-                android:visibility="gone">
+            android:id="@+id/popupwindow_record_status_uploading_success_frame"
+            android:layout_width="718dp"
+            android:layout_height="630dp"
+            android:layout_gravity="center|left"
+            android:background="@drawable/popup_record_status_upload_success"
+            android:scaleX="0.9"
+            android:scaleY="0.9"
+            android:visibility="gone">
 
             <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center"
-                    android:layout_marginTop="20dp"
-                    android:gravity="center"
-                    android:lineSpacingMultiplier="1.6"
-                    android:text="恭喜您的作品上传成功\n快去听听自己的作品吧!"
-                    android:textColor="#AB722D"
-                    android:textSize="40dp"></TextView>
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_marginTop="20dp"
+                android:gravity="center"
+                android:lineSpacingMultiplier="1.6"
+                android:text="恭喜您的作品上传成功\n快去听听自己的作品吧!"
+                android:textColor="#AB722D"
+                android:textSize="40dp"></TextView>
 
             <FrameLayout
-                    android:id="@+id/popup_record_status_upload_success_btn"
-                    android:layout_width="182dp"
-                    android:layout_height="70dp"
-                    android:layout_gravity="center|bottom"
-                    android:layout_marginBottom="30dp"
-                    android:background="@drawable/main_cancel_btn_bg">
+                android:id="@+id/popup_record_status_upload_success_btn"
+                android:layout_width="182dp"
+                android:layout_height="70dp"
+                android:layout_gravity="center|bottom"
+                android:layout_marginBottom="30dp"
+                android:background="@drawable/main_cancel_btn_bg">
 
                 <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:gravity="center"
-                        android:text="去听听"
-                        android:textColor="@color/white"
-                        android:textSize="31dp"></TextView>
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:text="去听听"
+                    android:textColor="@color/white"
+                    android:textSize="31dp"></TextView>
             </FrameLayout>
         </FrameLayout>
 
 
         <!-- 上传失败-->
         <FrameLayout
-                android:id="@+id/popupwindow_record_status_uploading_error_frame"
-                android:layout_width="718dp"
-                android:layout_height="630dp"
-                android:layout_gravity="center|left"
-                android:background="@drawable/popup_record_status_upload_error"
-                android:scaleX="0.9"
-                android:scaleY="0.9"
-                android:visibility="gone">
+            android:id="@+id/popupwindow_record_status_uploading_error_frame"
+            android:layout_width="718dp"
+            android:layout_height="630dp"
+            android:layout_gravity="center|left"
+            android:background="@drawable/popup_record_status_upload_error"
+            android:scaleX="0.9"
+            android:scaleY="0.9"
+            android:visibility="gone">
 
             <LinearLayout
-                    android:layout_width="300dp"
+                android:layout_width="300dp"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_marginTop="20dp"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <TextView
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
-                    android:layout_marginTop="20dp"
                     android:gravity="center"
-                    android:orientation="vertical">
-
-                <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center"
-                        android:gravity="center"
-                        android:lineHeight="54dp"
-                        android:text="作品上传失败!"
-                        android:textColor="#AB722D"
-                        android:textSize="40dp"></TextView>
+                    android:lineHeight="54dp"
+                    android:text="作品上传失败!"
+                    android:textColor="#AB722D"
+                    android:textSize="40dp"></TextView>
 
                 <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center"
-                        android:layout_marginTop="20dp"
-                        android:gravity="center"
-                        android:lineHeight="54dp"
-                        android:text="请重新上传!"
-                        android:textColor="#AB722D"
-                        android:textSize="40dp"></TextView>
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="20dp"
+                    android:gravity="center"
+                    android:lineHeight="54dp"
+                    android:text="请重新上传!"
+                    android:textColor="#AB722D"
+                    android:textSize="40dp"></TextView>
             </LinearLayout>
 
 
             <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="70dp"
-                    android:layout_gravity="center|bottom"
-                    android:layout_marginBottom="30dp"
-                    android:orientation="horizontal">
+                android:layout_width="match_parent"
+                android:layout_height="70dp"
+                android:layout_gravity="center|bottom"
+                android:layout_marginBottom="30dp"
+                android:orientation="horizontal">
 
                 <FrameLayout
-                        android:layout_width="0dp"
-                        android:layout_height="match_parent"
-                        android:layout_weight="1">
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1">
 
                     <FrameLayout
-                            android:id="@+id/popupwindow_record_status_uploading_error_cancel_upload"
-                            android:layout_width="182dp"
-                            android:layout_height="70dp"
-                            android:layout_gravity="center"
-                            android:background="@drawable/main_ok_btn_bg">
+                        android:id="@+id/popupwindow_record_status_uploading_error_cancel_upload"
+                        android:layout_width="182dp"
+                        android:layout_height="70dp"
+                        android:layout_gravity="center"
+                        android:background="@drawable/main_ok_btn_bg">
 
                         <TextView
-                                android:layout_width="match_parent"
-                                android:layout_height="match_parent"
-                                android:gravity="center"
-                                android:text="取消上传"
-                                android:textColor="@color/white"
-                                android:textSize="31dp"></TextView>
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:text="取消上传"
+                            android:textColor="@color/white"
+                            android:textSize="31dp"></TextView>
                     </FrameLayout>
                 </FrameLayout>
 
                 <FrameLayout
-                        android:layout_width="0dp"
-                        android:layout_height="match_parent"
-                        android:layout_weight="1">
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1">
 
                     <FrameLayout
-                            android:id="@+id/popupwindow_record_status_uploading_error_re_upload"
-                            android:layout_width="182dp"
-                            android:layout_height="70dp"
-                            android:layout_gravity="center"
-                            android:background="@drawable/main_cancel_btn_bg">
+                        android:id="@+id/popupwindow_record_status_uploading_error_re_upload"
+                        android:layout_width="182dp"
+                        android:layout_height="70dp"
+                        android:layout_gravity="center"
+                        android:background="@drawable/main_cancel_btn_bg">
 
                         <TextView
-                                android:layout_width="match_parent"
-                                android:layout_height="match_parent"
-                                android:gravity="center"
-                                android:text="重新上传"
-                                android:textColor="@color/white"
-                                android:textSize="31dp"></TextView>
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:text="重新上传"
+                            android:textColor="@color/white"
+                            android:textSize="31dp"></TextView>
                     </FrameLayout>
                 </FrameLayout>
             </LinearLayout>
@@ -436,13 +454,13 @@
         </FrameLayout>
 
         <ImageView
-                android:id="@+id/popupwindow_record_status_close"
-                android:layout_width="77dp"
-                android:layout_height="77dp"
-                android:layout_gravity="top|right"
-                android:layout_marginTop="110dp"
-                android:layout_marginRight="30dp"
-                android:src="@drawable/activity_loginalert_close"></ImageView>
+            android:id="@+id/popupwindow_record_status_close"
+            android:layout_width="77dp"
+            android:layout_height="77dp"
+            android:layout_gravity="top|right"
+            android:layout_marginTop="110dp"
+            android:layout_marginRight="30dp"
+            android:src="@drawable/activity_loginalert_close"></ImageView>
     </FrameLayout>
 
 </FrameLayout>