Sfoglia il codice sorgente

1.修改首页问题
2.增加我的/任务懒加载
3.登录界面

FailedToRead 3 anni fa
parent
commit
76ab3e30ea
100 ha cambiato i file con 2718 aggiunte e 605 eliminazioni
  1. 21 5
      .idea/misc.xml
  2. 8 4
      app/build.gradle
  3. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_bg.png
  4. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_btn_ok_bg.png
  5. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_chech_true.png
  6. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_check_false.png
  7. 5 0
      app/src/activityLoginAlert/drawable/activity_loginalert_check_selector.xml
  8. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_close.png
  9. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_edit_bg.png
  10. BIN
      app/src/activityLoginAlert/drawable/activity_loginalert_verificationcode_bg.png
  11. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_bg.png
  12. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_collection.png
  13. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_collection_icon.png
  14. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_collection_icon_s.png
  15. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_comment.9.png
  16. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_comment.png
  17. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_next.png
  18. 0 20
      app/src/fragmentRecommend/drawable/fragment_recommend_rv_round.xml
  19. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_thumbs_up.9.png
  20. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_thumbs_up.png
  21. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_thumbs_up_s.png
  22. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_up.png
  23. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_userhead_bg.9.png
  24. BIN
      app/src/fragmentRecommend/drawable/fragment_recommend_userhead_bg.png
  25. 20 0
      app/src/fragmentRecommend/drawable/fragment_recommend_userhead_round.xml
  26. 20 0
      app/src/fragmentRecommend/drawable/slidevideo_marqueen_bg.xml
  27. 17 0
      app/src/fragmentRecommend/drawable/slidevideo_switch_track.xml
  28. 17 0
      app/src/fragmentRecommend/drawable/slidevideo_switch_track_s.xml
  29. 8 0
      app/src/fragmentRecommend/drawable/slidevideo_switch_track_selector.xml
  30. BIN
      app/src/fragmentRecommend/drawable/to_record_bg.png
  31. BIN
      app/src/fragmentRecommend/drawable/to_record_icon.png
  32. 260 187
      app/src/fragmentRecommend/layout/fragment_main_recommend.xml
  33. 22 0
      app/src/fragmentRecommend/layout/slide_video_marqueen_item.xml
  34. BIN
      app/src/fragmentUser/drawable/adapter_item_record_comment.png
  35. BIN
      app/src/fragmentUser/drawable/adapter_item_record_del.png
  36. BIN
      app/src/fragmentUser/drawable/adapter_item_record_examine.png
  37. BIN
      app/src/fragmentUser/drawable/adapter_item_record_look.png
  38. BIN
      app/src/fragmentUser/drawable/adapter_item_record_pri.png
  39. BIN
      app/src/fragmentUser/drawable/adapter_item_record_pub.png
  40. BIN
      app/src/fragmentUser/drawable/adapter_item_record_start.png
  41. BIN
      app/src/fragmentUser/drawable/adapter_item_record_thumb.png
  42. BIN
      app/src/fragmentUser/drawable/fragment_my_attention.png
  43. BIN
      app/src/fragmentUser/drawable/fragment_my_collection.png
  44. BIN
      app/src/fragmentUser/drawable/fragment_my_customer_service.png
  45. BIN
      app/src/fragmentUser/drawable/fragment_my_message_notification.png
  46. BIN
      app/src/fragmentUser/drawable/fragment_my_redflower.png
  47. BIN
      app/src/fragmentUser/drawable/fragment_my_setting.png
  48. BIN
      app/src/fragmentUser/drawable/fragment_my_vip.png
  49. 8 0
      app/src/fragmentUser/drawable/fragment_user_info_divider.xml
  50. 9 0
      app/src/fragmentUser/layout/fragment_user_rv_bottom.xml
  51. 231 0
      app/src/fragmentUser/layout/fragment_user_rv_header.xml
  52. 13 1
      app/src/main/AndroidManifest.xml
  53. 12 31
      app/src/main/java/com/edufound/reader/activity/CrashDialogActivity.java
  54. 106 0
      app/src/main/java/com/edufound/reader/activity/LoginAlertActivity.java
  55. 3 15
      app/src/main/java/com/edufound/reader/activity/MainActivity.java
  56. 146 0
      app/src/main/java/com/edufound/reader/adapter/RecordItemAdapter.java
  57. 58 2
      app/src/main/java/com/edufound/reader/adapter/SlideVideoAdapter.java
  58. 56 0
      app/src/main/java/com/edufound/reader/adapter/SlideVideoDanMarqueenAdapter.java
  59. 1 1
      app/src/main/java/com/edufound/reader/application/EApplication.java
  60. 4 2
      app/src/main/java/com/edufound/reader/base/BaseActivity.java
  61. 8 5
      app/src/main/java/com/edufound/reader/base/BaseFragment.java
  62. 60 0
      app/src/main/java/com/edufound/reader/bean/UserInfoBean.java
  63. 22 0
      app/src/main/java/com/edufound/reader/contract/CharacterFragmentContract.java
  64. 26 0
      app/src/main/java/com/edufound/reader/contract/LoginAlertContract.java
  65. 6 2
      app/src/main/java/com/edufound/reader/contract/RecommendFragmentContract.java
  66. 34 0
      app/src/main/java/com/edufound/reader/contract/UserFragmentContract.java
  67. 71 0
      app/src/main/java/com/edufound/reader/cusview/AutoPollRecyclerView.java
  68. 44 0
      app/src/main/java/com/edufound/reader/cusview/RoundFrameLayout.java
  69. 81 0
      app/src/main/java/com/edufound/reader/fragment/CharacterFragment.java
  70. 89 3
      app/src/main/java/com/edufound/reader/fragment/RecommendFragment.java
  71. 135 0
      app/src/main/java/com/edufound/reader/fragment/UserFragment.java
  72. 7 0
      app/src/main/java/com/edufound/reader/model/CharacterFragmentModel.java
  73. 6 0
      app/src/main/java/com/edufound/reader/model/LoginAlertModel.java
  74. 7 0
      app/src/main/java/com/edufound/reader/model/UserFragmentModel.java
  75. 114 0
      app/src/main/java/com/edufound/reader/presenter/CharacterFragmentPresenter.java
  76. 1 1
      app/src/main/java/com/edufound/reader/presenter/CrashDialogPresenter.java
  77. 124 0
      app/src/main/java/com/edufound/reader/presenter/LoginAlertPresenter.java
  78. 34 1
      app/src/main/java/com/edufound/reader/presenter/MainPresenter.java
  79. 38 19
      app/src/main/java/com/edufound/reader/presenter/RecommendFragmentPresenter.java
  80. 187 0
      app/src/main/java/com/edufound/reader/presenter/UserFragmentPresenter.java
  81. 3 3
      app/src/main/java/com/edufound/reader/presenter/VideoPresenter.java
  82. 0 237
      app/src/main/java/com/edufound/reader/util/CToast.java
  83. 11 0
      app/src/main/java/com/edufound/reader/util/Consts.java
  84. 30 10
      app/src/main/java/com/edufound/reader/util/EfunboxUtil.java
  85. 1 1
      app/src/main/res/drawable/main_left_tab_divider.xml
  86. BIN
      app/src/main/res/drawable/main_left_tab_layout_character.png
  87. BIN
      app/src/main/res/drawable/main_left_tab_layout_character_s.png
  88. BIN
      app/src/main/res/drawable/main_left_tab_layout_follow.png
  89. BIN
      app/src/main/res/drawable/main_left_tab_layout_follow_s.png
  90. BIN
      app/src/main/res/drawable/main_left_tab_layout_recommend.png
  91. BIN
      app/src/main/res/drawable/main_left_tab_layout_recommend_s.png
  92. BIN
      app/src/main/res/drawable/main_tab_layout_myinfo.png
  93. BIN
      app/src/main/res/drawable/main_tab_layout_myinfo_s.png
  94. 171 0
      app/src/main/res/layout/activity_alert_login.xml
  95. 5 33
      app/src/main/res/layout/activity_crash_dialog.xml
  96. 28 22
      app/src/main/res/layout/activity_main.xml
  97. 206 0
      app/src/main/res/layout/adapter_item_record.xml
  98. 35 0
      app/src/main/res/layout/adapter_item_slidevideo.xml
  99. 89 0
      app/src/main/res/layout/fragment_main_character.xml
  100. 0 0
      app/src/main/res/layout/fragment_main_user.xml

+ 21 - 5
.idea/misc.xml

@@ -3,22 +3,38 @@
   <component name="DesignSurface">
     <option name="filePathToZoomLevelMap">
       <map>
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/activityLoginAlert/drawable/activity_loginalert_check_selector.xml" value="0.3328125" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/drawable/fragment_recommend_rv_round.xml" value="0.32421875" />
-        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/layout/fragment_main_recommend.xml" value="0.2" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/drawable/fragment_recommend_to_record_bg_rotation.xml" value="0.2203125" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/drawable/fragment_recommend_userhead_round.xml" value="0.26197916666666665" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/drawable/slidevideo_switch_track.xml" value="0.32734375" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/drawable/slidevideo_switch_track_selector.xml" value="0.32734375" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/layout/fragment_main_recommend.xml" value="0.75" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentRecommend/layout/slide_video_marqueen_item.xml" value="0.75" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentUser/drawable/fragment_user_info_divider.xml" value="0.31640625" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/fragmentUser/layout/fragment_user_rv_bottom.xml" value="0.2771317829457364" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/cusjzplayer_controller_seekbar.xml" value="0.2713541666666667" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_character_selector.xml" value="0.32421875" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_divider.xml" value="0.4" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_follow_selector.xml" value="0.1875" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_myInfo_selected.xml" value="0.32421875" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_myinfo_selected.xml" value="0.32421875" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_myinfo_selector.xml" value="0.1875" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/main_left_tab_recommend_selector.xml" value="0.32421875" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/drawable/player_seekbar_list.xml" value="0.2713541666666667" />
-        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/activity_crash_dialog.xml" value="0.2" />
-        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/activity_main.xml" value="0.4010416666666667" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/activity_alert_login.xml" value="0.5" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/activity_crash_dialog.xml" value="0.12" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/activity_main.xml" value="0.15" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/activity_video.xml" value="0.1331521739130435" />
-        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/adapter_item_slidevideo.xml" value="0.18177083333333333" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/adapter_item_record.xml" value="0.4539641943734015" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/adapter_item_slidevideo.xml" value="0.25" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/curjzplayer_controller.xml" value="0.16" />
-        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/cusjzplayer_controller.xml" value="0.5" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/cusjzplayer_controller.xml" value="0.22" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/fragment_main_character.xml" value="0.18" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/fragment_main_recommend.xml" value="0.2" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/fragment_main_user.xml" value="0.25" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/fragment_user_rv_bottom.xml" value="0.30103359173126615" />
+        <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/fragment_user_rv_header.xml" value="0.2" />
         <entry key="..\:/WorkSpace/Git_WorkSpace/efunboxReader-android/efunboxReader-android-master/app/src/main/res/layout/player_controller.xml" value="0.13" />
       </map>
     </option>

+ 8 - 4
app/build.gradle

@@ -8,7 +8,7 @@ def releaseTime() {
 
 android {
     compileSdkVersion 30
-    buildToolsVersion "30.0.2"
+    buildToolsVersion "30.0.3"
 
     defaultConfig {
         applicationId "com.edufound.reader"
@@ -61,7 +61,9 @@ android {
             jniLibs.srcDirs = ['libs']
             res.srcDirs = [
                     'src/main/res', //默认只有这一个路径
-                    'src/fragmentRecommend'   //这个就是告诉gradle在编译的时候到这个文件夹找资源文件
+                    'src/fragmentRecommend',   //首页推荐
+                    'src/fragmentUser',//首页我的
+                    'src/activityLoginAlert'//登录弹窗
             ]
         }
     }
@@ -90,8 +92,6 @@ dependencies {
 
     implementation 'androidx.appcompat:appcompat:1.0.0'
     testImplementation 'junit:junit:4.+'
-    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
-    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
     implementation 'com.github.bumptech.glide:glide:4.12.0'
     annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
     implementation 'jp.wasabeef:glide-transformations:4.3.0'
@@ -128,4 +128,8 @@ dependencies {
 
     //rxBind
     implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
+
+    implementation "androidx.constraintlayout:constraintlayout:2.1.1"
+    // To use constraintlayout in compose
+    implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01"
 }

BIN
app/src/activityLoginAlert/drawable/activity_loginalert_bg.png


BIN
app/src/activityLoginAlert/drawable/activity_loginalert_btn_ok_bg.png


BIN
app/src/activityLoginAlert/drawable/activity_loginalert_chech_true.png


BIN
app/src/activityLoginAlert/drawable/activity_loginalert_check_false.png


+ 5 - 0
app/src/activityLoginAlert/drawable/activity_loginalert_check_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/activity_loginalert_check_false" android:state_checked="false" />
+    <item android:drawable="@drawable/activity_loginalert_chech_true" android:state_checked="true" />
+</selector>

BIN
app/src/activityLoginAlert/drawable/activity_loginalert_close.png


BIN
app/src/activityLoginAlert/drawable/activity_loginalert_edit_bg.png


BIN
app/src/activityLoginAlert/drawable/activity_loginalert_verificationcode_bg.png


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


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


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


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


BIN
app/src/fragmentRecommend/drawable/fragment_recommend_comment.9.png


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


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


+ 0 - 20
app/src/fragmentRecommend/drawable/fragment_recommend_rv_round.xml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <solid android:color="@color/transparent" />
-
-    <stroke
-            android:width="5dp"
-            android:color="@color/white" />
-
-    <padding
-            android:bottom="4dp"
-            android:left="5dp"
-            android:right="5dp"
-            android:top="4dp" />
-
-    <corners
-            android:bottomLeftRadius="40dp"
-            android:bottomRightRadius="40dp"
-            android:topLeftRadius="40dp"
-            android:topRightRadius="40dp" />
-</shape>

BIN
app/src/fragmentRecommend/drawable/fragment_recommend_thumbs_up.9.png


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


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


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


BIN
app/src/fragmentRecommend/drawable/fragment_recommend_userhead_bg.9.png


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


+ 20 - 0
app/src/fragmentRecommend/drawable/fragment_recommend_userhead_round.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/transparent" />
+
+    <stroke
+            android:width="1dp"
+            android:color="@color/white" />
+
+    <!--    <padding-->
+    <!--            android:bottom="4dp"-->
+    <!--            android:left="5dp"-->
+    <!--            android:right="5dp"-->
+    <!--            android:top="4dp" />-->
+
+    <corners
+            android:bottomLeftRadius="60dp"
+            android:bottomRightRadius="60dp"
+            android:topLeftRadius="60dp"
+            android:topRightRadius="60dp" />
+</shape>

+ 20 - 0
app/src/fragmentRecommend/drawable/slidevideo_marqueen_bg.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/translucent_background" />
+
+    <stroke
+            android:width="0dp"
+            android:color="@color/white" />
+
+    <padding
+            android:bottom="5dp"
+            android:left="10dp"
+            android:right="10dp"
+            android:top="5dp" />
+
+    <corners
+            android:bottomLeftRadius="10dp"
+            android:bottomRightRadius="10dp"
+            android:topLeftRadius="10dp"
+            android:topRightRadius="10dp" />
+</shape>

+ 17 - 0
app/src/fragmentRecommend/drawable/slidevideo_switch_track.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <padding
+            android:bottom="1dp"
+            android:left="4dp"
+            android:right="2dp"
+            android:top="1dp" />
+
+    <size android:height="30dp"></size>
+    <corners android:radius="20dp" />
+    <!-- 变化率 -->
+    <gradient
+            android:endColor="@color/red"
+            android:startColor="@color/red" />
+</shape>

+ 17 - 0
app/src/fragmentRecommend/drawable/slidevideo_switch_track_s.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <padding
+            android:bottom="1dp"
+            android:left="2dp"
+            android:right="2dp"
+            android:top="1dp" />
+
+    <size android:height="30dp"></size>
+    <corners android:radius="20dp" />
+    <!-- 变化率 -->
+    <gradient
+            android:endColor="@color/yellow"
+            android:startColor="@color/yellow" />
+</shape>

+ 8 - 0
app/src/fragmentRecommend/drawable/slidevideo_switch_track_selector.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@drawable/slidevideo_switch_track_s" android:state_checked="true" />
+    <item android:drawable="@drawable/slidevideo_switch_track" android:state_checked="false" />
+
+</selector>

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


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


+ 260 - 187
app/src/fragmentRecommend/layout/fragment_main_recommend.xml

@@ -2,253 +2,326 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginTop="37dp"
         android:gravity="center">
 
     <FrameLayout
-            android:layout_width="1080dp"
-            android:layout_height="750dp"
+            android:layout_width="972dp"
+            android:layout_height="700dp"
             android:layout_gravity="center">
 
-
         <ImageView
                 android:layout_width="match_parent"
-                android:layout_height="712dp"
+                android:layout_height="650dp"
                 android:background="@drawable/fragment_recommend_bg"></ImageView>
 
-        <FrameLayout
+        <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="564.3dp"
+                android:layout_height="match_parent"
                 android:layout_gravity="center"
-                android:layout_marginLeft="40dp"
-                android:layout_marginTop="20dp"
-                android:layout_marginRight="40dp"
-                android:background="@drawable/fragment_recommend_rv_round">
+                android:gravity="center"
+                android:orientation="vertical">
 
-            <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/fragment_recommend_recyclerview"
+            <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
+                    android:layout_height="0dp"
                     android:layout_gravity="center"
-                    android:orientation="vertical"></androidx.recyclerview.widget.RecyclerView>
-        </FrameLayout>
-
+                    android:layout_weight="3"
+                    android:paddingTop="10dp">
 
-        <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="42dp"
-                android:layout_gravity="bottom"
-                android:layout_marginBottom="15dp">
+                <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1.5">
+
+                    <FrameLayout
+                            android:layout_width="272dp"
+                            android:layout_height="61dp"
+                            android:layout_gravity="center">
+
+                        <ImageView
+                                android:layout_width="242dp"
+                                android:layout_height="52dp"
+                                android:layout_gravity="center|right"
+                                android:background="@drawable/fragment_recommend_userhead_bg"></ImageView>
+
+                        <FrameLayout
+                                android:id="@+id/fragment_recommend_user_head_layout"
+                                android:layout_width="54dp"
+                                android:layout_height="match_parent">
+
+                            <FrameLayout
+                                    android:layout_width="match_parent"
+                                    android:layout_height="54dp"
+                                    android:background="@drawable/fragment_recommend_userhead"
+                                    android:padding="4dp">
+
+                                <ImageView
+                                        android:id="@+id/fragment_recommend_user_head"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="match_parent"
+                                        android:src="@color/red" />
+
+                            </FrameLayout>
+
+                            <ImageView
+                                    android:layout_width="20dp"
+                                    android:layout_height="20dp"
+                                    android:layout_gravity="center|bottom"
+                                    android:layout_marginBottom="4dp"
+                                    android:src="@drawable/plus"></ImageView>
+                        </FrameLayout>
 
-            <ImageView
-                    android:id="@+id/fragment_recommend_video_up"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:src="@drawable/fragment_recommend_up"></ImageView>
+                        <TextView
+                                android:id="@+id/fragment_recommend_user_phone"
+                                android:layout_width="match_parent"
+                                android:layout_height="55dp"
+                                android:layout_gravity="center|top"
+                                android:layout_marginLeft="20dp"
+                                android:gravity="center"
+                                android:text="1581****1234"
+                                android:textColor="@color/fragment_recommend_user_color"
+                                android:textSize="28dp"></TextView>
+                    </FrameLayout>
 
-            <ImageView
-                    android:id="@+id/fragment_recommend_video_next"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:src="@drawable/fragment_recommend_next"></ImageView>
-        </LinearLayout>
+                </FrameLayout>
 
-        <ImageView
-                android:id="@+id/fragment_recommend_to_record"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="bottom|right"
-                android:layout_marginRight="15dp"
-                android:layout_marginBottom="15dp"
-                android:src="@drawable/to_record"></ImageView>
+                <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1">
 
-        <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="90dp"
-                android:layout_gravity="top"
-                android:layout_marginLeft="40dp"
-                android:layout_marginTop="20dp"
-                android:layout_marginRight="40dp"
-                android:gravity="center|left">
+                    <FrameLayout
+                            android:id="@+id/fragment_recommend_comment_layout"
+                            android:layout_width="160dp"
+                            android:layout_height="61dp"
+                            android:layout_gravity="center">
 
-            <FrameLayout
-                    android:layout_width="290dp"
-                    android:layout_height="56dp"
-                    android:layout_gravity="center">
+                        <ImageView
+                                android:layout_width="143dp"
+                                android:layout_height="52dp"
+                                android:layout_gravity="center|right"
+                                android:scaleType="fitXY"
+                                android:src="@drawable/fragment_recommend_userhead_bg"></ImageView>
 
+                        <FrameLayout
+                                android:layout_width="52dp"
+                                android:layout_height="match_parent">
 
-                <FrameLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_gravity="center"
-                        android:paddingLeft="30dp">
 
-                    <ImageView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:src="@drawable/fragment_recommend_userhead_bg"></ImageView>
+                            <ImageView
+                                    android:layout_width="52dp"
+                                    android:layout_height="52dp"
+                                    android:layout_gravity="center"
+                                    android:src="@drawable/fragment_recommend_comment" />
 
-                    <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:orientation="vertical"
-                            android:paddingLeft="40dp">
 
-                        <TextView
-                                android:id="@+id/fragment_recommend_user_name"
-                                android:layout_width="match_parent"
-                                android:layout_height="0dp"
-                                android:layout_weight="0.8"
-                                android:gravity="center|left"
-                                android:maxLength="6"
-                                android:text="一二三四五六"
-                                android:textColor="#333333"
-                                android:textSize="20dp"></TextView>
+                        </FrameLayout>
 
                         <TextView
-                                android:id="@+id/fragment_recommend_user_readnum"
+                                android:id="@+id/fragment_recommend_comment_num"
                                 android:layout_width="match_parent"
-                                android:layout_height="0dp"
-                                android:layout_weight="1"
-                                android:gravity="top|left"
-                                android:text="朗读号:123123123123123123"></TextView>
+                                android:layout_height="55dp"
+                                android:layout_gravity="center|top"
+                                android:layout_marginLeft="10dp"
+                                android:gravity="center"
+                                android:text="评论"
+                                android:textColor="@color/fragment_recommend_user_color"
+                                android:textSize="28dp"></TextView>
+                    </FrameLayout>
 
-                        <androidx.legacy.widget.Space
-                                android:layout_width="match_parent"
-                                android:layout_height="0dp"
-                                android:layout_weight="0.01"></androidx.legacy.widget.Space>
-                    </LinearLayout>
                 </FrameLayout>
 
-
                 <FrameLayout
-                        android:layout_width="60dp"
-                        android:layout_height="60dp"
-                        android:layout_gravity="center|left"
-                        android:background="@drawable/fragment_recommend_userhead">
-
-                    <ImageView
-                            android:id="@+id/fragment_recommend_user_head"
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_gravity="center|left"></ImageView>
-                </FrameLayout>
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1">
 
-            </FrameLayout>
+                    <FrameLayout
+                            android:id="@+id/fragment_recommend_collection_layout"
+                            android:layout_width="160dp"
+                            android:layout_height="61dp"
+                            android:layout_gravity="center">
 
+                        <ImageView
+                                android:layout_width="143dp"
+                                android:layout_height="52dp"
+                                android:layout_gravity="center|right"
+                                android:scaleType="fitXY"
+                                android:src="@drawable/fragment_recommend_userhead_bg"></ImageView>
 
-            <FrameLayout
-                    android:id="@+id/fragment_recommend_collection_layout"
-                    android:layout_width="wrap_content"
-                    android:layout_height="56dp"
-                    android:layout_marginLeft="50dp">
+                        <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="15dp"
+                                android:gravity="center"
+                                android:text="已收藏"
+                                android:textColor="@color/fragment_recommend_user_color"
+                                android:textSize="28dp"></TextView>
+                    </FrameLayout>
+                </FrameLayout>
 
                 <FrameLayout
-                        android:layout_width="match_parent"
+                        android:layout_width="0dp"
                         android:layout_height="match_parent"
-                        android:layout_gravity="center">
+                        android:layout_weight="1">
 
-                    <ImageView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:src="@drawable/fragment_recommend_collection"></ImageView>
+                    <FrameLayout
+                            android:id="@+id/fragment_recommend_thumbs_layout"
+                            android:layout_width="160dp"
+                            android:layout_height="61dp"
+                            android:layout_gravity="center">
 
-                    <TextView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_gravity="center"
-                            android:layout_marginLeft="46dp"
-                            android:layout_marginRight="40dp"
-                            android:gravity="center"
-                            android:paddingBottom="10dp"
-                            android:text="收藏"
-                            android:textColor="#333333"
-                            android:textSize="32dp"></TextView>
+                        <ImageView
+                                android:layout_width="143dp"
+                                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_thumbs_icon"
+                                    android:layout_width="52dp"
+                                    android:layout_height="52dp"
+                                    android:layout_gravity="center|left"
+                                    android:src="@drawable/fragment_recommend_thumbs_up" />
+
+
+                        </FrameLayout>
+
+                        <TextView
+                                android:id="@+id/fragment_recommend_thumbs_num"
+                                android:layout_width="match_parent"
+                                android:layout_height="55dp"
+                                android:layout_gravity="center|top"
+                                android:layout_marginLeft="10dp"
+                                android:gravity="center"
+                                android:text="1234"
+                                android:textColor="@color/fragment_recommend_user_color"
+                                android:textSize="28dp"></TextView>
+                    </FrameLayout>
                 </FrameLayout>
 
-                <ImageView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center|right"
-                        android:src="@drawable/plus"></ImageView>
+            </LinearLayout>
+
+            <FrameLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:layout_marginBottom="20dp"
+                    android:layout_weight="15">
+
+                <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/fragment_recommend_recyclerview"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:orientation="vertical"></androidx.recyclerview.widget.RecyclerView>
+
+
             </FrameLayout>
 
+
             <FrameLayout
-                    android:id="@+id/fragment_recommend_comment_layout"
-                    android:layout_width="wrap_content"
-                    android:layout_height="56dp"
-                    android:layout_marginLeft="37dp">
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1.6">
 
-                <FrameLayout
+                <LinearLayout
                         android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_gravity="center">
+                        android:layout_height="42dp"
+                        android:layout_gravity="top"
+                        android:gravity="top">
 
-                    <ImageView
-                            android:layout_width="match_parent"
+                    <FrameLayout
+                            android:layout_width="0dp"
                             android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:background="@drawable/fragment_recommend_comment"></ImageView>
-
-                    <TextView
-                            android:layout_width="match_parent"
+                            android:layout_weight="1">
+
+                        <ImageView
+                                android:id="@+id/fragment_recommend_video_up"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|top"
+                                android:src="@drawable/fragment_recommend_up"></ImageView>
+                    </FrameLayout>
+
+                    <FrameLayout
+                            android:layout_width="0dp"
                             android:layout_height="match_parent"
-                            android:layout_gravity="center"
-                            android:layout_marginLeft="55dp"
-                            android:layout_marginRight="45dp"
-                            android:gravity="center"
-                            android:paddingBottom="10dp"
-                            android:text="1234"
-                            android:textColor="#333333"
-                            android:textSize="32dp"></TextView>
-                </FrameLayout>
+                            android:layout_weight="1">
+
+                        <ImageView
+                                android:id="@+id/fragment_recommend_video_next"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|top"
+                                android:src="@drawable/fragment_recommend_next"></ImageView>
+                    </FrameLayout>
+
+
+                </LinearLayout>
 
-                <ImageView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center|right"
-                        android:src="@drawable/plus"></ImageView>
             </FrameLayout>
 
+
+        </LinearLayout>
+
+        <LinearLayout
+                android:id="@+id/fragment_recommend_to_record_layout"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="bottom|right"
+                android:orientation="vertical">
+
             <FrameLayout
-                    android:id="@+id/fragment_recommend_thumbs_up_layout"
-                    android:layout_width="wrap_content"
-                    android:layout_height="56dp"
-                    android:layout_marginLeft="37dp">
+                    android:layout_width="121dp"
+                    android:layout_height="121dp">
 
-                <FrameLayout
+                <ImageView
+                        android:id="@+id/fragment_recommend_to_record_bg"
                         android:layout_width="match_parent"
+                        android:rotation="80"
                         android:layout_height="match_parent"
-                        android:layout_gravity="center">
-
-                    <ImageView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:background="@drawable/fragment_recommend_thumbs_up"></ImageView>
-
-                    <TextView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_gravity="center"
-                            android:layout_marginLeft="55dp"
-                            android:layout_marginRight="45dp"
-                            android:gravity="center"
-                            android:paddingBottom="10dp"
-                            android:text="1234"
-                            android:textColor="#333333"
-                            android:textSize="32dp"></TextView>
-                </FrameLayout>
+                        android:layout_gravity="center"
+                        android:src="@drawable/to_record_bg"></ImageView>
 
                 <ImageView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center|right"
-                        android:src="@drawable/plus"></ImageView>
+                        android:id="@+id/fragment_recommend_to_record_icon"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:src="@drawable/to_record_icon"></ImageView>
             </FrameLayout>
+
+            <ImageView
+                    android:layout_width="105dp"
+                    android:layout_height="40dp"
+                    android:layout_gravity="center|top"
+                    android:layout_marginBottom="15dp"
+                    android:src="@drawable/to_record"></ImageView>
         </LinearLayout>
     </FrameLayout>
 

+ 22 - 0
app/src/fragmentRecommend/layout/slide_video_marqueen_item.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:background="@color/transparent">
+
+    <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/slidevideo_marqueen_bg">
+
+        <TextView
+                android:id="@+id/item_marqueen_text"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:text="123123123123"
+                android:textColor="@color/white"
+                android:textSize="25dp"></TextView>
+    </FrameLayout>
+
+</FrameLayout>

BIN
app/src/fragmentUser/drawable/adapter_item_record_comment.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_del.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_examine.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_look.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_pri.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_pub.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_start.png


BIN
app/src/fragmentUser/drawable/adapter_item_record_thumb.png


BIN
app/src/fragmentUser/drawable/fragment_my_attention.png


BIN
app/src/fragmentUser/drawable/fragment_my_collection.png


BIN
app/src/fragmentUser/drawable/fragment_my_customer_service.png


BIN
app/src/fragmentUser/drawable/fragment_my_message_notification.png


BIN
app/src/fragmentUser/drawable/fragment_my_redflower.png


BIN
app/src/fragmentUser/drawable/fragment_my_setting.png


BIN
app/src/fragmentUser/drawable/fragment_my_vip.png


+ 8 - 0
app/src/fragmentUser/drawable/fragment_user_info_divider.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+        android:shape="rectangle">
+    <size
+            android:width="20dp"
+            android:height="20dp" />
+    <solid android:color="@android:color/transparent" />
+</shape>

+ 9 - 0
app/src/fragmentUser/layout/fragment_user_rv_bottom.xml

@@ -0,0 +1,9 @@
+<?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="100dp"
+        android:layout_height="match_parent">
+
+
+</FrameLayout>

+ 231 - 0
app/src/fragmentUser/layout/fragment_user_rv_header.xml

@@ -0,0 +1,231 @@
+<?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="wrap_content"
+        android:layout_height="match_parent">
+
+
+    <LinearLayout
+            android:layout_width="519dp"
+            android:layout_height="match_parent"
+            android:divider="@drawable/fragment_user_info_divider"
+            android:orientation="vertical"
+            android:showDividers="middle">
+
+        <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center|left"
+                android:text="个人信息"
+                android:textColor="@color/white"
+                android:textSize="26dp"></TextView>
+
+        <com.edufound.reader.cusview.RoundFrameLayout
+                android:layout_width="match_parent"
+                android:layout_height="188dp"
+                android:background="@color/white">
+
+            <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="horizontal">
+
+                <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="2">
+
+                    <ImageView
+                            android:layout_width="102dp"
+                            android:layout_height="102dp"
+                            android:layout_gravity="center"
+                            android:background="@color/wheat"></ImageView>
+                </FrameLayout>
+
+                <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="6">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:paddingTop="10dp">
+
+                        <TextView
+                                android:id="@+id/textView"
+                                android:layout_width="wrap_content"
+                                android:layout_height="48dp"
+                                android:text="1581***1234"
+                                android:textColor="#272727"
+                                android:textSize="34dp"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"></TextView>
+
+                        <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="48dp"
+                                android:layout_marginBottom="80dp"
+                                android:text="三年级"
+                                android:textColor="#272727"
+                                android:textSize="34dp"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"></TextView>
+
+                        <ImageView
+                                android:layout_width="99dp"
+                                android:layout_height="35dp"
+                                android:layout_marginTop="8dp"
+                                android:layout_marginEnd="16dp"
+                                android:src="@drawable/fragment_my_setting"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"></ImageView>
+
+                        <FrameLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="1dp"
+                                android:layout_marginRight="12dp"
+                                android:alpha="0.2"
+                                android:background="#000000"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"
+                                app:layout_constraintVertical_bias="0.609"></FrameLayout>
+
+                        <LinearLayout
+                                android:layout_width="wrap_content"
+                                android:layout_height="40dp"
+                                android:layout_marginBottom="18dp"
+                                android:gravity="center"
+                                android:orientation="horizontal"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintStart_toStartOf="parent">
+
+                            <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:gravity="center"
+                                    android:text="粉丝"
+                                    android:textSize="28dp"></TextView>
+
+                            <Space
+                                    android:layout_width="5dp"
+                                    android:layout_height="match_parent"></Space>
+
+                            <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:gravity="center"
+                                    android:text="76"
+                                    android:textSize="28dp"></TextView>
+                        </LinearLayout>
+
+                        <FrameLayout
+                                android:layout_width="1dp"
+                                android:layout_height="32dp"
+                                android:layout_marginBottom="22dp"
+                                android:alpha="0.2"
+                                android:background="#000000"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintHorizontal_bias="0.437"
+                                app:layout_constraintStart_toStartOf="parent"></FrameLayout>
+
+                        <LinearLayout
+                                android:layout_width="wrap_content"
+                                android:layout_height="40dp"
+                                android:layout_marginRight="12dp"
+                                android:layout_marginBottom="18dp"
+                                android:gravity="center"
+                                android:orientation="horizontal"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent">
+
+                            <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:gravity="center"
+                                    android:text="播放"
+                                    android:textSize="28dp"></TextView>
+
+                            <Space
+                                    android:layout_width="5dp"
+                                    android:layout_height="match_parent"></Space>
+
+                            <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:gravity="center"
+                                    android:text="2345"
+                                    android:textSize="28dp"></TextView>
+                        </LinearLayout>
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+                </FrameLayout>
+            </LinearLayout>
+        </com.edufound.reader.cusview.RoundFrameLayout>
+
+        <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="195dp"
+                android:divider="@drawable/fragment_user_info_divider"
+                android:orientation="horizontal"
+                android:showDividers="middle">
+
+            <ImageView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:src="@drawable/fragment_my_vip"></ImageView>
+
+            <ImageView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:src="@drawable/fragment_my_redflower"></ImageView>
+        </LinearLayout>
+
+        <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="80dp"
+                android:divider="@drawable/main_left_tab_divider"
+                android:orientation="horizontal"
+                android:showDividers="middle">
+
+            <ImageView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:src="@drawable/fragment_my_attention"></ImageView>
+
+            <ImageView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:src="@drawable/fragment_my_collection"></ImageView>
+
+        </LinearLayout>
+
+        <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="80dp"
+                android:divider="@drawable/fragment_user_info_divider"
+                android:orientation="horizontal"
+                android:showDividers="middle">
+
+            <ImageView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:src="@drawable/fragment_my_message_notification"></ImageView>
+
+            <ImageView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:src="@drawable/fragment_my_customer_service"></ImageView>
+
+        </LinearLayout>
+    </LinearLayout>
+</FrameLayout>

+ 13 - 1
app/src/main/AndroidManifest.xml

@@ -13,6 +13,7 @@
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!--开关wifi状态,解决国内机型移动⽹络权限问题需要 -->
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
 
     <application
             android:name="com.edufound.reader.application.EApplication"
@@ -65,8 +66,19 @@
                 android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"
                 android:windowSoftInputMode="adjustNothing|stateHidden">
 
-
         </activity>
+
+        <activity
+                android:name="com.edufound.reader.activity.LoginAlertActivity"
+                android:configChanges="screenLayout|screenSize|keyboardHidden|keyboard|orientation"
+                android:label=""
+                android:maxAspectRatio="2.1"
+                android:resizeableActivity="true"
+                android:screenOrientation="landscape"
+                android:theme="@style/efunboxTransparentLoginAlert"
+                android:windowSoftInputMode="adjustNothing|stateHidden"></activity>
+
+
         <!--友盟start-->
         <meta-data
                 android:name="UMENG_APPKEY"

+ 12 - 31
app/src/main/java/com/edufound/reader/activity/CrashDialogActivity.java

@@ -21,14 +21,6 @@ public class CrashDialogActivity extends BaseMvpActivity<CrashDialogPresenter> i
 
     Activity mActivity;
 
-    @BindView(id = R.id.main_initrecord)
-    Button btn_main_initrecord;
-
-    @BindView(id = R.id.main_stoprecord)
-    Button main_stoprecord;
-
-    @BindView(id = R.id.main_playrecord)
-    Button main_playrecord;
 
     @Override
     public int getLayoutId() {
@@ -40,30 +32,19 @@ public class CrashDialogActivity extends BaseMvpActivity<CrashDialogPresenter> i
         mPresenter = new CrashDialogPresenter();
         mPresenter.attachView(this);
         mActivity = this;
-//        AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
-//        builder.setTitle("error");
-//        builder.setIcon(R.drawable.icon);
-//        builder.setMessage("出现异常");
-//        builder.setNegativeButton("退出", new DialogInterface.OnClickListener() {
-//            @Override
-//            public void onClick(DialogInterface dialogInterface, int i) {
-//                dialogInterface.dismiss();
-//                EApplication.killAppProcess(mActivity);
-//            }
-//        });
-//        builder.create().show();
-
-        mPresenter.bindRecordServices();
-
-        addUiClickListener(btn_main_initrecord, o -> {
-            mPresenter.startRecord("123", "123123123123123123123123123123123");
-        });
-        addUiClickListener(main_stoprecord, o -> {
-            mPresenter.stopRecord();
-        });
-        addUiClickListener(main_playrecord, o -> {
-            mPresenter.rePlayRecord();
+        AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
+        builder.setTitle("error");
+        builder.setIcon(R.drawable.icon);
+        builder.setMessage("出现异常");
+        builder.setNegativeButton("退出", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialogInterface, int i) {
+                dialogInterface.dismiss();
+                EApplication.killAppProcess(mActivity);
+            }
         });
+        builder.create().show();
+
     }
 
     @Override

+ 106 - 0
app/src/main/java/com/edufound/reader/activity/LoginAlertActivity.java

@@ -0,0 +1,106 @@
+package com.edufound.reader.activity;
+
+import android.app.Activity;
+import android.widget.CompoundButton;
+import android.widget.EditText;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.edufound.reader.R;
+import com.edufound.reader.annotation.BindView;
+import com.edufound.reader.base.BaseMvpActivity;
+import com.edufound.reader.contract.LoginAlertContract;
+import com.edufound.reader.presenter.LoginAlertPresenter;
+
+import androidx.appcompat.widget.AppCompatCheckBox;
+import androidx.constraintlayout.widget.ConstraintLayout;
+
+public class LoginAlertActivity extends BaseMvpActivity<LoginAlertPresenter> implements LoginAlertContract.View {
+
+    Activity mActivity;
+    @BindView(id = R.id.activity_loginalert_rootview)
+    ConstraintLayout mRootView;
+    @BindView(id = R.id.activity_loginalert_userphone_edit)
+    EditText mEditPhone;
+    @BindView(id = R.id.activity_loginalert_getvercode_edit)
+    EditText mEditVCode;
+    @BindView(id = R.id.activity_loginalert_getvercode)
+    FrameLayout mGetVCode;
+    @BindView(id = R.id.activity_loginalert_login)
+    FrameLayout mLoginBtn;
+    @BindView(id = R.id.activity_loginalert_checkbox)
+    AppCompatCheckBox mCheckBox;
+    @BindView(id = R.id.activity_loginalert_services_text)
+    TextView mServiceText;
+    @BindView(id = R.id.activity_loginalert_close)
+    ImageView mCloseImg;
+
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.activity_alert_login;
+    }
+
+    @Override
+    public void initView() {
+        mActivity = this;
+        mPresenter = new LoginAlertPresenter();
+        mPresenter.attachView(this);
+        mPresenter.initServiceText(mServiceText);
+        addUiClickListener(mCloseImg, o -> {
+            finish();
+        });
+        addUiClickListener(mGetVCode, o -> {
+            Toast.makeText(mActivity, "click 获取验证码", Toast.LENGTH_SHORT).show();
+        });
+        addUiClickListener(mLoginBtn, o -> {
+        });
+    }
+
+    @Override
+    public void onDisconnect() {
+
+    }
+
+    @Override
+    public void onMobileConnect() {
+
+    }
+
+    @Override
+    public void onWifiConnect() {
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void onError(String errMessage) {
+
+    }
+
+    @Override
+    public Activity getActivity() {
+        return mActivity;
+    }
+
+    @Override
+    public ConstraintLayout getRootView() {
+        return mRootView;
+    }
+
+    @Override
+    public AppCompatCheckBox getCheckBox() {
+        return mCheckBox;
+    }
+}

+ 3 - 15
app/src/main/java/com/edufound/reader/activity/MainActivity.java

@@ -3,29 +3,16 @@ package com.edufound.reader.activity;
 import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.view.KeyEvent;
-import android.view.View;
-import android.widget.Button;
 import android.widget.FrameLayout;
+import android.widget.RadioButton;
 import android.widget.RadioGroup;
+import android.widget.Toast;
 
 import com.edufound.reader.R;
 import com.edufound.reader.annotation.BindView;
 import com.edufound.reader.base.BaseMvpActivity;
 import com.edufound.reader.contract.MainContract;
 import com.edufound.reader.presenter.MainPresenter;
-import com.jakewharton.rxbinding4.view.RxView;
-import com.orhanobut.logger.Logger;
-
-import java.util.concurrent.TimeUnit;
-
-import androidx.recyclerview.widget.RecyclerView;
-import cn.jzvd.Jzvd;
-import cn.jzvd.JzvdStd;
-import io.reactivex.rxjava3.annotations.NonNull;
-import io.reactivex.rxjava3.core.Observer;
-import io.reactivex.rxjava3.disposables.Disposable;
-import io.reactivex.rxjava3.functions.Consumer;
-import kotlin.Unit;
 
 public class MainActivity extends BaseMvpActivity<MainPresenter> implements MainContract.View {
 
@@ -57,6 +44,7 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
                 mPresenter.onRadioChecked(radioGroup, id);
             }
         });
+        ((RadioButton) mRadioGroupTab.getChildAt(1)).setChecked(true);
     }
 
 

+ 146 - 0
app/src/main/java/com/edufound/reader/adapter/RecordItemAdapter.java

@@ -0,0 +1,146 @@
+package com.edufound.reader.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.edufound.reader.R;
+import com.edufound.reader.bean.SlideVideoBean;
+import com.jakewharton.rxbinding4.widget.RxTextView;
+import com.orhanobut.logger.Logger;
+
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+public class RecordItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+
+    public static final int ITEM_TYPE_HEADER = 0;
+    public static final int ITEM_TYPE_CONTENT = 1;
+    public static final int ITEM_TYPE_BOTTOM = 2;
+    private LayoutInflater mLayoutInflater;
+    private Context mContext;
+    private List<Object> mListData;
+    private int mHeaderCount = 0;//头部View个数
+    private int mBottomCount = 1;//底部View个数
+
+    public RecordItemAdapter(Context context, List<Object> listData) {
+        mContext = context;
+        mLayoutInflater = LayoutInflater.from(context);
+        mListData = listData;
+
+
+    }
+
+    public void addMored(List<Object> listData) {
+        mListData.addAll(listData);
+    }
+
+    //判断当前item是否是HeadView
+    public boolean isHeaderView(int position) {
+        return mHeaderCount != 0 && position < mHeaderCount;
+    }
+
+    //判断当前item是否是FooterView
+    public boolean isBottomView(int position) {
+        return mBottomCount != 0 && position >= (mHeaderCount + getContentItemCount());
+    }
+
+
+    //判断当前item类型
+    @Override
+    public int getItemViewType(int position) {
+        int dataItemCount = getContentItemCount();
+        if (mHeaderCount != 0 && position < mHeaderCount) {
+            //头部View
+            return ITEM_TYPE_HEADER;
+        } else if (mBottomCount != 0 && position >= (mHeaderCount + dataItemCount)) {
+            //底部View
+            return ITEM_TYPE_BOTTOM;
+        } else {
+            //内容View
+            return ITEM_TYPE_CONTENT;
+        }
+    }
+
+    //内容长度
+    public int getContentItemCount() {
+        return mListData.size();
+    }
+
+    @NonNull
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        if (viewType == ITEM_TYPE_HEADER) {
+//            return new HeaderViewHolder(mLayoutInflater.inflate(R.layout.fragment_user_rv_header, parent, false));
+        } else if (viewType == ITEM_TYPE_CONTENT) {
+            return new RecordItemHolder(mLayoutInflater.inflate(R.layout.adapter_item_record, parent, false));
+        } else if (viewType == ITEM_TYPE_BOTTOM) {
+            return new BottomViewHolder(mLayoutInflater.inflate(R.layout.fragment_user_rv_bottom, parent, false));
+        }
+        return null;
+
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+        if (holder instanceof HeaderViewHolder) {
+
+        } else if (holder instanceof RecordItemHolder) {
+            ((RecordItemHolder) holder).mItemName.setText(String.valueOf(mListData.get(position - mHeaderCount)));
+
+        } else if (holder instanceof BottomViewHolder) {
+
+        }
+    }
+
+    @Override
+    public int getItemCount() {
+        return mHeaderCount + getContentItemCount() + mBottomCount;
+    }
+}
+
+
+class RecordItemHolder extends RecyclerView.ViewHolder {
+
+    ImageView mItemIcon;
+    TextView mItemName;
+    ImageView mItemDel;
+    ImageView mItemPriv;
+    TextView mLookNum;
+    TextView mThumbNum;
+    TextView mCommentNum;
+    TextView mStartNum;
+
+    public RecordItemHolder(@NonNull View itemView) {
+        super(itemView);
+        mItemIcon = itemView.findViewById(R.id.adapter_item_record_icon);
+        mItemName = itemView.findViewById(R.id.adapter_item_record_name);
+        mItemDel = itemView.findViewById(R.id.adapter_item_record_del);
+        mItemPriv = itemView.findViewById(R.id.adapter_item_record_priv);
+        mLookNum = itemView.findViewById(R.id.adapter_item_record_look_num);
+        mThumbNum = itemView.findViewById(R.id.adapter_item_record_thumb_num);
+        mCommentNum = itemView.findViewById(R.id.adapter_item_record_comment_num);
+        mStartNum = itemView.findViewById(R.id.adapter_item_record_start_num);
+
+    }
+}
+
+class HeaderViewHolder extends RecyclerView.ViewHolder {
+
+    public HeaderViewHolder(@NonNull View itemView) {
+        super(itemView);
+    }
+}
+
+class BottomViewHolder extends RecyclerView.ViewHolder {
+
+    public BottomViewHolder(@NonNull View itemView) {
+        super(itemView);
+    }
+}
+

+ 58 - 2
app/src/main/java/com/edufound/reader/adapter/SlideVideoAdapter.java

@@ -1,20 +1,28 @@
 package com.edufound.reader.adapter;
 
 import android.content.Context;
+import android.graphics.Rect;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.CompoundButton;
+import android.widget.Switch;
 
 import com.edufound.reader.R;
 import com.edufound.reader.bean.SlideVideoBean;
+import com.edufound.reader.cusview.AutoPollRecyclerView;
 import com.edufound.reader.cusview.RvListJzvdStd;
+import com.edufound.reader.util.SizeUtils;
 import com.edufound.reader.videoutil.JZMediaIjk;
 import com.edufound.reader.util.GlideUtils;
 import com.orhanobut.logger.Logger;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.DividerItemDecoration;
+import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 import cn.jzvd.JZDataSource;
 import cn.jzvd.JzvdStd;
@@ -41,7 +49,7 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
     @NonNull
     @Override
     public VideoHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
-        return new VideoHolder(mLayoutInflater.inflate(R.layout.adapter_item_slidevideo, parent, false));
+        return new VideoHolder(mContext, mLayoutInflater.inflate(R.layout.adapter_item_slidevideo, parent, false));
     }
 
     @Override
@@ -50,6 +58,18 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
         holder.mVideo.setUp(new JZDataSource(mListData.get(position).videoUrl), JzvdStd.SCREEN_FULLSCREEN, JZMediaIjk.class);
         GlideUtils.loadImageSizeKipMemoryCache(mContext, "http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640", holder.mVideo.posterImageView);
         holder.mVideo.startPreloading();
+        holder.mSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
+                if (b) {
+                    holder.mMarqueen.setVisibility(View.VISIBLE);
+                    holder.mMarqueen.start();
+                } else {
+                    holder.mMarqueen.setVisibility(View.INVISIBLE);
+                    holder.mMarqueen.stop();
+                }
+            }
+        });
 //        holder.mVideo.posterImageView.setImageURI(Uri.parse(mListData.get(position).videoUrl));
 
     }
@@ -65,12 +85,48 @@ public class SlideVideoAdapter extends RecyclerView.Adapter<VideoHolder> {
 class VideoHolder extends RecyclerView.ViewHolder {
     public View mItemView;
     public RvListJzvdStd mVideo;
+    public AutoPollRecyclerView mMarqueen;
+    public Switch mSwitch;
 
-    public VideoHolder(@NonNull View itemView) {
+    public VideoHolder(Context context, @NonNull View itemView) {
         super(itemView);
         mItemView = itemView;
         mVideo = itemView.findViewById((R.id.slidevideo_video));
+        mMarqueen = itemView.findViewById(R.id.slidevideo_video_marqueen);
+        mSwitch = itemView.findViewById(R.id.slidevideo_video_switch);
+        mSwitch.setChecked(false);
+        List<String> list = new ArrayList<>();
+        for (int i = 0; i < 30; ) {
+            list.add(" Item: " + ++i);
+        }
+        SlideVideoDanMarqueenAdapter adapter = new SlideVideoDanMarqueenAdapter(context, list);
+        mMarqueen.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false));
+        mMarqueen.addItemDecoration(new SpacesItemDecoration(SizeUtils.dp2px(context, 20)));
+        mMarqueen.setAdapter(adapter);
+        if (mSwitch.isChecked()) {
+            mMarqueen.setVisibility(View.VISIBLE);
+            mMarqueen.start();
+        } else {
+            mMarqueen.setVisibility(View.INVISIBLE);
+            mMarqueen.stop();
+        }
     }
 }
 
+class SpacesItemDecoration extends RecyclerView.ItemDecoration {
+    private int space;
+
+    public SpacesItemDecoration(int space) {
+        this.space = space;
+    }
+
+    @Override
+    public void getItemOffsets(Rect outRect, View view,
+                               RecyclerView parent, RecyclerView.State state) {
+        outRect.left = space;
+        outRect.right = space;
+//        outRect.bottom = space;
+        // Add top margin only for the first item to avoid double space between items
+    }
+}
 

+ 56 - 0
app/src/main/java/com/edufound/reader/adapter/SlideVideoDanMarqueenAdapter.java

@@ -0,0 +1,56 @@
+package com.edufound.reader.adapter;
+
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.edufound.reader.R;
+import com.edufound.reader.cusview.RvListJzvdStd;
+
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+public class SlideVideoDanMarqueenAdapter extends RecyclerView.Adapter<MarqueenHolder> {
+    private LayoutInflater mLayoutInflater;
+    private final Context mContext;
+    private final List<String> mData;
+
+    public SlideVideoDanMarqueenAdapter(Context context, List<String> list) {
+        this.mContext = context;
+        this.mData = list;
+        mLayoutInflater = LayoutInflater.from(context);
+    }
+
+    @Override
+    public MarqueenHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        return new MarqueenHolder(mLayoutInflater.inflate(R.layout.slide_video_marqueen_item, parent, false));
+    }
+
+    @Override
+    public void onBindViewHolder(MarqueenHolder holder, int position) {
+//        String data = mData.get(position % mData.size());
+        holder.mMarqueenText.setText(mData.get(position % mData.size()));
+    }
+
+    @Override
+    public int getItemCount() {
+        return Integer.MAX_VALUE;
+    }
+}
+
+class MarqueenHolder extends RecyclerView.ViewHolder {
+    public View mItemView;
+    public TextView mMarqueenText;
+
+    public MarqueenHolder(@NonNull View itemView) {
+        super(itemView);
+        mItemView = itemView;
+        mMarqueenText = itemView.findViewById(R.id.item_marqueen_text);
+    }
+}
+

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

@@ -46,7 +46,7 @@ public class EApplication extends Application {
             Consts.setmApplicAtion(this);
 
             //初始化异常监听
-            CrashHandler.getInstance().init(this);
+//            CrashHandler.getInstance().init(this);
 
             XmlPullParserFactory.newInstance().setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
             //初始化OKHTTP

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

@@ -39,7 +39,9 @@ public abstract class BaseActivity extends AppCompatActivity {
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        EfunboxUtil.setCustomDensity(this, Consts.getmApplicAtion());
+//        EfunboxUtil.setCustomDensity(this, Consts.getmApplicAtion());
+
+        EfunboxUtil.initDesignSize(this);
         setContentView(this.getLayoutId());
         initBase();
         bindViews(this);
@@ -47,7 +49,7 @@ public abstract class BaseActivity extends AppCompatActivity {
     }
 
     void initBase() {
-        getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
             LiuHaiScreenUtil.openFullScreenModel(this);
         }

+ 8 - 5
app/src/main/java/com/edufound/reader/base/BaseFragment.java

@@ -1,18 +1,13 @@
 package com.edufound.reader.base;
 
 import android.annotation.SuppressLint;
-import android.app.Activity;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
-import com.edufound.reader.annotation.BindView;
 import com.jakewharton.rxbinding4.view.RxView;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.util.concurrent.TimeUnit;
 
 import androidx.fragment.app.Fragment;
@@ -36,6 +31,7 @@ public abstract class BaseFragment extends Fragment {
         View view = inflater.inflate(this.getLayoutId(), container, false);
 
         initView(view);
+        initViewListener();
         return view;
     }
 
@@ -49,6 +45,8 @@ public abstract class BaseFragment extends Fragment {
 
     protected abstract int getLayoutId();
 
+    protected abstract void initViewListener();
+
     /**
      * 添加订阅
      */
@@ -68,6 +66,11 @@ public abstract class BaseFragment extends Fragment {
         }
     }
 
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        clearDisposable();
+    }
 
     @SuppressLint("AutoDispose")
     public void addUiClickListener(View view, Consumer onNext) {

+ 60 - 0
app/src/main/java/com/edufound/reader/bean/UserInfoBean.java

@@ -0,0 +1,60 @@
+package com.edufound.reader.bean;
+
+public class UserInfoBean {
+
+    private String userHeadImg;
+    private String userPhone;
+    private String userName;
+    private String userGrade;
+    private String userFans;
+    private String userPlayCount;
+
+
+    public String getUserHeadImg() {
+        return userHeadImg;
+    }
+
+    public void setUserHeadImg(String userHeadImg) {
+        this.userHeadImg = userHeadImg;
+    }
+
+    public String getUserPhone() {
+        return userPhone;
+    }
+
+    public void setUserPhone(String userPhone) {
+        this.userPhone = userPhone;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserGrade() {
+        return userGrade;
+    }
+
+    public void setUserGrade(String userGrade) {
+        this.userGrade = userGrade;
+    }
+
+    public String getUserFans() {
+        return userFans;
+    }
+
+    public void setUserFans(String userFans) {
+        this.userFans = userFans;
+    }
+
+    public String getUserPlayCount() {
+        return userPlayCount;
+    }
+
+    public void setUserPlayCount(String userPlayCount) {
+        this.userPlayCount = userPlayCount;
+    }
+}

+ 22 - 0
app/src/main/java/com/edufound/reader/contract/CharacterFragmentContract.java

@@ -0,0 +1,22 @@
+package com.edufound.reader.contract;
+
+import android.widget.GridLayout;
+
+import com.edufound.reader.base.BaseView;
+
+import io.reactivex.rxjava3.functions.Consumer;
+
+public interface CharacterFragmentContract {
+    interface Model {
+    }
+
+    interface View extends BaseView {
+        void addUiClick(android.view.View view, Consumer onNext);
+    }
+
+    interface Presenter {
+        void initGridLayout(GridLayout gridLayout);
+
+        void onDestory(GridLayout layout);
+    }
+}

+ 26 - 0
app/src/main/java/com/edufound/reader/contract/LoginAlertContract.java

@@ -0,0 +1,26 @@
+package com.edufound.reader.contract;
+
+import android.widget.FrameLayout;
+import android.widget.TextView;
+
+import com.edufound.reader.base.BaseView;
+
+import androidx.appcompat.widget.AppCompatCheckBox;
+import androidx.constraintlayout.widget.ConstraintLayout;
+
+public interface LoginAlertContract {
+    interface Model {
+    }
+
+    interface View extends BaseView {
+        ConstraintLayout getRootView();
+
+        AppCompatCheckBox getCheckBox();
+    }
+
+    interface Presenter {
+        void initServiceText(TextView textView);
+
+        void getVCode(String phoneNum);
+    }
+}

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

@@ -1,6 +1,7 @@
 package com.edufound.reader.contract;
 
 import android.app.Activity;
+import android.view.View;
 
 import com.edufound.reader.base.BaseView;
 
@@ -8,12 +9,15 @@ import androidx.recyclerview.widget.RecyclerView;
 
 public interface RecommendFragmentContract {
     interface Model {
+
     }
 
-    interface View  {
+    interface View extends BaseView {
+
     }
 
     interface Presenter {
-        void initVideoList(RecyclerView rv);
+        void initVideoList(RecyclerView rv, int type);
+
     }
 }

+ 34 - 0
app/src/main/java/com/edufound/reader/contract/UserFragmentContract.java

@@ -0,0 +1,34 @@
+package com.edufound.reader.contract;
+
+import android.view.View;
+import android.widget.GridLayout;
+import android.widget.GridView;
+
+import com.edufound.reader.base.BaseView;
+import com.edufound.reader.bean.UserInfoBean;
+
+import androidx.recyclerview.widget.RecyclerView;
+import io.reactivex.rxjava3.functions.Consumer;
+
+public interface UserFragmentContract {
+    interface Model {
+
+    }
+
+    interface View extends BaseView {
+        void addUiClick(android.view.View view, Consumer onNext);
+
+        void setUserInfo(UserInfoBean bean);
+
+    }
+
+    interface Presenter {
+        void initRecyclerView(RecyclerView rv);
+
+        void initGridLayout(GridLayout gridLayout);
+
+        void onDestory(GridLayout layout);
+
+
+    }
+}

+ 71 - 0
app/src/main/java/com/edufound/reader/cusview/AutoPollRecyclerView.java

@@ -0,0 +1,71 @@
+package com.edufound.reader.cusview;
+
+import android.content.Context;
+import android.util.AttributeSet;
+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 {
+    private static final long TIME_AUTO_POLL = 16;
+    AutoPollTask autoPollTask;
+    private boolean running; //标示是否正在自动轮询
+    private boolean canRun;//标示是否可以自动轮询,可在不需要的是否置false
+
+    public AutoPollRecyclerView(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+        autoPollTask = new AutoPollTask(this);
+    }
+
+    static class AutoPollTask implements Runnable {
+        private final WeakReference<AutoPollRecyclerView> mReference;
+
+        //使用弱引用持有外部类引用->防止内存泄漏
+        public AutoPollTask(AutoPollRecyclerView reference) {
+            this.mReference = new WeakReference<AutoPollRecyclerView>(reference);
+        }
+
+        @Override
+        public void run() {
+            AutoPollRecyclerView recyclerView = mReference.get();
+            if (recyclerView != null && recyclerView.running && recyclerView.canRun) {
+                recyclerView.scrollBy(2, 2);
+                recyclerView.postDelayed(recyclerView.autoPollTask, recyclerView.TIME_AUTO_POLL);
+            }
+        }
+    }
+
+    //开启:如果正在运行,先停止->再开启
+    public void start() {
+        if (running)
+            stop();
+        canRun = true;
+        running = true;
+        postDelayed(autoPollTask, TIME_AUTO_POLL);
+    }
+
+    public void stop() {
+        running = false;
+        removeCallbacks(autoPollTask);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent e) {
+        switch (e.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                if (running)
+                    stop();
+                break;
+            case MotionEvent.ACTION_UP:
+            case MotionEvent.ACTION_CANCEL:
+            case MotionEvent.ACTION_OUTSIDE:
+                if (canRun)
+                    start();
+                break;
+        }
+        return super.onTouchEvent(e);
+    }
+}

+ 44 - 0
app/src/main/java/com/edufound/reader/cusview/RoundFrameLayout.java

@@ -0,0 +1,44 @@
+package com.edufound.reader.cusview;
+
+import android.content.Context;
+import android.graphics.Outline;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewOutlineProvider;
+import android.widget.FrameLayout;
+
+import com.edufound.reader.util.SizeUtils;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+public class RoundFrameLayout extends FrameLayout {
+    public RoundFrameLayout(@NonNull Context context) {
+        super(context);
+        init();
+    }
+
+    public RoundFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public RoundFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init();
+    }
+
+    void init() {
+        this.setOutlineProvider(new ViewOutlineProvider() {
+            @Override
+            public void getOutline(View view, Outline outline) {
+                outline.setRoundRect(0,
+                        0,
+                        view.getWidth(),
+                        view.getHeight(),
+                        SizeUtils.px2dp(getContext(), 16));
+            }
+        });
+        this.setClipToOutline(true);
+    }
+}

+ 81 - 0
app/src/main/java/com/edufound/reader/fragment/CharacterFragment.java

@@ -0,0 +1,81 @@
+package com.edufound.reader.fragment;
+
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.GridLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.edufound.reader.R;
+import com.edufound.reader.base.BaseMvpFragment;
+import com.edufound.reader.contract.CharacterFragmentContract;
+import com.edufound.reader.contract.UserFragmentContract;
+import com.edufound.reader.presenter.CharacterFragmentPresenter;
+import com.edufound.reader.presenter.UserFragmentPresenter;
+import com.jakewharton.rxbinding4.view.RxViewGroup;
+import com.orhanobut.logger.Logger;
+
+import io.reactivex.rxjava3.functions.Consumer;
+
+public class CharacterFragment extends BaseMvpFragment<CharacterFragmentPresenter> implements CharacterFragmentContract.View {
+
+
+    GridLayout mGridLayout;
+
+
+    @Override
+    protected void initView(View view) {
+        mPresenter = new CharacterFragmentPresenter(getContext());
+        mPresenter.attachView(this);
+        //初始化左侧广告UI
+        ImageView mCharacterImage = view.findViewById(R.id.fragment_main_character_img);
+
+        mGridLayout = view.findViewById(R.id.fragment_my_recyclerview);
+//        mPresenter.initRecyclerView(mRecyclerView);
+        mPresenter.initGridLayout(mGridLayout);
+
+    }
+
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.fragment_main_character;
+    }
+
+    @Override
+    protected void initViewListener() {
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void onError(String errMessage) {
+
+    }
+
+    @Override
+    public void addUiClick(View view, Consumer onNext) {
+        addUiClickListener(view, onNext);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        mPresenter.onDestory(mGridLayout);
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        mPresenter.onDestory(mGridLayout);
+    }
+}

+ 89 - 3
app/src/main/java/com/edufound/reader/fragment/RecommendFragment.java

@@ -1,14 +1,20 @@
 package com.edufound.reader.fragment;
 
-import android.app.Activity;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.graphics.drawable.AnimationDrawable;
 import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.LinearInterpolator;
+import android.widget.FrameLayout;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 
 import com.edufound.reader.R;
 import com.edufound.reader.base.BaseMvpFragment;
 import com.edufound.reader.contract.RecommendFragmentContract;
 import com.edufound.reader.presenter.RecommendFragmentPresenter;
-import com.edufound.reader.util.GlideUtils;
+import com.orhanobut.logger.Logger;
 
 import androidx.recyclerview.widget.RecyclerView;
 import cn.jzvd.JzvdStd;
@@ -17,13 +23,63 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
 
 
     RecyclerView mRecyclerView;
+    FrameLayout mUserHeadLayout;
+    FrameLayout mCommentLayout;
+    FrameLayout mCollectionLayout;
+    FrameLayout mThumbsLayout;
+    LinearLayout mToRecordLayout;
+    ImageView mVideoUp;
+    ImageView mVideoNext;
+    ObjectAnimator mRotationImgAnim;
+    ImageView mToRecordRotationbg;
+    ObjectAnimator mToRecordScaleXAnim;
+    ObjectAnimator mToRecordScaleYAnim;
+    ImageView mToRecordScaleIcon;
+
+    //默认是推荐 mFragmentType=0
+    //关注 mFragmentType=1
+    int mFragmentType = 0;
+
+    public RecommendFragment(int type) {
+        mFragmentType = type;
+    }
 
     @Override
     protected void initView(View view) {
         mPresenter = new RecommendFragmentPresenter(getContext());
         mPresenter.attachView(this);
         mRecyclerView = view.findViewById(R.id.fragment_recommend_recyclerview);
-        mPresenter.initVideoList(mRecyclerView);
+        mUserHeadLayout = view.findViewById(R.id.fragment_recommend_user_head_layout);
+        mCommentLayout = view.findViewById(R.id.fragment_recommend_comment_layout);
+        mCollectionLayout = view.findViewById(R.id.fragment_recommend_collection_layout);
+        mThumbsLayout = view.findViewById(R.id.fragment_recommend_thumbs_layout);
+        mVideoUp = view.findViewById(R.id.fragment_recommend_video_up);
+        mVideoNext = view.findViewById(R.id.fragment_recommend_video_next);
+        mToRecordLayout = view.findViewById(R.id.fragment_recommend_to_record_layout);
+        //录音按钮背景旋转
+        mToRecordRotationbg = mToRecordLayout.findViewById(R.id.fragment_recommend_to_record_bg);
+        mRotationImgAnim = ObjectAnimator.ofFloat(mToRecordRotationbg, "rotation", 0.0F, 359.0F);//设置Y轴的立体旋转动画
+        mRotationImgAnim.setRepeatCount(-1);
+        mRotationImgAnim.setDuration(1500);
+        LinearInterpolator interpolator = new LinearInterpolator();
+        mRotationImgAnim.setInterpolator(interpolator); //设置匀速旋转,不卡顿 icon_anim.start();
+        mRotationImgAnim.start();
+        //录音按钮缩小放大
+        mToRecordScaleIcon = mToRecordLayout.findViewById(R.id.fragment_recommend_to_record_icon);
+        mToRecordScaleXAnim = ObjectAnimator.ofFloat(mToRecordScaleIcon, "scaleX", 0.8F, 1F);//设置Y轴的立体旋转动画
+        mToRecordScaleXAnim.setRepeatCount(-1);
+        mToRecordScaleXAnim.setRepeatMode(ObjectAnimator.REVERSE);
+        mToRecordScaleXAnim.setDuration(2000);
+        LinearInterpolator interpolator2 = new LinearInterpolator();
+        mToRecordScaleXAnim.setInterpolator(interpolator2); //设置匀速旋转,不卡顿 icon_anim.start();
+        mToRecordScaleYAnim = ObjectAnimator.ofFloat(mToRecordScaleIcon, "scaleY", 0.8F, 1F);//设置Y轴的立体旋转动画
+        mToRecordScaleYAnim.setRepeatCount(-1);
+        mToRecordScaleYAnim.setRepeatMode(ObjectAnimator.REVERSE);
+        mToRecordScaleYAnim.setDuration(2000);
+        mToRecordScaleYAnim.setInterpolator(interpolator2); //设置匀速旋转,不卡顿 icon_anim.start();
+        AnimatorSet animatorSet = new AnimatorSet();
+        animatorSet.play(mToRecordScaleXAnim).with(mToRecordScaleYAnim);
+        animatorSet.start();
     }
 
     @Override
@@ -32,6 +88,34 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
     }
 
     @Override
+    protected void initViewListener() {
+        addUiClickListener(mUserHeadLayout, o -> {
+            Logger.e("点击了手机号旁边的头像");
+        });
+        addUiClickListener(mCommentLayout, o -> {
+            Logger.e("点击了评论");
+        });
+        addUiClickListener(mCollectionLayout, o -> {
+            Logger.e("点击了收藏");
+        });
+        addUiClickListener(mThumbsLayout, o -> {
+            Logger.e("点击了点赞");
+        });
+        addUiClickListener(mVideoUp, o -> {
+            Logger.e("上一个视频");
+            mPresenter.scrollToUpFunction(mRecyclerView);
+        });
+        addUiClickListener(mVideoNext, o -> {
+            mPresenter.scrollToNextFunction(mRecyclerView, true);
+            Logger.e("下一个视频");
+        });
+        addUiClickListener(mToRecordLayout, o -> {
+            Logger.e("点击我要录音了");
+        });
+        mPresenter.initVideoList(mRecyclerView, mFragmentType);
+    }
+
+    @Override
     public void showLoading() {
 
     }
@@ -59,4 +143,6 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
         super.onResume();
         JzvdStd.goOnPlayOnResume();
     }
+
+
 }

+ 135 - 0
app/src/main/java/com/edufound/reader/fragment/UserFragment.java

@@ -0,0 +1,135 @@
+package com.edufound.reader.fragment;
+
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.GridLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.edufound.reader.R;
+import com.edufound.reader.base.BaseMvpFragment;
+import com.edufound.reader.bean.UserInfoBean;
+import com.edufound.reader.contract.UserFragmentContract;
+import com.edufound.reader.presenter.UserFragmentPresenter;
+import com.edufound.reader.util.GlideUtils;
+
+import io.reactivex.rxjava3.functions.Consumer;
+
+public class UserFragment extends BaseMvpFragment<UserFragmentPresenter> implements UserFragmentContract.View {
+
+
+    GridLayout mGridLayout;
+    ImageView mHeaderUserImg;
+    ImageView mHeadUserSetting;
+    TextView mHeadUserPhone;
+    TextView mHeadUserGrade;
+    TextView mHeadUserFans;
+    TextView mHeadUserPlayCount;
+    ImageView mHeadUserVip;
+    ImageView mHeadUserRedFlower;
+    ImageView mHeadUserMyAttention;
+    ImageView mHeadUserMyCollection;
+    ImageView mHeadUserMessage;
+    ImageView mHeadUserCustomerService;
+
+    @Override
+    protected void initView(View view) {
+        mPresenter = new UserFragmentPresenter(getContext());
+        mPresenter.attachView(this);
+
+        //初始化左侧header ui
+        FrameLayout headlayout = view.findViewById(R.id.fragment_main_user_head_layout);
+        mHeaderUserImg = headlayout.findViewById(R.id.fragment_main_user_head);
+        mHeadUserSetting = headlayout.findViewById(R.id.fragment_main_user_setting);
+        mHeadUserPhone = headlayout.findViewById(R.id.fragment_main_user_phonenum);
+        mHeadUserGrade = headlayout.findViewById(R.id.fragment_main_user_grade);
+        mHeadUserFans = headlayout.findViewById(R.id.fragment_main_user_fans);
+        mHeadUserPlayCount = headlayout.findViewById(R.id.fragment_main_user_playcount);
+        mHeadUserVip = headlayout.findViewById(R.id.fragment_main_user_vip);
+        mHeadUserRedFlower = headlayout.findViewById(R.id.fragment_main_user_redflower);
+        mHeadUserMyAttention = headlayout.findViewById(R.id.fragment_main_user_myattention);
+        mHeadUserMyCollection = headlayout.findViewById(R.id.fragment_main_user_mycollection);
+        mHeadUserMessage = headlayout.findViewById(R.id.fragment_main_user_messagenotification);
+        mHeadUserCustomerService = headlayout.findViewById(R.id.fragment_main_user_customerservice);
+
+        mGridLayout = view.findViewById(R.id.fragment_my_recyclerview);
+//        mPresenter.initRecyclerView(mRecyclerView);
+        mPresenter.initGridLayout(mGridLayout);
+    }
+
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.fragment_main_user;
+    }
+
+    @Override
+    protected void initViewListener() {
+        addUiClick(mHeadUserSetting, o -> {
+            Toast.makeText(getActivity(), "click 设置", Toast.LENGTH_SHORT).show();
+        });
+        addUiClick(mHeadUserVip, o -> {
+            Toast.makeText(getActivity(), "click vip", Toast.LENGTH_SHORT).show();
+        });
+        addUiClick(mHeadUserRedFlower, o -> {
+            Toast.makeText(getActivity(), "click 小红花", Toast.LENGTH_SHORT).show();
+        });
+        addUiClick(mHeadUserMyAttention, o -> {
+            Toast.makeText(getActivity(), "click 我的关注", Toast.LENGTH_SHORT).show();
+        });
+        addUiClick(mHeadUserMyCollection, o -> {
+            Toast.makeText(getActivity(), "click 我的收藏", Toast.LENGTH_SHORT).show();
+
+        });
+        addUiClick(mHeadUserMessage, o -> {
+            Toast.makeText(getActivity(), "click 消息通知", Toast.LENGTH_SHORT).show();
+
+        });
+        addUiClick(mHeadUserCustomerService, o -> {
+            Toast.makeText(getActivity(), "click 联系客服", Toast.LENGTH_SHORT).show();
+
+        });
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void onError(String errMessage) {
+
+    }
+
+    @Override
+    public void addUiClick(View view, Consumer onNext) {
+        addUiClickListener(view, onNext);
+    }
+
+    @Override
+    public void setUserInfo(UserInfoBean bean) {
+        GlideUtils.loadCircleImage(getContext(), bean.getUserHeadImg(), mHeaderUserImg);
+        mHeadUserPhone.setText(bean.getUserPhone());
+        mHeadUserGrade.setText(bean.getUserGrade());
+        mHeadUserFans.setText(bean.getUserFans());
+        mHeadUserPlayCount.setText(bean.getUserPlayCount());
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        mPresenter.onDestory(mGridLayout);
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        mPresenter.onDestory(mGridLayout);
+    }
+}

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

@@ -0,0 +1,7 @@
+package com.edufound.reader.model;
+
+import com.edufound.reader.contract.CharacterFragmentContract;
+
+public class CharacterFragmentModel implements CharacterFragmentContract.Model {
+    public static final int LOAD_GRID = 0x1231;
+}

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

@@ -0,0 +1,6 @@
+package com.edufound.reader.model;
+
+import com.edufound.reader.contract.LoginAlertContract;
+
+public class LoginAlertModel implements LoginAlertContract.Model {
+}

+ 7 - 0
app/src/main/java/com/edufound/reader/model/UserFragmentModel.java

@@ -0,0 +1,7 @@
+package com.edufound.reader.model;
+
+import com.edufound.reader.contract.UserFragmentContract;
+
+public class UserFragmentModel implements UserFragmentContract.Model {
+    public static final int LOAD_GRID = 0x1231;
+}

+ 114 - 0
app/src/main/java/com/edufound/reader/presenter/CharacterFragmentPresenter.java

@@ -0,0 +1,114 @@
+package com.edufound.reader.presenter;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.GridLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.edufound.reader.R;
+import com.edufound.reader.base.BasePresenter;
+import com.edufound.reader.contract.CharacterFragmentContract;
+import com.edufound.reader.model.CharacterFragmentModel;
+import com.edufound.reader.util.GlideUtils;
+import com.edufound.reader.util.SizeUtils;
+import com.orhanobut.logger.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CharacterFragmentPresenter extends BasePresenter<CharacterFragmentContract.View> implements CharacterFragmentContract.Presenter {
+    Context mContext;
+    CharacterFragmentModel mModel;
+
+    public CharacterFragmentPresenter(Context context) {
+        mModel = new CharacterFragmentModel();
+        mContext = context;
+    }
+
+    @Override
+    public void initGridLayout(GridLayout gridLayout) {
+        List<Object> mDataList = new ArrayList<>();
+        for (int i = 0; i < 30; i++) {
+            mDataList.add("i=" + i);
+        }
+        gridLayout.setRowCount(2);
+        gridLayout.setColumnCount(mDataList.size() / 2);
+        for (int j = 0; j < mDataList.size(); j++) {
+            Message message = new Message();
+            message.obj = gridLayout;
+            message.what = CharacterFragmentModel.LOAD_GRID;
+            message.arg1 = j;
+            mCharacterHandler.sendMessageDelayed(message, 50 * j);
+        }
+    }
+
+    @Override
+    public void onDestory(GridLayout layout) {
+        mCharacterHandler.removeMessages(CharacterFragmentModel.LOAD_GRID);
+        mCharacterHandler = null;
+        layout.removeAllViews();
+        layout = null;
+        mView = null;
+    }
+
+
+    private void setGridItemView(GridLayout gridLayout, int index) {
+
+        if (mView == null) {
+            return;
+        }
+        View view = LayoutInflater.from(mContext).inflate(R.layout.adapter_item_record, null);
+        ImageView imgIcon = view.findViewById(R.id.adapter_item_record_icon);
+        TextView name = view.findViewById(R.id.adapter_item_record_name);
+        ImageView imgDel = view.findViewById(R.id.adapter_item_record_del);
+        ImageView imgPriv = view.findViewById(R.id.adapter_item_record_priv);
+        FrameLayout checkLayout = view.findViewById(R.id.adapter_item_record_examine_layout);
+        GlideUtils.loadRoundCircleImage(mContext, "http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640", imgIcon, SizeUtils.dp2px(mContext, 20));
+        if (index < 3) {
+            //测试用
+            checkLayout.setVisibility(View.GONE);
+            imgPriv.setImageResource(R.drawable.adapter_item_record_pub);
+        }
+        mView.addUiClick(imgDel, o -> {
+            gridLayout.removeView(view);
+
+        });
+        mView.addUiClick(view, o -> {
+
+        });
+
+        checkLayout.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View view, MotionEvent motionEvent) {
+                return true;
+            }
+        });
+        name.setText("当前第:" + index + "个");
+        GridLayout.LayoutParams params = new GridLayout.LayoutParams(new FrameLayout.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);
+        gridLayout.addView(view);
+    }
+
+
+    Handler mCharacterHandler = new Handler(new Handler.Callback() {
+        @Override
+        public boolean handleMessage(Message msg) {
+            switch (msg.what) {
+                case CharacterFragmentModel.LOAD_GRID:
+                    setGridItemView((GridLayout) msg.obj, msg.arg1);
+                    break;
+                default:
+                    throw new IllegalStateException("Unexpected value: " + msg.what);
+            }
+            return false;
+        }
+    });
+
+}

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

@@ -12,7 +12,7 @@ import com.edufound.reader.contract.CrashDialogContract;
 import com.edufound.reader.services.RecordServices;
 import com.orhanobut.logger.Logger;
 
-public class CrashDialogPresenter extends BasePresenter implements CrashDialogContract.Presenter {
+public class CrashDialogPresenter extends BasePresenter<CrashDialogContract.View> implements CrashDialogContract.Presenter {
     RecordServices mRecordServices;
 
 

+ 124 - 0
app/src/main/java/com/edufound/reader/presenter/LoginAlertPresenter.java

@@ -0,0 +1,124 @@
+package com.edufound.reader.presenter;
+
+import android.graphics.Color;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
+import android.text.TextPaint;
+import android.text.TextUtils;
+import android.text.method.LinkMovementMethod;
+import android.text.style.ClickableSpan;
+import android.view.View;
+import android.view.ViewGroup;
+import android.webkit.WebView;
+import android.widget.FrameLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.edufound.reader.base.BasePresenter;
+import com.edufound.reader.contract.LoginAlertContract;
+import com.edufound.reader.util.Consts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.reactivex.rxjava3.annotations.NonNull;
+
+public class LoginAlertPresenter extends BasePresenter<LoginAlertContract.View> implements LoginAlertContract.Presenter {
+
+    List<Integer> leftBrackets = new ArrayList<>();
+    List<Integer> rightBrackets = new ArrayList<>();
+    String mServiceText = "点击登录表示您已阅读并同意《用户隐私政策》和《服务协议》。";
+
+
+    @Override
+    public void initServiceText(TextView textView) {
+        leftBrackets = getChildIndexFromString(mServiceText, "《");
+        rightBrackets = getChildIndexFromString(mServiceText, "》");
+        SpannableStringBuilder style = new SpannableStringBuilder();
+        style.append(mServiceText);
+        for (int i = 0; i < leftBrackets.size(); i++) {
+            final int finalI = i;
+            style.setSpan(new ClickableSpan() {
+                @Override
+                public void onClick(@NonNull View widget) {
+                    lookPrivacy(finalI);
+                }
+
+                @Override
+                public void updateDrawState(@NonNull TextPaint ds) {
+                    ds.setUnderlineText(false);
+                    ds.setColor(Color.parseColor("#68a5dc"));
+                }
+
+            }, leftBrackets.get(i), rightBrackets.get(i) + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+
+        }
+        textView.setMovementMethod(LinkMovementMethod.getInstance());
+        textView.setHighlightColor(Color.parseColor("#ffffff"));
+        textView.setText(style);
+    }
+
+    @Override
+    public void getVCode(String phoneNum) {
+        if (isMobileNO(phoneNum)) {
+            //正常
+            
+        } else {
+            Toast.makeText(mView.getActivity(), "请输入正确的手机号", Toast.LENGTH_SHORT).show();
+            //不正常
+        }
+    }
+
+
+    private List<Integer> getChildIndexFromString(String parent, String child) {
+        int startIndex = 0;
+        List<Integer> ids = new ArrayList<>();
+        while (parent.indexOf(child, startIndex) != -1) {
+            //ids.add(startIndex);
+            startIndex = parent.indexOf(child, startIndex);
+            ids.add(startIndex);
+            startIndex = startIndex + child.length();
+        }
+        return ids;
+    }
+
+
+    void lookPrivacy(int index) {
+        WebView webview = new WebView(Consts.getmApplicAtion());
+        webview.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
+        String url = "";
+        switch (index) {
+            case 0:
+                url = "http://m-xyyf-web.ai160.com/res/protocol/service.htm";
+                break;
+            case 1:
+                url = "http://m-xyyf-web.ai160.com/res/protocol/private.htm";
+                break;
+        }
+        webview.getSettings().setUseWideViewPort(true);
+        webview.getSettings().setLoadWithOverviewMode(true);
+        webview.getSettings().setJavaScriptEnabled(true);
+        webview.getSettings().setDomStorageEnabled(true);
+        webview.loadUrl(url);
+        mView.getRootView().addView(webview);
+    }
+
+
+    /**
+     * 判断字符串是否符合手机号码格式
+     * 移动号段: 134,135,136,137,138,139,147,150,151,152,157,158,159,170,178,182,183,184,187,188
+     * 联通号段: 130,131,132,145,155,156,170,171,175,176,185,186
+     * 电信号段: 133,149,153,170,173,177,180,181,189
+     *
+     * @param mobileNums
+     * @return 待检测的字符串
+     */
+    public boolean isMobileNO(String mobileNums) {
+        String telRegex = "^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$";// "[1]"代表第1位为数字1,"[358]"代表第二位可以为3、5、8中的一个,"\\d{9}"代表后面是可以是0~9的数字,有9位。
+        if (TextUtils.isEmpty(mobileNums)) {
+            return false;
+        } else {
+            return mobileNums.matches(telRegex);
+        }
+    }
+}

+ 34 - 1
app/src/main/java/com/edufound/reader/presenter/MainPresenter.java

@@ -1,14 +1,19 @@
 package com.edufound.reader.presenter;
 
+import android.content.Intent;
 import android.view.KeyEvent;
 import android.widget.RadioGroup;
 
 import com.edufound.reader.R;
+import com.edufound.reader.activity.LoginAlertActivity;
 import com.edufound.reader.application.EApplication;
 import com.edufound.reader.base.BasePresenter;
 import com.edufound.reader.contract.MainContract;
+import com.edufound.reader.fragment.CharacterFragment;
 import com.edufound.reader.fragment.RecommendFragment;
+import com.edufound.reader.fragment.UserFragment;
 import com.edufound.reader.model.MainModel;
+import com.edufound.reader.util.Consts;
 import com.orhanobut.logger.Logger;
 
 import androidx.fragment.app.Fragment;
@@ -17,13 +22,20 @@ import androidx.fragment.app.FragmentTransaction;
 
 public class MainPresenter extends BasePresenter<MainContract.View> implements MainContract.Presenter {
     MainModel mModel;
+    UserFragment mUserFragment;
     RecommendFragment mRecommendFragment;
     FragmentManager mFragmentManager;
+    RecommendFragment mFollowFragment;
+    CharacterFragment mCharacterFragment;
+
 
     public MainPresenter(FragmentManager fragmentManager) {
         mModel = new MainModel();
         mFragmentManager = fragmentManager;
-        mRecommendFragment = new RecommendFragment();
+        mUserFragment = new UserFragment();
+        mRecommendFragment = new RecommendFragment(0);
+        mFollowFragment = new RecommendFragment(1);
+        mCharacterFragment = new CharacterFragment();
 
     }
 
@@ -34,6 +46,10 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
             case R.id.main_left_tab_layout_myinfo:
                 //我的
                 Logger.e("我的");
+//                if (checkLogin()) {
+//                    changeFragmentLayout(mUserFragment);
+//                }
+                changeFragmentLayout(mUserFragment);
                 break;
             case R.id.main_left_tab_layout_recommend:
                 //推荐
@@ -43,10 +59,14 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
             case R.id.main_left_tab_layout_follow:
                 //关注
                 Logger.e("关注");
+                if (checkLogin()) {
+                    changeFragmentLayout(mFollowFragment);
+                }
                 break;
             case R.id.main_left_tab_layout_character:
                 //任务
                 Logger.e("任务");
+                changeFragmentLayout(mCharacterFragment);
                 break;
         }
     }
@@ -59,6 +79,19 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
         transaction.commit();
     }
 
+
+    boolean checkLogin() {
+        if (Consts.getmConstsUserBean() != null) {
+            //已登录
+            return true;
+        }
+        //未登录,去登录
+        Intent tologin = new Intent(mView.getActivity(), LoginAlertActivity.class);
+        mView.getActivity().startActivity(tologin);
+        return false;
+    }
+
+
     @Override
     public void activityDestroy() {
     }

+ 38 - 19
app/src/main/java/com/edufound/reader/presenter/RecommendFragmentPresenter.java

@@ -26,12 +26,12 @@ import androidx.recyclerview.widget.OrientationHelper;
 import androidx.recyclerview.widget.RecyclerView;
 import cn.jzvd.Jzvd;
 
-public class RecommendFragmentPresenter extends BasePresenter implements RecommendFragmentContract.Presenter {
+public class RecommendFragmentPresenter extends BasePresenter<RecommendFragmentContract.View> implements RecommendFragmentContract.Presenter {
 
     Context mContext;
     RecommendFragmentModel mModel;
     private ViewPagerLayoutManager mViewPagerLayoutManager;
-    private int mCurrentPosition = -1;
+    private int mCurrentPosition = 0;
 
     /*
      * 测试数据
@@ -45,31 +45,38 @@ public class RecommendFragmentPresenter extends BasePresenter implements Recomme
     }
 
     @Override
-    public void initVideoList(RecyclerView rv) {
-        FrameLayout frameLayout = (FrameLayout) rv.getParent();
-        frameLayout.setOutlineProvider(new ViewOutlineProvider() {
-            @Override
-            public void getOutline(View view, Outline outline) {
-                outline.setRoundRect(0,
-                        0,
-                        view.getWidth(),
-                        view.getHeight(),
-                        SizeUtils.px2dp(mContext, 40));
-            }
-        });
-        frameLayout.setClipToOutline(true);
+    public void initVideoList(RecyclerView rv, int type) {
+//        FrameLayout frameLayout = (FrameLayout) rv.getParent();
+//        frameLayout.setOutlineProvider(new ViewOutlineProvider() {
+//            @Override
+//            public void getOutline(View view, Outline outline) {
+//                outline.setRoundRect(0,
+//                        0,
+//                        view.getWidth(),
+//                        view.getHeight(),
+//                        SizeUtils.px2dp(mContext, 40));
+//            }
+//        });
+//        frameLayout.setClipToOutline(true);
         rv.setOutlineProvider(new ViewOutlineProvider() {
             @Override
             public void getOutline(View view, Outline outline) {
-                outline.setRoundRect(0,
+                outline.setRoundRect(SizeUtils.dp2px(mContext, 5),
                         0,
-                        view.getWidth(),
+                        view.getWidth() - SizeUtils.dp2px(mContext, 5),
                         view.getHeight(),
-                        SizeUtils.px2dp(mContext, 40));
+                        SizeUtils.dp2px(mContext, 40));
             }
         });
         rv.setClipToOutline(true);
 
+
+        if (type == 0) {
+            //推荐的接口
+        } else if (type == 1) {
+            //关注的接口
+        }
+
         /*
          * 测试数据
          * */
@@ -115,6 +122,7 @@ public class RecommendFragmentPresenter extends BasePresenter implements Recomme
 //                }
                 autoPlayVideo(rv);
                 mCurrentPosition = position;
+                Logger.e("mCurrentPosition:" + mCurrentPosition);
             }
         });
         rv.addOnChildAttachStateChangeListener(new RecyclerView.OnChildAttachStateChangeListener() {
@@ -158,7 +166,7 @@ public class RecommendFragmentPresenter extends BasePresenter implements Recomme
         }
     }
 
-    private void scrollToNextFunction(RecyclerView rv, boolean needScroll) {
+    public void scrollToNextFunction(RecyclerView rv, boolean needScroll) {
         //获取当前显示的View 的数据
         int childCount = rv.getChildCount();
         //获取最后一具 Item 对应的View
@@ -180,4 +188,15 @@ public class RecommendFragmentPresenter extends BasePresenter implements Recomme
         }
     }
 
+    public void scrollToUpFunction(RecyclerView rv) {
+        //获取当前显示的View 的数据
+        Logger.e("mCurrentPosition:" + mCurrentPosition);
+        if (mCurrentPosition > 0) {
+            rv.smoothScrollToPosition(mCurrentPosition - 1);
+            mCurrentPosition = mCurrentPosition - 1;
+        }
+
+
+    }
+
 }

+ 187 - 0
app/src/main/java/com/edufound/reader/presenter/UserFragmentPresenter.java

@@ -0,0 +1,187 @@
+package com.edufound.reader.presenter;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.GridLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.edufound.reader.R;
+import com.edufound.reader.base.BasePresenter;
+import com.edufound.reader.contract.UserFragmentContract;
+import com.edufound.reader.model.CharacterFragmentModel;
+import com.edufound.reader.model.UserFragmentModel;
+import com.edufound.reader.util.GlideUtils;
+import com.edufound.reader.util.SizeUtils;
+import com.orhanobut.logger.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+public class UserFragmentPresenter extends BasePresenter<UserFragmentContract.View> implements UserFragmentContract.Presenter {
+
+    UserFragmentModel mModel;
+    Context mContext;
+
+    public UserFragmentPresenter(Context context) {
+        mContext = context;
+        mModel = new UserFragmentModel();
+    }
+
+    @Override
+    public void initRecyclerView(RecyclerView rv) {
+//
+//        List<Object> mDataList = new ArrayList<>();
+//        for (int i = 0; i < 30; i++) {
+//            mDataList.add("i=" + i);
+//        }
+//        RecordItemAdapter adapter = new RecordItemAdapter(mContext, mDataList);
+//        GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
+//        gridLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+//        gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
+//            @Override
+//            public int getSpanSize(int position) {
+//                return (adapter.isHeaderView(position) || adapter.isBottomView(position)) ? gridLayoutManager.getSpanCount() : 1;
+//            }
+//        });
+//        rv.addItemDecoration(new GridSpaceItemDecoration((adapter.getContentItemCount() / 2),
+//                SizeUtils.dp2px(mContext, 27),
+//                SizeUtils.dp2px(mContext, 27)));
+//        rv.setLayoutManager(gridLayoutManager);
+//
+//        Logger.e("adapter.getItemCount():" + adapter.getItemCount());
+//        rv.setNestedScrollingEnabled(false);
+//        rv.setAdapter(adapter);
+
+        //我的作品TextView原因,无法使用RecyclerView,但是代码和xml保留. src/fragmentUser里面
+    }
+
+
+    @Override
+    public void initGridLayout(GridLayout gridLayout) {
+        List<Object> mDataList = new ArrayList<>();
+        for (int i = 0; i < 30; i++) {
+            mDataList.add("i=" + i);
+        }
+        gridLayout.setRowCount(2);
+        gridLayout.setColumnCount(mDataList.size() / 2);
+        for (int j = 0; j < mDataList.size(); j++) {
+            Message message = new Message();
+            message.obj = gridLayout;
+            message.what = CharacterFragmentModel.LOAD_GRID;
+            message.arg1 = j;
+            mUserFragmentHandler.sendMessageDelayed(message, 50 * j);
+        }
+    }
+
+
+    @Override
+    public void onDestory(GridLayout layout) {
+        mUserFragmentHandler.removeMessages(UserFragmentModel.LOAD_GRID);
+        mUserFragmentHandler = null;
+        layout.removeAllViews();
+        layout = null;
+        mView = null;
+    }
+
+
+    private void setGridItemView(GridLayout gridLayout, int index) {
+
+        if (mView == null) {
+            return;
+        }
+        View view = LayoutInflater.from(mContext).inflate(R.layout.adapter_item_record, null);
+        ImageView imgIcon = view.findViewById(R.id.adapter_item_record_icon);
+        TextView name = view.findViewById(R.id.adapter_item_record_name);
+        ImageView imgDel = view.findViewById(R.id.adapter_item_record_del);
+        ImageView imgPriv = view.findViewById(R.id.adapter_item_record_priv);
+        FrameLayout checkLayout = view.findViewById(R.id.adapter_item_record_examine_layout);
+        GlideUtils.loadRoundCircleImage(mContext, "http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640", imgIcon, SizeUtils.dp2px(mContext, 20));
+        if (index < 3) {
+            //测试用
+            checkLayout.setVisibility(View.GONE);
+            imgPriv.setImageResource(R.drawable.adapter_item_record_pub);
+        }
+        mView.addUiClick(imgDel, o -> {
+            gridLayout.removeView(view);
+
+        });
+        mView.addUiClick(view, o -> {
+
+        });
+
+        checkLayout.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View view, MotionEvent motionEvent) {
+                return true;
+            }
+        });
+        name.setText("当前第:" + index + "个");
+        GridLayout.LayoutParams params = new GridLayout.LayoutParams(new FrameLayout.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);
+        gridLayout.addView(view);
+    }
+
+
+    Handler mUserFragmentHandler = new Handler(new Handler.Callback() {
+        @Override
+        public boolean handleMessage(Message msg) {
+            switch (msg.what) {
+                case UserFragmentModel.LOAD_GRID:
+                    setGridItemView((GridLayout) msg.obj, msg.arg1);
+                    break;
+                default:
+                    throw new IllegalStateException("Unexpected value: " + msg.what);
+            }
+            return false;
+        }
+    });
+
+
+}
+
+
+////平均分item,rv的itemdecoration
+//class GridSpaceItemDecoration extends RecyclerView.ItemDecoration {
+//
+//    private int mSpanCount;//横条目数量
+//    private int mRowSpacing;//行间距
+//    private int mColumnSpacing;// 列间距
+//
+//    /**
+//     * @param spanCount     列数
+//     * @param rowSpacing    行间距
+//     * @param columnSpacing 列间距
+//     */
+//    public GridSpaceItemDecoration(int spanCount, int rowSpacing, int columnSpacing) {
+//        this.mSpanCount = spanCount;
+//        this.mRowSpacing = rowSpacing;
+//        this.mColumnSpacing = columnSpacing;
+//    }
+//
+//    @Override
+//    public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
+//        int position = parent.getChildAdapterPosition(view); // 获取view 在adapter中的位置。
+//        int column = position % mSpanCount; // view 所在的列
+//
+//        // 列间距
+//        outRect.left = mColumnSpacing;
+//
+//        // 如果position > 行数,说明不是在第一行,则不指定行高,其他行的上间距为 top=mRowSpacing
+//        if (position >= mSpanCount) {
+//            outRect.top = mRowSpacing; // item top
+//        }
+//
+////        if ((position % 2) != 0) {
+////            outRect.top = mRowSpacing + SizeUtils.dp2px(Consts.getmApplicAtion(), 50);
+////        }
+//    }
+//}

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

@@ -4,13 +4,13 @@ import android.content.Intent;
 import android.media.MediaPlayer;
 import android.view.ViewGroup;
 import android.widget.FrameLayout;
+import android.widget.Toast;
 
 import com.edufound.reader.base.BasePresenter;
 import com.edufound.reader.contract.VideoContract;
 import com.edufound.reader.cusview.FullScreenVideoController;
 import com.edufound.reader.ijkplayer.media.IjkVideoView;
 import com.edufound.reader.model.VideoModel;
-import com.edufound.reader.util.CToast;
 
 import tv.danmaku.ijk.media.player.IMediaPlayer;
 
@@ -73,12 +73,12 @@ public class VideoPresenter extends BasePresenter<VideoContract.View> implements
         switch (what) {
             case -10000:
 //                mVideoHandler.sendEmptyMessage(DISCONNECT_NETWORK);
-                CToast.makeText(mView.getActivity(), "网络出现异常", 3000).show();
+                Toast.makeText(mView.getActivity(), "网络出现异常", Toast.LENGTH_SHORT).show();
                 break;
             default:
                 mVideoView.stopPlayback();
                 mVideoView.stopBackgroundPlay();
-                CToast.makeText(mView.getActivity(), "视频异常--what:" + what + "--extra:" + extra, 3000).show();
+                Toast.makeText(mView.getActivity(), "视频异常--what:" + what + "--extra:" + extra, Toast.LENGTH_SHORT).show();
                 mView.getActivity().finish();
                 break;
         }

+ 0 - 237
app/src/main/java/com/edufound/reader/util/CToast.java

@@ -1,237 +0,0 @@
-package com.edufound.reader.util;
-
-import android.content.Context;
-import android.graphics.Color;
-import android.graphics.PixelFormat;
-import android.os.Handler;
-import android.view.Gravity;
-import android.view.View;
-import android.view.WindowManager;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-public class CToast {
-
-    public static CToast makeText(Context context, CharSequence text, int duration) {
-        CToast result = new CToast(context);
-
-        LinearLayout mLayout = new LinearLayout(context);
-        TextView tv = new TextView(context);
-        tv.setText(text);
-        tv.setTextColor(Color.WHITE);
-        tv.setGravity(Gravity.CENTER);
-//        mLayout.setBackgroundResource(R.drawable.widget_toast_bg);
-
-        int w = context.getResources().getDisplayMetrics().widthPixels / 2;
-        int h = context.getResources().getDisplayMetrics().widthPixels / 10;
-        mLayout.addView(tv, w, h);
-        result.mNextView = mLayout;
-        result.mDuration = duration;
-
-        return result;
-    }
-
-    public static final int LENGTH_SHORT = 2000;
-    public static final int LENGTH_LONG = 3500;
-
-    private final Handler mHandler = new Handler();
-    private int mDuration = LENGTH_SHORT;
-    private int mGravity = Gravity.CENTER;
-    private int mX, mY;
-    private float mHorizontalMargin;
-    private float mVerticalMargin;
-    private View mView;
-    private View mNextView;
-
-    private WindowManager mWM;
-    private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
-
-
-    public CToast(Context context) {
-        init(context);
-    }
-
-    /**
-     * Set the view to show.
-     *
-     * @see #getView
-     */
-    public void setView(View view) {
-        mNextView = view;
-    }
-
-    /**
-     * Return the view.
-     *
-     * @see #setView
-     */
-    public View getView() {
-        return mNextView;
-    }
-
-    /**
-     * Set how long to show the view for.
-     *
-     * @see #LENGTH_SHORT
-     * @see #LENGTH_LONG
-     */
-    public void setDuration(int duration) {
-        mDuration = duration;
-    }
-
-    /**
-     * Return the duration.
-     *
-     * @see #setDuration
-     */
-    public int getDuration() {
-        return mDuration;
-    }
-
-    /**
-     * Set the margins of the view.
-     *
-     * @param horizontalMargin The horizontal margin, in percentage of the
-     *                         container width, between the container's edges and the
-     *                         notification
-     * @param verticalMargin   The vertical margin, in percentage of the
-     *                         container height, between the container's edges and the
-     *                         notification
-     */
-    public void setMargin(float horizontalMargin, float verticalMargin) {
-        mHorizontalMargin = horizontalMargin;
-        mVerticalMargin = verticalMargin;
-    }
-
-    /**
-     * Return the horizontal margin.
-     */
-    public float getHorizontalMargin() {
-        return mHorizontalMargin;
-    }
-
-    /**
-     * Return the vertical margin.
-     */
-    public float getVerticalMargin() {
-        return mVerticalMargin;
-    }
-
-    /**
-     * Set the location at which the notification should appear on the screen.
-     *
-     * @see android.view.Gravity
-     * @see #getGravity
-     */
-    public void setGravity(int gravity, int xOffset, int yOffset) {
-        mGravity = gravity;
-        mX = xOffset;
-        mY = yOffset;
-    }
-
-    /**
-     * Get the location at which the notification should appear on the screen.
-     *
-     * @see android.view.Gravity
-     * @see #getGravity
-     */
-    public int getGravity() {
-        return mGravity;
-    }
-
-    /**
-     * Return the X offset in pixels to apply to the gravity's location.
-     */
-    public int getXOffset() {
-        return mX;
-    }
-
-    /**
-     * Return the Y offset in pixels to apply to the gravity's location.
-     */
-    public int getYOffset() {
-        return mY;
-    }
-
-    /**
-     * schedule handleShow into the right thread
-     */
-    public void show() {
-        mHandler.post(mShow);
-
-        if (mDuration > 0) {
-            mHandler.postDelayed(mHide, mDuration);
-        }
-    }
-
-    /**
-     * schedule handleHide into the right thread
-     */
-    public void hide() {
-        mHandler.post(mHide);
-    }
-
-    private final Runnable mShow = new Runnable() {
-        public void run() {
-            handleShow();
-        }
-    };
-
-    private final Runnable mHide = new Runnable() {
-        public void run() {
-            handleHide();
-        }
-    };
-
-    private void init(Context context) {
-        final WindowManager.LayoutParams params = mParams;
-        params.height = WindowManager.LayoutParams.WRAP_CONTENT;
-        params.width = WindowManager.LayoutParams.WRAP_CONTENT;
-        params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
-                | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
-        params.format = PixelFormat.TRANSLUCENT;
-        params.windowAnimations = android.R.style.Animation_Toast;
-        params.type = WindowManager.LayoutParams.TYPE_TOAST;
-        params.setTitle("Toast");
-
-        mWM = (WindowManager) context.getApplicationContext()
-                .getSystemService(Context.WINDOW_SERVICE);
-    }
-
-
-    private void handleShow() {
-
-        if (mView != mNextView) {
-            // remove the old view if necessary
-            handleHide();
-            mView = mNextView;
-//            mWM = WindowManagerImpl.getDefault();
-            final int gravity = mGravity;
-            mParams.gravity = gravity;
-            if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) {
-                mParams.horizontalWeight = 1.0f;
-            }
-            if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL) {
-                mParams.verticalWeight = 1.0f;
-            }
-            mParams.x = mX;
-            mParams.y = mY;
-            mParams.verticalMargin = mVerticalMargin;
-            mParams.horizontalMargin = mHorizontalMargin;
-            if (mView.getParent() != null) {
-                mWM.removeView(mView);
-            }
-            mWM.addView(mView, mParams);
-        }
-    }
-
-    private void handleHide() {
-        if (mView != null) {
-            if (mView.getParent() != null) {
-                mWM.removeView(mView);
-            }
-            mView = null;
-        }
-    }
-}

+ 11 - 0
app/src/main/java/com/edufound/reader/util/Consts.java

@@ -2,11 +2,15 @@ package com.edufound.reader.util;
 
 import android.app.Application;
 
+import com.edufound.reader.bean.UserInfoBean;
+
 public class Consts {
     private static Application mApplicAtion;
 
     private static int[] screenSize;
 
+    private static UserInfoBean mConstsUserBean;
+
 
     public static Application getmApplicAtion() {
         return mApplicAtion;
@@ -24,4 +28,11 @@ public class Consts {
         Consts.screenSize = screenSize;
     }
 
+    public static UserInfoBean getmConstsUserBean() {
+        return mConstsUserBean;
+    }
+
+    public static void setmConstsUserBean(UserInfoBean mConstsUserBean) {
+        Consts.mConstsUserBean = mConstsUserBean;
+    }
 }

+ 30 - 10
app/src/main/java/com/edufound/reader/util/EfunboxUtil.java

@@ -2,6 +2,7 @@ package com.edufound.reader.util;
 
 import android.app.Activity;
 import android.app.Application;
+import android.content.Context;
 import android.util.DisplayMetrics;
 
 import com.orhanobut.logger.Logger;
@@ -10,16 +11,35 @@ import io.reactivex.rxjava3.annotations.NonNull;
 
 public class EfunboxUtil {
 
+    /**
+     * 得到宽高缩放比
+     */
+    public static void initDesignSize(Context context) {
+        final DisplayMetrics appDisplayMetrics = context.getResources().getDisplayMetrics();
+        int designWidth = 1280;
+        int designHeight = 720;
+        float ds = 1.0f * designWidth / designHeight;
+        float ts = 1.0f * appDisplayMetrics.widthPixels / appDisplayMetrics.heightPixels;
+        if (ds >= ts) {
+            int targetWidth = appDisplayMetrics.widthPixels;
+            float designScale = 1.0f * targetWidth / designWidth;
+            setDisplay(context, designScale);
+        } else {
+            int targetHeight = appDisplayMetrics.heightPixels;
+            float designScale = 1.0f * targetHeight / designHeight;
+            setDisplay(context, designScale);
+        }
+    }
 
-    public static void setCustomDensity(@NonNull Activity activity, @NonNull Application application) {
-        final DisplayMetrics appDisplayMetrics = application.getResources().getDisplayMetrics();
-        final float targetDensity = appDisplayMetrics.heightPixels / (800 * 1f);
-        final float targetSxaledDensity = targetDensity * (appDisplayMetrics.scaledDensity / appDisplayMetrics.density);
-        final int targetDensityDpi = (int) (160 * targetDensity);
-        appDisplayMetrics.density = appDisplayMetrics.scaledDensity = targetSxaledDensity;
-        appDisplayMetrics.densityDpi = targetDensityDpi;
-        final DisplayMetrics activiyDisplayMetrics = activity.getResources().getDisplayMetrics();
-        activiyDisplayMetrics.density = activiyDisplayMetrics.scaledDensity = targetSxaledDensity;
-        activiyDisplayMetrics.densityDpi = targetDensityDpi;
+    /**
+     * 设置dpi缩放比
+     */
+    public static void setDisplay(Context context, float designScale) {
+        DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
+        displayMetrics.density = designScale;
+        displayMetrics.scaledDensity = displayMetrics.density;
+        displayMetrics.xdpi = displayMetrics.density * 160;
+        displayMetrics.ydpi = displayMetrics.xdpi;
+        displayMetrics.densityDpi = Float.valueOf(displayMetrics.xdpi).intValue();
     }
 }

+ 1 - 1
app/src/main/res/drawable/main_left_tab_divider.xml

@@ -3,6 +3,6 @@
         android:shape="rectangle">
     <size
             android:width="20dp"
-            android:height="30dp" />
+            android:height="25dp" />
     <solid android:color="@android:color/transparent" />
 </shape>

BIN
app/src/main/res/drawable/main_left_tab_layout_character.png


BIN
app/src/main/res/drawable/main_left_tab_layout_character_s.png


BIN
app/src/main/res/drawable/main_left_tab_layout_follow.png


BIN
app/src/main/res/drawable/main_left_tab_layout_follow_s.png


BIN
app/src/main/res/drawable/main_left_tab_layout_recommend.png


BIN
app/src/main/res/drawable/main_left_tab_layout_recommend_s.png


BIN
app/src/main/res/drawable/main_tab_layout_myinfo.png


BIN
app/src/main/res/drawable/main_tab_layout_myinfo_s.png


+ 171 - 0
app/src/main/res/layout/activity_alert_login.xml

@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:app="http://schemas.android.com/apk/res-auto"
+        android:id="@+id/activity_loginalert_rootview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/translucent_background">
+
+
+    <FrameLayout
+            android:id="@+id/frameLayout"
+            android:layout_width="720dp"
+            android:layout_height="560dp"
+            android:layout_gravity="center"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
+
+
+        <FrameLayout
+                android:layout_width="690dp"
+                android:layout_height="515dp"
+                android:layout_gravity="center">
+
+            <ImageView
+                    android:layout_width="690dp"
+                    android:layout_height="515dp"
+                    android:layout_gravity="center"
+                    android:src="@drawable/activity_loginalert_bg"></ImageView>
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent">
+
+                <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="48dp"
+                        android:layout_marginTop="32dp"
+                        android:text="登录注册解锁更多精彩内容"
+                        android:textColor="#333333"
+                        android:textSize="34dp"
+                        android:textStyle="bold"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"></TextView>
+
+                <FrameLayout
+                        android:layout_width="568dp"
+                        android:layout_height="78dp"
+                        android:layout_marginTop="115dp"
+                        android:background="@drawable/activity_loginalert_edit_bg"
+
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent">
+
+                    <EditText
+                            android:id="@+id/activity_loginalert_userphone_edit"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@null"
+                            android:gravity="center|left"
+                            android:hint="输入手机号码"
+                            android:inputType="numberSigned"
+                            android:maxLength="11"
+                            android:paddingLeft="40dp"
+                            android:textColorHint="#333333"
+                            android:textSize="30dp"></EditText>
+                </FrameLayout>
+
+                <LinearLayout
+                        android:layout_width="568dp"
+                        android:layout_height="78dp"
+                        android:layout_marginTop="223dp"
+                        android:background="@drawable/activity_loginalert_edit_bg"
+                        android:orientation="horizontal"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent">
+
+                    <EditText
+                            android:id="@+id/activity_loginalert_getvercode_edit"
+                            android:layout_width="350dp"
+                            android:layout_height="match_parent"
+                            android:background="@null"
+                            android:gravity="center|left"
+                            android:hint="输入验证码"
+                            android:inputType="numberSigned"
+                            android:maxLength="4"
+                            android:paddingLeft="40dp"
+                            android:textColorHint="#333333"
+                            android:textSize="30dp"></EditText>
+
+                    <FrameLayout
+                            android:id="@+id/activity_loginalert_getvercode"
+                            android:layout_width="200dp"
+                            android:layout_height="60dp"
+                            android:layout_gravity="center|right"
+                            android:layout_marginRight="25dp"
+                            android:background="@drawable/activity_loginalert_verificationcode_bg">
+
+                        <TextView
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:gravity="center"
+                                android:text="获取验证码"
+                                android:textColor="@color/white"
+                                android:textSize="30dp"></TextView>
+                    </FrameLayout>
+                </LinearLayout>
+
+                <FrameLayout
+                        android:id="@+id/activity_loginalert_login"
+                        android:layout_width="328dp"
+                        android:layout_height="80dp"
+                        android:layout_marginBottom="90dp"
+                        android:background="@drawable/activity_loginalert_btn_ok_bg"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent">
+
+                    <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:text="登 录"
+                            android:textColor="@color/white"
+                            android:textSize="34dp"></TextView>
+                </FrameLayout>
+
+                <LinearLayout
+                        android:layout_width="500dp"
+                        android:layout_height="23dp"
+                        android:layout_marginBottom="31dp"
+                        android:gravity="center"
+                        android:orientation="horizontal"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent">
+
+                    <androidx.appcompat.widget.AppCompatCheckBox
+                            android:id="@+id/activity_loginalert_checkbox"
+                            android:layout_width="20dp"
+                            android:layout_height="20dp"
+                            android:layout_gravity="center"
+                            android:button="@drawable/activity_loginalert_check_selector"
+                            android:gravity="center"></androidx.appcompat.widget.AppCompatCheckBox>
+
+                    <TextView
+                            android:id="@+id/activity_loginalert_services_text"
+                            android:layout_width="454dp"
+                            android:layout_height="23dp"
+                            android:paddingLeft="5dp"
+                            android:text="点击登录表示您已阅读并同意"
+                            android:textColor="#000000"></TextView>
+                </LinearLayout>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+        </FrameLayout>
+
+        <ImageView
+                android:id="@+id/activity_loginalert_close"
+                android:layout_width="60dp"
+                android:layout_height="60dp"
+                android:layout_gravity="top|right"
+                android:src="@drawable/activity_loginalert_close"></ImageView>
+    </FrameLayout>
+
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 5 - 33
app/src/main/res/layout/activity_crash_dialog.xml

@@ -1,37 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout 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:background="@color/plum">
+        android:background="@color/transparent">
 
-    <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center|top"
-            android:divider="@drawable/main_left_tab_divider"
-            android:gravity="center|top"
-            android:showDividers="middle">
-
-        <Button
-                android:id="@+id/main_initrecord"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="开始录音"
-                android:textSize="40dp"></Button>
-
-        <Button
-                android:id="@+id/main_stoprecord"
-                android:layout_width="200dp"
-                android:layout_height="200dp"
-                android:text="停止录音"
-                android:textSize="40dp"></Button>
-
-
-        <Button
-                android:id="@+id/main_playrecord"
-                android:layout_width="200dp"
-                android:layout_height="200dp"
-                android:text="播放录音"
-                android:textSize="40dp"></Button>
-    </LinearLayout>
-</FrameLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 28 - 22
app/src/main/res/layout/activity_main.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout 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">
 
@@ -8,30 +10,35 @@
             android:id="@+id/background"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:background="@drawable/main_background"></FrameLayout>
+            android:background="@drawable/main_background"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent"></FrameLayout>
 
 
     <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="horizontal">
+            android:layout_width="1280dp"
+            android:layout_height="720dp"
+            android:orientation="horizontal"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintDimensionRatio="h,16:9"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
 
         <FrameLayout
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
-                android:layout_weight="1.1">
+                android:layout_gravity="left"
+                android:layout_weight="1.5">
 
-            <ImageView
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:layout_gravity="left|center"
-                    android:src="@drawable/main_left_tab_bg"></ImageView>
 
             <RadioGroup
                     android:id="@+id/main_left_tab_layout"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_gravity="left"
+                    android:layout_gravity="right"
                     android:divider="@drawable/main_left_tab_divider"
                     android:gravity="center"
                     android:orientation="vertical"
@@ -39,30 +46,29 @@
 
                 <RadioButton
                         android:id="@+id/main_left_tab_layout_myinfo"
-                        android:layout_width="140dp"
-                        android:layout_height="140dp"
+                        android:layout_width="146dp"
+                        android:layout_height="146dp"
                         android:background="@drawable/main_left_tab_myinfo_selector"
                         android:button="@null"></RadioButton>
 
                 <RadioButton
                         android:id="@+id/main_left_tab_layout_recommend"
-                        android:layout_width="140dp"
-                        android:layout_height="140dp"
+                        android:layout_width="146dp"
+                        android:layout_height="146dp"
                         android:background="@drawable/main_left_tab_recommend_selector"
-
                         android:button="@null"></RadioButton>
 
                 <RadioButton
                         android:id="@+id/main_left_tab_layout_follow"
-                        android:layout_width="140dp"
-                        android:layout_height="140dp"
+                        android:layout_width="146dp"
+                        android:layout_height="146dp"
                         android:background="@drawable/main_left_tab_follow_selector"
                         android:button="@null"></RadioButton>
 
                 <RadioButton
                         android:id="@+id/main_left_tab_layout_character"
-                        android:layout_width="140dp"
-                        android:layout_height="140dp"
+                        android:layout_width="146dp"
+                        android:layout_height="146dp"
                         android:background="@drawable/main_left_tab_character_selector"
                         android:button="@null"></RadioButton>
 
@@ -84,4 +90,4 @@
         </FrameLayout>
     </LinearLayout>
 
-</FrameLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 206 - 0
app/src/main/res/layout/adapter_item_record.xml

@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.edufound.reader.cusview.RoundFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="415dp"
+        android:layout_height="290dp"
+        android:layout_gravity="center"
+        android:background="@color/white">
+
+    <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:paddingLeft="12dp"
+            android:paddingTop="12dp"
+            android:paddingRight="12dp"
+            android:paddingBottom="24dp">
+
+        <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical">
+
+            <ImageView
+                    android:id="@+id/adapter_item_record_icon"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="3"
+                    android:scaleType="fitXY"></ImageView>
+
+            <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1">
+
+                <TextView
+                        android:id="@+id/adapter_item_record_name"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1.3"
+                        android:gravity="center|left"
+                        android:text="火车的故事"
+                        android:textColor="#373737"
+                        android:textSize="27dp"
+                        android:textStyle="bold"></TextView>
+
+                <ImageView
+                        android:id="@+id/adapter_item_record_del"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:scaleType="center"
+                        android:src="@drawable/adapter_item_record_del"></ImageView>
+
+                <ImageView
+                        android:id="@+id/adapter_item_record_priv"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:scaleType="center"
+                        android:src="@drawable/adapter_item_record_pri"></ImageView>
+
+                <Space
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="0.05"></Space>
+            </LinearLayout>
+
+            <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_gravity="center"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="horizontal">
+
+                <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="horizontal">
+
+                    <ImageView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_weight="1"
+                            android:scaleType="center"
+                            android:src="@drawable/adapter_item_record_look"></ImageView>
+
+                    <TextView
+                            android:id="@+id/adapter_item_record_look_num"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center|left"
+                            android:layout_weight="2"
+                            android:gravity="center|left"
+                            android:text="1234"
+                            android:textColor="#96A3B4"
+                            android:textSize="22dp"></TextView>
+                </LinearLayout>
+
+                <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="horizontal">
+
+                    <ImageView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_weight="1"
+                            android:scaleType="center"
+                            android:src="@drawable/adapter_item_record_thumb"></ImageView>
+
+                    <TextView
+                            android:id="@+id/adapter_item_record_thumb_num"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center|left"
+                            android:layout_weight="2"
+                            android:gravity="center|left"
+                            android:text="1234"
+                            android:textColor="#96A3B4"
+                            android:textSize="22dp"></TextView>
+                </LinearLayout>
+
+                <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="horizontal">
+
+                    <ImageView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_weight="1"
+                            android:scaleType="center"
+                            android:src="@drawable/adapter_item_record_comment"></ImageView>
+
+                    <TextView
+                            android:id="@+id/adapter_item_record_comment_num"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center|left"
+                            android:layout_weight="2"
+                            android:gravity="center|left"
+                            android:text="1234"
+                            android:textColor="#96A3B4"
+                            android:textSize="22dp"></TextView>
+                </LinearLayout>
+
+
+                <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="horizontal">
+
+                    <ImageView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_weight="1"
+                            android:scaleType="center"
+                            android:src="@drawable/adapter_item_record_start"></ImageView>
+
+                    <TextView
+                            android:id="@+id/adapter_item_record_start_num"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center|left"
+                            android:layout_weight="2"
+                            android:gravity="center|left"
+                            android:text="1234"
+                            android:textColor="#96A3B4"
+                            android:textSize="22dp"></TextView>
+                </LinearLayout>
+
+            </LinearLayout>
+        </LinearLayout>
+
+    </FrameLayout>
+
+
+    <FrameLayout
+            android:id="@+id/adapter_item_record_examine_layout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="center"
+            android:clickable="false">
+
+        <FrameLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:alpha="0.4"
+                android:background="@color/black"
+                android:clickable="false"></FrameLayout>
+
+        <ImageView
+                android:layout_width="110dp"
+                android:layout_height="110dp"
+                android:layout_gravity="center"
+                android:src="@drawable/adapter_item_record_examine"></ImageView>
+    </FrameLayout>
+
+</com.edufound.reader.cusview.RoundFrameLayout>

+ 35 - 0
app/src/main/res/layout/adapter_item_slidevideo.xml

@@ -3,8 +3,43 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent">
 
+
     <com.edufound.reader.cusview.RvListJzvdStd
             android:id="@+id/slidevideo_video"
             android:layout_width="match_parent"
             android:layout_height="match_parent"></com.edufound.reader.cusview.RvListJzvdStd>
+
+    <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:layout_marginLeft="40dp"
+            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"
+                android:layout_gravity="center"
+                android:layout_weight="10"
+                android:orientation="horizontal">
+
+        </com.edufound.reader.cusview.AutoPollRecyclerView>
+
+        <Switch
+                android:id="@+id/slidevideo_video_switch"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_gravity="center"
+                android:layout_weight="2"
+                android:checked="false"
+                android:gravity="center"
+                android:switchMinWidth="40dp"
+                android:switchPadding="15dp"
+                android:text="弹幕"
+                android:textColor="@color/black"
+                android:textSize="25dp"
+                android:thumb="@drawable/seekbar_thumb"
+                android:track="@drawable/slidevideo_switch_track_selector" />
+    </LinearLayout>
 </FrameLayout>

+ 89 - 0
app/src/main/res/layout/fragment_main_character.xml

@@ -0,0 +1,89 @@
+<?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="30dp"
+        android:paddingTop="30dp">
+
+
+    <HorizontalScrollView
+            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">
+
+                <LinearLayout
+                        android:layout_width="376dp"
+                        android:layout_height="match_parent"
+                        android:divider="@drawable/fragment_user_info_divider"
+                        android:orientation="vertical"
+                        android:showDividers="middle">
+
+                    <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:gravity="center|left"
+                            android:text="个人信息"
+                            android:textColor="@color/white"
+                            android:textSize="26dp"
+                            android:visibility="invisible"></TextView>
+
+
+                    <ImageView
+                            android:id="@+id/fragment_main_character_img"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_marginBottom="35dp"
+                            android:background="@color/yellow"></ImageView>
+
+                </LinearLayout>
+            </FrameLayout>
+
+
+            <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:divider="@drawable/fragment_user_info_divider"
+                    android:orientation="vertical"
+                    android:paddingLeft="50dp"
+                    android:showDividers="middle">
+
+                <TextView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center|left"
+                        android:paddingLeft="10dp"
+                        android:text="我的作品:123"
+                        android:textColor="@color/white"
+                        android:textSize="26dp"></TextView>
+
+
+                <GridLayout
+                        android:id="@+id/fragment_my_recyclerview"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:orientation="vertical"></GridLayout>
+            </LinearLayout>
+
+            <Space
+                    android:layout_width="50dp"
+                    android:layout_height="match_parent"></Space>
+        </LinearLayout>
+    </HorizontalScrollView>
+
+
+</FrameLayout>

+ 0 - 0
app/src/main/res/layout/fragment_main_user.xml


Some files were not shown because too many files changed in this diff