Browse Source

增加学生端新首页UI

Pq 2 years ago
parent
commit
b1a566cb1a
31 changed files with 1370 additions and 486 deletions
  1. 6 4
      student/src/main/java/com/cooleshow/student/adapter/HomeHotAlbumAdapter.java
  2. 51 0
      student/src/main/java/com/cooleshow/student/adapter/HomeHotMusicSheetAdapter.java
  3. 14 2
      student/src/main/java/com/cooleshow/student/api/APIService.java
  4. 123 0
      student/src/main/java/com/cooleshow/student/bean/HomeHotMusicSheetBean.java
  5. 10 0
      student/src/main/java/com/cooleshow/student/bean/HomeHotMusicSheetItemBean.java
  6. 1 0
      student/src/main/java/com/cooleshow/student/bean/HotAlbumBean.java
  7. 3 0
      student/src/main/java/com/cooleshow/student/contract/HomeContract.java
  8. 25 0
      student/src/main/java/com/cooleshow/student/presenter/main/HomePresenter.java
  9. 2 2
      student/src/main/java/com/cooleshow/student/ui/course/SparringCourseDetailActivity.java
  10. 6 0
      student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java
  11. 2 1
      student/src/main/java/com/cooleshow/student/ui/main/MainActivity.java
  12. 329 7
      student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragment.java
  13. 9 1
      student/src/main/java/com/cooleshow/student/ui/web/AccompanyActivity.java
  14. 1 2
      student/src/main/java/com/cooleshow/student/widgets/HomeHotAlbumDecoration.java
  15. 34 0
      student/src/main/java/com/cooleshow/student/widgets/HomeHotMusicSheetItemDecoration.java
  16. 141 0
      student/src/main/java/com/cooleshow/student/widgets/HomeHotMusicSheetItemView.java
  17. BIN
      student/src/main/res/drawable-xhdpi/icon_hot_album_collect_num_tag2.png
  18. BIN
      student/src/main/res/drawable-xhdpi/icon_music_sheet_play.png
  19. BIN
      student/src/main/res/drawable-xxhdpi/icon_hot_album_collect_num_tag2.png
  20. BIN
      student/src/main/res/drawable-xxhdpi/icon_music_sheet_play.png
  21. 7 0
      student/src/main/res/drawable/shape_01b84f_border.xml
  22. 7 0
      student/src/main/res/drawable/shape_3591ce_border.xml
  23. 7 0
      student/src/main/res/drawable/shape_cd863e_border.xml
  24. 476 467
      student/src/main/res/layout/fragment_new_home_layout.xml
  25. 9 0
      student/src/main/res/layout/item_home_hot_music_sheet_layout.xml
  26. 1 0
      student/src/main/res/layout/layout_home_hot_album_item.xml
  27. 100 0
      student/src/main/res/layout/view_hot_music_sheet_child_layout.xml
  28. 0 0
      student/src/main/res/raw/home_live_course_enter.json
  29. 0 0
      student/src/main/res/raw/home_piano_course_enter.json
  30. 0 0
      student/src/main/res/raw/home_sparring_course_enter.json
  31. 6 0
      teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragment.java

+ 6 - 4
student/src/main/java/com/cooleshow/student/adapter/HomeHotAlbumAdapter.java

@@ -25,10 +25,12 @@ public class HomeHotAlbumAdapter extends BaseQuickAdapter<HotAlbumBean.RowsBean,
 
     @Override
     protected void convert(BaseViewHolder helper, HotAlbumBean.RowsBean item) {
-        ImageView im_pic=helper.getView(R.id.im_pic);
-        GlideUtils.INSTANCE.loadImage(getContext(),item.albumCoverUrl,im_pic);
-        TextView tv_collect_num=helper.getView(R.id.tv_collect_num);
+        ImageView im_pic = helper.getView(R.id.im_pic);
+        ImageView iv_icon = helper.getView(R.id.iv_icon);
+        iv_icon.setImageResource(item.favorite == 1 ? R.drawable.icon_hot_album_collect_num_tag2 : R.drawable.icon_hot_album_collect_num_tag);
+        GlideUtils.INSTANCE.loadImage(getContext(), item.albumCoverUrl, im_pic);
+        TextView tv_collect_num = helper.getView(R.id.tv_collect_num);
         tv_collect_num.setText(String.format("%d人", item.albumFavoriteCount));
-        helper.setText(R.id.album_name,item.albumName);
+        helper.setText(R.id.album_name, item.albumName);
     }
 }

+ 51 - 0
student/src/main/java/com/cooleshow/student/adapter/HomeHotMusicSheetAdapter.java

@@ -0,0 +1,51 @@
+package com.cooleshow.student.adapter;
+
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.utils.ScreenUtils;
+import com.cooleshow.student.R;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetItemBean;
+import com.cooleshow.student.ui.main.NewHomeFragment;
+import com.cooleshow.student.widgets.HomeHotMusicSheetItemView;
+
+import androidx.annotation.NonNull;
+
+/**
+ * Author by pq, Date on 2022/8/8.
+ */
+public class HomeHotMusicSheetAdapter extends BaseQuickAdapter<HomeHotMusicSheetItemBean, BaseViewHolder> {
+    private int maxWidth = 0;
+
+    public HomeHotMusicSheetAdapter() {
+        super(R.layout.item_home_hot_music_sheet_layout);
+        int screenWidth = ScreenUtils.getScreenWidth();
+        maxWidth = (int) (screenWidth * 0.83);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder holder, HomeHotMusicSheetItemBean homeHotMusicSheetItemBean) {
+        LinearLayout ll_container = holder.getView(R.id.ll_container);
+        ViewGroup.LayoutParams layoutParams = ll_container.getLayoutParams();
+        layoutParams.width = maxWidth;
+        ll_container.setLayoutParams(layoutParams);
+        ll_container.removeAllViews();
+        if (homeHotMusicSheetItemBean.sheetBeans != null && homeHotMusicSheetItemBean.sheetBeans.size() > 0) {
+            for (int i = 0; i < homeHotMusicSheetItemBean.sheetBeans.size(); i++) {
+                HomeHotMusicSheetBean.RowsBean homeHotMusicSheetBean = homeHotMusicSheetItemBean.sheetBeans.get(i);
+                HomeHotMusicSheetItemView hotMusicSheetItemView = new HomeHotMusicSheetItemView(getContext());
+                hotMusicSheetItemView.setData(homeHotMusicSheetBean);
+                int result = i % (NewHomeFragment.MAX_HOT_MUSIC_LIST_PAGE - 1);
+                if (i == homeHotMusicSheetItemBean.sheetBeans.size() - 1 && result == 0) {
+                    hotMusicSheetItemView.setDividingLineIsShow(false);
+                } else {
+                    hotMusicSheetItemView.setDividingLineIsShow(true);
+                }
+                ll_container.addView(hotMusicSheetItemView);
+            }
+        }
+    }
+}

+ 14 - 2
student/src/main/java/com/cooleshow/student/api/APIService.java

@@ -14,6 +14,7 @@ import com.cooleshow.student.bean.CountOfUnreadBean;
 import com.cooleshow.student.bean.CourseTableDataBean;
 import com.cooleshow.student.bean.FriendInfoBean;
 import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
 import com.cooleshow.student.bean.HomeLiveAndVideoBean;
 import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HomeworkDetailBean;
@@ -373,6 +374,7 @@ public interface APIService {
      *
      * @param
      * @return
+     * 学生端未用到此接口
      */
     @POST(TEACHER_GROUP + "homework/review")
     Observable<BaseResponse<Object>> submitSparringCourseHomeworkComment(@Body RequestBody body);
@@ -439,7 +441,7 @@ public interface APIService {
     /**
      * 意见反馈
      *
-     * @param body
+     * @param params
      * @return
      */
     @FormUrlEncoded
@@ -473,6 +475,16 @@ public interface APIService {
      * @return
      */
     @FormUrlEncoded
-    @POST(TEACHER_GROUP + "code/verifyImageCode")
+    @POST(STUDENT_GROUP + "code/verifyImageCode")
     Observable<BaseResponse<Object>> verifyImgCode(@FieldMap Map<String, String> map);
+
+
+    /**
+     * app首页热门专辑
+     *
+     * @return
+     */
+    @POST(STUDENT_GROUP + "music/sheet/list")
+    Observable<BaseResponse<HomeHotMusicSheetBean>> getHotMusicSheetList(@Body RequestBody body);
+
 }

+ 123 - 0
student/src/main/java/com/cooleshow/student/bean/HomeHotMusicSheetBean.java

@@ -0,0 +1,123 @@
+package com.cooleshow.student.bean;
+
+import java.util.List;
+
+/**
+ * Author by pq, Date on 2022/8/8.
+ */
+public class HomeHotMusicSheetBean {
+
+    /**
+     * footer : [{"addName":"","addUserAvatar":"","audioFileUrl":"","audioType":"","auditStatus":"","auditVersion":"","canEvaluate":"","chargeType":"","composer":"","createBy":0,"createTime":"","delFlag":true,"extConfigJson":"","favorite":"","favoriteCount":0,"hasBeat":"","hotFlag":"","id":0,"metronomeUrl":"","midiUrl":"","mp3Type":"","musicPrice":0,"musicSheetName":"","musicSubject":"","musicTag":"","musicTagNames":"","notation":"","play":"","playSpeed":0,"reason":"","remark":"","showFingering":"","sortNumber":0,"sourceType":"","state":"","subjectNames":"","submitAuditTime":"","topFlag":"","updateBy":0,"updateTime":"","url":"","userId":0,"xmlFileUrl":""}]
+     * limit : 0
+     * nextPage : 0
+     * offset : 0
+     * pageNo : 0
+     * prePage : 0
+     * rows : [{"addName":"","addUserAvatar":"","audioFileUrl":"","audioType":"","auditStatus":"","auditVersion":"","canEvaluate":"","chargeType":"","composer":"","createBy":0,"createTime":"","delFlag":true,"extConfigJson":"","favorite":"","favoriteCount":0,"hasBeat":"","hotFlag":"","id":0,"metronomeUrl":"","midiUrl":"","mp3Type":"","musicPrice":0,"musicSheetName":"","musicSubject":"","musicTag":"","musicTagNames":"","notation":"","play":"","playSpeed":0,"reason":"","remark":"","showFingering":"","sortNumber":0,"sourceType":"","state":"","subjectNames":"","submitAuditTime":"","topFlag":"","updateBy":0,"updateTime":"","url":"","userId":0,"xmlFileUrl":""}]
+     * statInfo : {}
+     * total : 0
+     * totalPage : 0
+     */
+
+    public int limit;
+    public int nextPage;
+    public int offset;
+    public int pageNo;
+    public int prePage;
+    public int total;
+    public int totalPage;
+    public List<RowsBean> rows;
+
+    public static class RowsBean {
+        /**
+         * addName :
+         * addUserAvatar :
+         * audioFileUrl :
+         * audioType :
+         * auditStatus :
+         * auditVersion :
+         * canEvaluate :
+         * chargeType :
+         * composer :
+         * createBy : 0
+         * createTime :
+         * delFlag : true
+         * extConfigJson :
+         * favorite :
+         * favoriteCount : 0
+         * hasBeat :
+         * hotFlag :
+         * id : 0
+         * metronomeUrl :
+         * midiUrl :
+         * mp3Type :
+         * musicPrice : 0
+         * musicSheetName :
+         * musicSubject :
+         * musicTag :
+         * musicTagNames :
+         * notation :
+         * play :
+         * playSpeed : 0
+         * reason :
+         * remark :
+         * showFingering :
+         * sortNumber : 0
+         * sourceType :
+         * state :
+         * subjectNames :
+         * submitAuditTime :
+         * topFlag :
+         * updateBy : 0
+         * updateTime :
+         * url :
+         * userId : 0
+         * xmlFileUrl :
+         */
+
+        public String addName;
+        public String addUserAvatar;
+        public String audioFileUrl;
+        public String audioType;
+        public String auditStatus;
+        public String auditVersion;
+        public String canEvaluate;
+        public String chargeType;
+        public String composer;
+        public int createBy;
+        public String createTime;
+        public boolean delFlag;
+        public String extConfigJson;
+        public String favorite;
+        public int favoriteCount;
+        public String hasBeat;
+        public String hotFlag;
+        public int id;
+        public String metronomeUrl;
+        public String midiUrl;
+        public String mp3Type;
+        public String musicPrice;
+        public String musicSheetName;
+        public String musicSubject;
+        public String musicTag;
+        public String musicTagNames;
+        public String notation;
+        public String play;
+        public int playSpeed;
+        public String reason;
+        public String remark;
+        public String showFingering;
+        public int sortNumber;
+        public String sourceType;
+        public String state;
+        public String subjectNames;
+        public String submitAuditTime;
+        public String topFlag;
+        public int updateBy;
+        public String updateTime;
+        public String url;
+        public int userId;
+        public String xmlFileUrl;
+    }
+}

+ 10 - 0
student/src/main/java/com/cooleshow/student/bean/HomeHotMusicSheetItemBean.java

@@ -0,0 +1,10 @@
+package com.cooleshow.student.bean;
+
+import java.util.ArrayList;
+
+/**
+ * Author by pq, Date on 2022/8/8.
+ */
+public class HomeHotMusicSheetItemBean {
+    public ArrayList<HomeHotMusicSheetBean.RowsBean> sheetBeans =new ArrayList<>();
+}

+ 1 - 0
student/src/main/java/com/cooleshow/student/bean/HotAlbumBean.java

@@ -54,6 +54,7 @@ public class HotAlbumBean {
         public int musicSheetCount;
         public String musicTagNames;
         public int sortNumber;
+        public int favorite;
         public String topFlag;
         public long updateBy;
         public String updateTime;

+ 3 - 0
student/src/main/java/com/cooleshow/student/contract/HomeContract.java

@@ -4,6 +4,7 @@ import com.cooleshow.base.presenter.view.BaseView;
 import com.cooleshow.student.bean.AppHomeBean;
 import com.cooleshow.student.bean.CountOfUnreadBean;
 import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
 import com.cooleshow.student.bean.HomeLiveAndVideoBean;
 import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HotAlbumBean;
@@ -33,6 +34,8 @@ public interface HomeContract {
         void helpCenterContentListSuccess(HelpCenterContentBean bean);
 
         void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data);
+
+        void getHotMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean);
     }
 
     interface Presenter {

+ 25 - 0
student/src/main/java/com/cooleshow/student/presenter/main/HomePresenter.java

@@ -8,6 +8,7 @@ import com.cooleshow.student.api.APIService;
 import com.cooleshow.student.bean.AppHomeBean;
 import com.cooleshow.student.bean.CountOfUnreadBean;
 import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
 import com.cooleshow.student.bean.HomeLiveAndVideoBean;
 import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HotAlbumBean;
@@ -213,4 +214,28 @@ public class HomePresenter extends BasePresenter<HomeContract.HomeView> implemen
             }
         });
     }
+
+
+    /**
+     * 获取热门曲目
+     */
+    public void getHotMusicSheetList(){
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("myself", false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).getHotMusicSheetList(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<HomeHotMusicSheetBean>(getView()) {
+            @Override
+            protected void onSuccess(HomeHotMusicSheetBean data) {
+                if (null != getView()) {
+                    getView().getHotMusicSheetListSuccess(data);
+                }
+            }
+        });
+    }
 }

+ 2 - 2
student/src/main/java/com/cooleshow/student/ui/course/SparringCourseDetailActivity.java

@@ -302,12 +302,12 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
     public void onClick(View v) {
         if (v.getId() == R.id.tv_set_homework) {
             //布置作业
-            showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_HOMEWORK);
+//            showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_HOMEWORK);
             return;
         }
         if (v.getId() == R.id.tv_homework_set_comment) {
             //点评作业
-            showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_HOMEWORK_COMMENT);
+//            showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_HOMEWORK_COMMENT);
             return;
         }
 

+ 6 - 0
student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java

@@ -44,6 +44,7 @@ import com.cooleshow.student.adapter.HomeWonderfulInfoAdapter;
 import com.cooleshow.student.bean.AppHomeBean;
 import com.cooleshow.student.bean.CountOfUnreadBean;
 import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
 import com.cooleshow.student.bean.HomeLiveAndVideoBean;
 import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HotAlbumBean;
@@ -617,4 +618,9 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
             mViewBinding.viewUnreadMessage.setVisibility(View.GONE);
         }
     }
+
+    @Override
+    public void getHotMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean) {
+
+    }
 }

+ 2 - 1
student/src/main/java/com/cooleshow/student/ui/main/MainActivity.java

@@ -158,11 +158,12 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
 
         HomePageAdapter homePageAdapter = new HomePageAdapter(this);
         mHomeFragment = new HomeFragment();
+        NewHomeFragment newHomeFragment =new NewHomeFragment();
         CourseTableFragment courseTableFragment = new CourseTableFragment();
         MessageFragment messageFragment = new MessageFragment();
         shopMallFragment = new MallFragment();
         mMineFragment = new MineFragment();
-        mFragments.add(mHomeFragment);
+        mFragments.add(newHomeFragment);
         mFragments.add(courseTableFragment);
         mFragments.add(messageFragment);
         mFragments.add(shopMallFragment);

+ 329 - 7
student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragment.java

@@ -2,40 +2,70 @@ package com.cooleshow.student.ui.main;
 
 import android.text.TextUtils;
 import android.view.View;
+import android.widget.ImageView;
 
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.bumptech.glide.Glide;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.SizeUtils;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.utils.Utils;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.HomeHotAlbumAdapter;
+import com.cooleshow.student.adapter.HomeHotMusicSheetAdapter;
+import com.cooleshow.student.adapter.HomeMenuPagerAdapter;
 import com.cooleshow.student.bean.AppHomeBean;
 import com.cooleshow.student.bean.CountOfUnreadBean;
 import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetItemBean;
 import com.cooleshow.student.bean.HomeLiveAndVideoBean;
 import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HotAlbumBean;
 import com.cooleshow.student.bean.StudentUserInfo;
+import com.cooleshow.student.constants.CourseConstants;
 import com.cooleshow.student.contract.HomeContract;
 import com.cooleshow.student.databinding.FragmentNewHomeLayoutBinding;
 import com.cooleshow.student.presenter.main.HomePresenter;
+import com.cooleshow.student.widgets.HomeHotAlbumDecoration;
+import com.cooleshow.student.widgets.HomeHotMusicSheetItemDecoration;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import com.youth.banner.Banner;
 import com.youth.banner.adapter.BannerImageAdapter;
 import com.youth.banner.holder.BannerImageHolder;
 import com.youth.banner.listener.OnBannerListener;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 import androidx.core.widget.NestedScrollView;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.viewpager.widget.ViewPager;
+
+import static com.cooleshow.student.constants.CourseConstants.LIVE_COURSE;
+import static com.cooleshow.student.constants.CourseConstants.OTHER_COURSE;
+import static com.cooleshow.student.constants.CourseConstants.PIANO_ROOM_COURSE;
 
 /**
  * Author by pq, Date on 2022/8/29.
  */
-public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBinding, HomePresenter> implements HomeContract.HomeView {
+public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener {
+    public static final int MAX_HOT_MUSIC_LIST_PAGE = 3;//热门曲目一页最大条数
     private Banner banner;
+    private SmartRefreshLayout refreshLayout;
     private ArrayList<AppHomeBean.ItemBean> itemBeans = new ArrayList<>();
     private BannerImageAdapter mBannerImageAdapter;
+    private HomeLiveAndVideoBean.RecentCoursesBean mRecentCourses;
+    private List<Fragment> fragments = new ArrayList<>();
+    private HomeMenuPagerAdapter mMenuPagerAdapter;
+    private String noticeId;
+    private HomeHotAlbumAdapter mAlbumAdapter;
+    private HomeHotMusicSheetAdapter mHomeHotMusicSheetAdapter;
 
     @Override
     protected FragmentNewHomeLayoutBinding getLayoutView() {
@@ -49,12 +79,39 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
 
     @Override
     protected void initView(View rootView) {
+        Utils.setHeadView(mViewBinding.viewStatusBar, requireContext(), 0);
         banner = mViewBinding.banner;
+        refreshLayout = mViewBinding.refreshLayout;
+        mViewBinding.bgAnnouncement.setOnClickListener(this);
+        mViewBinding.bgAnnouncement2.setOnClickListener(this);
+        mViewBinding.ivScan.setOnClickListener(this);
+        mViewBinding.imMessage.setOnClickListener(this);
+        mViewBinding.flCourseEnter.setOnClickListener(this);
     }
 
     @Override
     protected void initData() {
-        initListener();
+        LinearLayoutManager manager = new LinearLayoutManager(getContext());
+        manager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mViewBinding.rvHotAlbum.setLayoutManager(manager);
+        mAlbumAdapter = new HomeHotAlbumAdapter();
+        HomeHotAlbumDecoration hotAlbumItemDecoration = new HomeHotAlbumDecoration(0, 0, 0, SizeUtils.dp2px(14), 0);
+        mViewBinding.rvHotAlbum.addItemDecoration(hotAlbumItemDecoration);
+        mViewBinding.rvHotAlbum.setAdapter(mAlbumAdapter);
+
+
+        LinearLayoutManager musicSheetManager = new LinearLayoutManager(getContext());
+        musicSheetManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mHomeHotMusicSheetAdapter = new HomeHotMusicSheetAdapter();
+        HomeHotMusicSheetItemDecoration itemDecoration = new HomeHotMusicSheetItemDecoration(0, SizeUtils.dp2px(12), 0, SizeUtils.dp2px(12), 0);
+        mViewBinding.rvHotTrack.addItemDecoration(itemDecoration);
+        mViewBinding.rvHotTrack.setLayoutManager(musicSheetManager);
+        mViewBinding.rvHotTrack.setAdapter(mHomeHotMusicSheetAdapter);
+        mViewBinding.rvHotTrack.setNestedScrollingEnabled(false);
+        mViewBinding.rvHotAlbum.setNestedScrollingEnabled(false);
+
+        mMenuPagerAdapter = new HomeMenuPagerAdapter(getParentFragmentManager(), fragments);
+        mViewBinding.viewpagerMenu.setAdapter(mMenuPagerAdapter);
         mBannerImageAdapter = new BannerImageAdapter<AppHomeBean.ItemBean>(itemBeans) {
             @Override
             public void onBindView(BannerImageHolder holder, AppHomeBean.ItemBean data, int position, int size) {
@@ -83,9 +140,60 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
                         }
                     }
                 });
+        initListener();
+        //获取热门专辑
+        presenter.userAccountPage();
+        //获取热门曲目
+        presenter.getHotMusicSheetList();
     }
 
     private void initListener() {
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            refreshLayout.finishRefresh();
+            presenter.queryCountOfUnread();
+            presenter.queryLiveAndVideo();
+            presenter.appHome();
+            presenter.userAccountPage();
+            presenter.getHotMusicSheetList();
+        });
+
+        mAlbumAdapter.setOnItemClickListener((adapter, view, position) -> {
+            HotAlbumBean.RowsBean item = (HotAlbumBean.RowsBean) adapter.getItem(position);
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.STUDENT_MUSIC_ALBUM_DETAIL + item.id)
+                    .navigation();
+        });
+
+
+        mViewBinding.viewpagerMenu.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+                position = position % fragments.size();// 需要对position的值进行重新赋值,否则会造成数组越界
+                // 更新小圆点的显示
+//                for (int i = 0; i < fragments.size(); i++) {
+//                    ImageView iv = (ImageView) llIndicator.getChildAt(i);
+//                    // 当前滑到的是那一页就让第几个小圆点处于选中状态
+//                    if (position == i) {
+//                        iv.setImageResource(R.drawable.bg_2dc7aa_indicator);
+//                    } else {
+//                        iv.setImageResource(R.drawable.bg_f2f2f2_indicator);
+//                    }
+//                }
+            }
+
+            @Override
+            public void onPageSelected(int position) {
+
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int state) {
+
+            }
+        });
+
+
         mViewBinding.scrollLayout.setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
             boolean localVisibleRect = UiUtils.getLocalVisibleRect(getActivity(), banner, 10);
             //banner可见的时候就自动循环,否则就停止,解决问题:在scrollview到最底部时候,由于banner自动到第一个时候就往上顶一段距离
@@ -102,8 +210,26 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
     }
 
     @Override
+    public void onResume() {
+        super.onResume();
+        if (presenter != null) {
+            presenter.appHome();
+            presenter.queryLiveAndVideo();
+        }
+    }
+
+    @Override
     public void appHomeSuccess(AppHomeBean appHomeBean) {
+        if (isDetached()) {
+            return;
+        }
+        if (refreshLayout != null) {
+            refreshLayout.finishRefresh();
+        }
+        //banner
         bindBanner(appHomeBean.banner);
+        //后台配置menu
+        initMenu(appHomeBean.appMenu);
     }
 
     /**
@@ -126,13 +252,97 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
         }
     }
 
-    @Override
-    public void hotAlbumListSuccess(HotAlbumBean data) {
+    private void initMenu(List<AppHomeBean.ItemBean> menuList) {
+        if (mMenuPagerAdapter == null || mViewBinding.viewpagerMenu == null) {
+            return;
+        }
+        fragments.clear();
+        int count = menuList.size() / 5;
+        if (menuList.size() % 5 > 0) {
+            count++;
+        }
+
+        for (int i = 0; i < count; i++) {
+            List<AppHomeBean.ItemBean> dataList = new ArrayList<>();
+            for (int j = i * 5; j < menuList.size() && j < (i + 1) * 5; j++) {
+                dataList.add(menuList.get(j));
+            }
+            fragments.add(HomeMenuFragment.newInstance(dataList));
+        }
+        if (fragments.size() == 0) {
+            mViewBinding.viewpagerMenu.setVisibility(View.GONE);
+            return;
+        }
+
+        mViewBinding.viewpagerMenu.setVisibility(View.VISIBLE);
+        mMenuPagerAdapter.notifyDataSetChanged();
+    }
 
+    @Override
+    public void hotAlbumListSuccess(HotAlbumBean homeHotAlbumListBean) {
+        if (isDetached() || homeHotAlbumListBean == null || homeHotAlbumListBean.rows == null) {
+            return;
+        }
+        if (mAlbumAdapter != null) {
+            mAlbumAdapter.setNewInstance(homeHotAlbumListBean.rows);
+        }
     }
 
     @Override
-    public void queryLiveAndVideoSuccess(HomeLiveAndVideoBean data) {
+    public void queryLiveAndVideoSuccess(HomeLiveAndVideoBean bean) {
+        //是否有进入课程
+        if (bean == null) {
+            return;
+        }
+        this.mRecentCourses = bean.recentCourses;
+        presenter.helpCenterContentList();
+        mViewBinding.ivCourseEnterAnim.clearAnimation();
+        mViewBinding.flCourseEnter.setVisibility(mRecentCourses != null ? View.VISIBLE : View.GONE);
+        handleEnterAnim();
+        if (mRecentCourses != null) {
+            String currentTime = TimeUtils.date2String(new Date(System.currentTimeMillis()), "yyyy-MM-dd");
+            String startTime = TimeUtils.date2String(
+                    TimeUtils.getDate(mRecentCourses.courseStartTime),
+                    "yyyy-MM-dd"
+            );
+            if (TextUtils.equals(currentTime, startTime)) {
+                String timeText =
+                        TimeUtils.date2String(TimeUtils.getDate(mRecentCourses.courseStartTime), "HH:mm");
+                mViewBinding.tvLiveTime.setText(String.format("今日 %s", timeText));
+            } else {
+                mViewBinding.tvLiveTime.setText(TimeUtils.date2String(
+                        TimeUtils.getDate(mRecentCourses.courseStartTime),
+                        "yyyy-MM-dd HH:mm"
+                ));
+            }
+        }
+    }
+
+    private void handleEnterAnim() {
+        if (mRecentCourses == null) {
+            mViewBinding.ivCourseEnterAnim.setVisibility(View.GONE);
+            return;
+        }
+        mViewBinding.ivCourseEnterAnim.setVisibility(View.VISIBLE);
+        String assetFolder = "lottie/home/sparring_course/images/";
+        int rawRes = R.raw.home_sparring_course_enter;
+        if (TextUtils.equals(mRecentCourses.courseType, CourseConstants.LIVE_COURSE)) {
+            assetFolder = "lottie/home/live_course/images/";
+            rawRes = R.raw.home_live_course_enter;
+        }
+        if (TextUtils.equals(mRecentCourses.courseType, CourseConstants.OTHER_COURSE)) {
+            //陪练课
+            assetFolder = "lottie/home/sparring_course/images/";
+            rawRes = R.raw.home_sparring_course_enter;
+        }
+        if (TextUtils.equals(mRecentCourses.courseType, CourseConstants.PIANO_ROOM_COURSE)) {
+            //琴房课
+            assetFolder = "lottie/home/piano_course/images/";
+            rawRes = R.raw.home_piano_course_enter;
+        }
+        mViewBinding.ivCourseEnterAnim.setImageAssetsFolder(assetFolder);
+        mViewBinding.ivCourseEnterAnim.setAnimation(rawRes);
+        mViewBinding.ivCourseEnterAnim.playAnimation();
 
     }
 
@@ -147,12 +357,124 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
     }
 
     @Override
-    public void helpCenterContentListSuccess(HelpCenterContentBean bean) {
-
+    public void helpCenterContentListSuccess(HelpCenterContentBean data) {
+        if (data != null && data.rows != null && data.rows.size() > 0) {
+            mViewBinding.tvNoticeContent.setText(data.rows.get(0).title);
+            mViewBinding.tvNoticeContent2.setText(data.rows.get(0).title);
+            noticeId = data.rows.get(0).id;
+            if (mRecentCourses != null) {
+                //有进入课程提示
+                mViewBinding.bgAnnouncement.setVisibility(View.VISIBLE);
+                mViewBinding.bgAnnouncement2.setVisibility(View.GONE);
+            } else {
+                mViewBinding.bgAnnouncement2.setVisibility(View.VISIBLE);
+                mViewBinding.bgAnnouncement.setVisibility(View.GONE);
+            }
+        } else {
+            mViewBinding.bgAnnouncement.setVisibility(View.GONE);
+            mViewBinding.bgAnnouncement2.setVisibility(View.GONE);
+        }
     }
 
     @Override
     public void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data) {
 
     }
+
+    @Override
+    public void getHotMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean) {
+        if (isDetached() || homeHotMusicSheetBean == null || homeHotMusicSheetBean.rows == null) {
+            return;
+        }
+        ArrayList<HomeHotMusicSheetItemBean> itemBeans = new ArrayList<>();
+        List<HomeHotMusicSheetBean.RowsBean> rows = homeHotMusicSheetBean.rows;
+        if (rows != null && rows.size() > 0) {
+            int pageCount = 0;
+            int pageResult = rows.size() % MAX_HOT_MUSIC_LIST_PAGE;
+            if (pageResult == 0) {
+                pageCount = rows.size() / MAX_HOT_MUSIC_LIST_PAGE;
+            } else {
+                pageCount = (rows.size() / MAX_HOT_MUSIC_LIST_PAGE) + 1;
+            }
+            for (int i = 0; i < pageCount; i++) {
+                HomeHotMusicSheetItemBean hotMusicSheetItemBean = new HomeHotMusicSheetItemBean();
+                for (int k = i * MAX_HOT_MUSIC_LIST_PAGE; k < rows.size() && k < (i + 1) * MAX_HOT_MUSIC_LIST_PAGE; k++) {
+                    hotMusicSheetItemBean.sheetBeans.add(rows.get(k));
+                }
+                itemBeans.add(hotMusicSheetItemBean);
+            }
+            if (mHomeHotMusicSheetAdapter != null) {
+                mHomeHotMusicSheetAdapter.setNewInstance(itemBeans);
+            }
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (UiUtils.isFastClick()) {
+            return;
+        }
+        if (id == R.id.iv_scan) {
+            //二维码扫描
+            ARouter.getInstance()
+                    .build(RouterPath.BaseCenter.SCAN_QR_CODE)
+                    .navigation();
+            return;
+        }
+        if (id == R.id.im_message) {
+            //消息列表页面
+            ARouter.getInstance().build(RouterPath.MessageCenter.TEACHER_MESSAGE_MESSAGEBOX)
+                    .navigation();
+            return;
+        }
+        if (id == R.id.fl_course_enter) {
+            //进入教室
+            if (mRecentCourses != null) {
+                gotoCourseDetail(mRecentCourses);
+            }
+            return;
+        }
+        if (id == R.id.bg_announcement || id == R.id.bg_announcement2) {
+            if (TextUtils.isEmpty(noticeId)) {
+                return;
+            }
+            //点击单条公告
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_DETAIL + noticeId)
+                    .navigation();
+            return;
+        }
+    }
+
+    /**
+     * 跳转直播课详情页面
+     *
+     * @param bean
+     */
+    private void gotoCourseDetail(HomeLiveAndVideoBean.RecentCoursesBean bean) {
+        switch (bean.courseType) {
+            case LIVE_COURSE:
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, bean.courseGroupId, bean.courseId))
+                        .navigation();
+                break;
+            case OTHER_COURSE:
+                //陪练课
+                ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
+                        .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
+                        .withString(CourseConstants.COURSE_GROUP_ID, String.valueOf(bean.courseGroupId))
+                        .navigation();
+                break;
+            case PIANO_ROOM_COURSE:
+                //琴房课 跳转详情页
+                ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
+                        .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
+                        .navigation();
+                break;
+        }
+
+    }
 }

+ 9 - 1
student/src/main/java/com/cooleshow/student/ui/web/AccompanyActivity.java

@@ -7,6 +7,7 @@ import android.content.Intent;
 import android.net.Uri;
 import android.os.Handler;
 import android.text.TextUtils;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.WindowManager;
@@ -76,7 +77,14 @@ public class AccompanyActivity extends BaseMVPActivity<ActivityAccompanyBinding,
         fl_webview = viewBinding.flWebview;
         Intent intent = getIntent();
         String url = intent.getStringExtra(WEB_URL);
-
+        if (TextUtils.isEmpty(url)) {
+            url = intent.getStringExtra("url");
+        }
+        if (TextUtils.isEmpty(url)) {
+            finish();
+            Log.i("AccompanyActivity", "url can not null");
+            return;
+        }
         int orientation = intent.getIntExtra("orientation", -1);
         boolean isOpenLight = intent.getBooleanExtra("isOpenLight", false);
 

+ 1 - 2
student/src/main/java/com/cooleshow/student/widgets/HomeHotAlbumDecoration.java

@@ -26,10 +26,9 @@ public class HomeHotAlbumDecoration extends RecyclerView.ItemDecoration {
 
     @Override
     public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
-        //每行都只有2个
-        int childLayoutPosition = parent.getChildLayoutPosition(view);
         outRect.top = top;
         outRect.bottom = bottom;
         outRect.right = right;
+        outRect.left = left;
     }
 }

+ 34 - 0
student/src/main/java/com/cooleshow/student/widgets/HomeHotMusicSheetItemDecoration.java

@@ -0,0 +1,34 @@
+package com.cooleshow.student.widgets;
+
+import android.graphics.Rect;
+import android.view.View;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+/**
+ * Author by pq, Date on 2021/3/18 0018.
+ */
+public class HomeHotMusicSheetItemDecoration extends RecyclerView.ItemDecoration {
+
+    private int top;
+    private int left;
+    private int bottom;
+    private int right;
+    private int center;
+
+    public HomeHotMusicSheetItemDecoration(int top, int left, int bottom, int right, int center) {
+        this.top = top;
+        this.left = left;
+        this.bottom = bottom;
+        this.right = right;
+        this.center = center;
+    }
+
+    @Override
+    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
+        //每行都只有2个
+        outRect.top = top;
+        outRect.bottom = bottom;
+        outRect.right = right;
+    }
+}

+ 141 - 0
student/src/main/java/com/cooleshow/student/widgets/HomeHotMusicSheetItemView.java

@@ -0,0 +1,141 @@
+package com.cooleshow.student.widgets;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.utils.SizeUtils;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.student.R;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+/**
+ * Author by pq, Date on 2022/8/8.
+ */
+public class HomeHotMusicSheetItemView extends FrameLayout {
+    public static final String CHARGE_TYPE_FREE = "FREE";
+    public static final String CHARGE_TYPE_VIP = "VIP";
+    public static final String CHARGE_TYPE_CHARGE = "CHARGE";
+    private TextView mTvTag;
+    private TextView mTvName;
+    private TextView mTvAuthor;
+    private TextView mTvUploadAuthor;
+    private LinearLayout mLlMusicSubject;
+    private View mViewLine;
+    private HomeHotMusicSheetBean.RowsBean mBean;
+
+    public HomeHotMusicSheetItemView(@NonNull Context context) {
+        this(context, null);
+    }
+
+    public HomeHotMusicSheetItemView(@NonNull Context context, @Nullable AttributeSet attrs) {
+        this(context, attrs, -1);
+    }
+
+    public HomeHotMusicSheetItemView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init();
+    }
+
+    private void init() {
+        LayoutInflater.from(getContext()).inflate(R.layout.view_hot_music_sheet_child_layout, this);
+        mTvTag = findViewById(R.id.tv_tag);
+        mTvName = findViewById(R.id.tv_name);
+        mTvAuthor = findViewById(R.id.tv_author);
+        mTvUploadAuthor = findViewById(R.id.tv_upload_author);
+        mLlMusicSubject = findViewById(R.id.ll_music_subject);
+        mViewLine = findViewById(R.id.view_line);
+        setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (mBean != null) {
+                    if (UiUtils.isFastClick()) {
+                        return;
+                    }
+                    ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
+                            .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, mBean.id))
+                            .withBoolean("isHideTitle", true)
+                            .withBoolean("statusBarTextColor", true)
+                            .withBoolean("isOpenLight", true)
+                            .withInt("orientation", 0)
+                            .navigation();
+                }
+            }
+        });
+
+    }
+
+    public void setData(HomeHotMusicSheetBean.RowsBean data) {
+        this.mBean = data;
+        //曲谱名称
+        if (mTvName != null) {
+            mTvName.setText(data.musicSheetName);
+        }
+        //作者
+        if (mTvAuthor != null) {
+            mTvAuthor.setText(String.format("-%s", data.composer));
+        }
+        //上传人
+        if (mTvUploadAuthor != null) {
+            mTvUploadAuthor.setText(String.format("上传者:%s", data.addName));
+        }
+
+        mLlMusicSubject.removeAllViews();
+        if (!TextUtils.isEmpty(data.subjectNames)) {
+            String[] split = data.subjectNames.split(",");
+            if (split != null && split.length > 0) {
+                for (int i = 0; i < split.length; i++) {
+                    createSubjectView(split[i]);
+                }
+            }
+        }
+
+        if (TextUtils.equals(data.chargeType, CHARGE_TYPE_FREE)) {
+            mTvTag.setText("免费");
+            mTvTag.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_01b84f));
+            mTvTag.setBackgroundResource(R.drawable.shape_01b84f_border);
+            return;
+        }
+        if (TextUtils.equals(data.chargeType, CHARGE_TYPE_VIP)) {
+            mTvTag.setText("会员");
+            mTvTag.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_cd863e));
+            mTvTag.setBackgroundResource(R.drawable.shape_cd863e_border);
+            return;
+        }
+        if (TextUtils.equals(data.chargeType, CHARGE_TYPE_CHARGE)) {
+            mTvTag.setText("点播");
+            mTvTag.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_3591ce));
+            mTvTag.setBackgroundResource(R.drawable.shape_3591ce_border);
+        }
+    }
+
+    private void createSubjectView(String text) {
+        TextView textView = (TextView) LayoutInflater.from(getContext()).inflate(com.cooleshow.base.R.layout.view_subject_item_layout, mLlMusicSubject, false);
+        textView.setText(text);
+        textView.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+        textView.setBackgroundResource(com.cooleshow.base.R.drawable.shape_effbf9_9dp);
+        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        if (mLlMusicSubject.getChildCount() >= 1) {
+            params.setMargins(SizeUtils.dp2px(4), 0, 0, 0);
+        }
+        mLlMusicSubject.addView(textView, params);
+    }
+
+    public void setDividingLineIsShow(boolean isShow) {
+        if (mViewLine != null) {
+            mViewLine.setVisibility(isShow ? View.VISIBLE : View.INVISIBLE);
+        }
+    }
+}

BIN
student/src/main/res/drawable-xhdpi/icon_hot_album_collect_num_tag2.png


BIN
student/src/main/res/drawable-xhdpi/icon_music_sheet_play.png


BIN
student/src/main/res/drawable-xxhdpi/icon_hot_album_collect_num_tag2.png


BIN
student/src/main/res/drawable-xxhdpi/icon_music_sheet_play.png


+ 7 - 0
student/src/main/res/drawable/shape_01b84f_border.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke
+        android:width="0.5dp"
+        android:color="@color/color_01b84f" />
+    <corners android:radius="4dp" />
+</shape>

+ 7 - 0
student/src/main/res/drawable/shape_3591ce_border.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke
+        android:width="0.5dp"
+        android:color="@color/color_3591ce" />
+    <corners android:radius="4dp" />
+</shape>

+ 7 - 0
student/src/main/res/drawable/shape_cd863e_border.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke
+        android:width="0.5dp"
+        android:color="@color/color_cd863e" />
+    <corners android:radius="4dp" />
+</shape>

+ 476 - 467
student/src/main/res/layout/fragment_new_home_layout.xml

@@ -44,7 +44,7 @@
         android:layout_width="0dp"
         android:layout_height="30dp"
         android:layout_marginStart="17dp"
-        android:layout_marginEnd="17dp"
+        android:layout_marginEnd="9dp"
         android:background="@drawable/shape_f6f6f6_17dp"
         app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
         app:layout_constraintLeft_toRightOf="@+id/iv_logo"
@@ -96,290 +96,419 @@
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="@+id/iv_logo" />
 
-    <androidx.core.widget.NestedScrollView
-        android:id="@+id/scroll_layout"
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:overScrollMode="never"
-        android:scrollbars="none"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/view_top_bg">
+        app:layout_constraintTop_toBottomOf="@+id/view_top_bg"
+        app:srlEnableLoadMore="false">
 
-        <androidx.constraintlayout.widget.ConstraintLayout
+        <androidx.core.widget.NestedScrollView
+            android:id="@+id/scroll_layout"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_top_bg">
 
-            <View
-                android:id="@+id/view_bg_header"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:background="@drawable/shape_bottom_18dp_white"
-                app:layout_constraintBottom_toBottomOf="@+id/view_line2"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-            <com.youth.banner.Banner
-                android:id="@+id/banner"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/dp_132"
-                android:layout_marginLeft="@dimen/dp_14"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_14"
-                android:descendantFocusability="blocksDescendants"
-                app:banner_indicator_normal_color="@color/transparent"
-                app:banner_indicator_selected_color="@color/transparent"
-                app:banner_radius="12dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-
-            <androidx.cardview.widget.CardView
-                android:id="@+id/bg_announcement"
+            <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="14dp"
-                android:layout_marginTop="@dimen/dp_12"
-                android:layout_marginEnd="14dp"
-                android:visibility="visible"
-                app:cardBackgroundColor="@color/color_fef9f4"
-                app:cardCornerRadius="10dp"
-                app:cardElevation="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/banner">
+                android:layout_height="wrap_content">
 
-                <androidx.constraintlayout.widget.ConstraintLayout
+                <View
+                    android:id="@+id/view_bg_header"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:background="@drawable/shape_bottom_18dp_white"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_line2"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <com.youth.banner.Banner
+                    android:id="@+id/banner"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_132"
+                    android:layout_marginLeft="@dimen/dp_14"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:layout_marginRight="@dimen/dp_14"
+                    android:descendantFocusability="blocksDescendants"
+                    app:banner_indicator_normal_color="@color/transparent"
+                    app:banner_indicator_selected_color="@color/transparent"
+                    app:banner_radius="12dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/bg_announcement"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal">
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:layout_marginEnd="14dp"
+                    android:visibility="visible"
+                    app:cardBackgroundColor="@color/color_fef9f4"
+                    app:cardCornerRadius="10dp"
+                    app:cardElevation="0dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/banner">
 
-                    <ImageView
-                        android:id="@+id/iv_bell"
-                        android:layout_width="wrap_content"
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:layout_marginLeft="6dp"
-                        android:src="@drawable/icon_home_bell"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:id="@+id/iv_bell"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="6dp"
+                            android:src="@drawable/icon_home_bell"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <TextView
+                            android:id="@+id/tv_notice_content"
+                            android:layout_width="wrap_content"
+                            android:layout_height="44dp"
+                            android:layout_marginStart="7dp"
+                            android:gravity="center"
+                            android:includeFontPadding="false"
+                            android:textColor="@color/color_1a1a1a"
+                            android:textSize="@dimen/sp_14"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintLeft_toRightOf="@+id/iv_bell"
+                            app:layout_constraintTop_toTopOf="parent"
+                            tools:text="网络教室升级公告" />
+
+                        <ImageView
+                            android:id="@+id/im_notice_list"
+                            android:layout_width="@dimen/dp_38"
+                            android:layout_height="@dimen/dp_38"
+                            android:layout_marginRight="@dimen/dp_1"
+                            android:padding="@dimen/dp_10"
+                            android:src="@drawable/icon_arrow_right_bg_tran"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintRight_toRightOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+                </androidx.cardview.widget.CardView>
+
+                <androidx.viewpager.widget.ViewPager
+                    android:id="@+id/viewpager_menu"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_93"
+                    android:layout_marginTop="@dimen/dp_8"
+                    android:layout_marginBottom="@dimen/dp_2"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/bg_announcement" />
 
-                    <TextView
-                        android:id="@+id/tv_notice_content"
-                        android:layout_width="wrap_content"
-                        android:layout_height="44dp"
-                        android:layout_marginStart="7dp"
-                        android:gravity="center"
-                        android:includeFontPadding="false"
-                        android:textColor="@color/color_1a1a1a"
-                        android:textSize="@dimen/sp_14"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@+id/iv_bell"
-                        app:layout_constraintTop_toTopOf="parent"
-                        tools:text="网络教室升级公告" />
-
-                    <ImageView
-                        android:id="@+id/im_notice_list"
-                        android:layout_width="@dimen/dp_38"
-                        android:layout_height="@dimen/dp_38"
-                        android:layout_marginRight="@dimen/dp_1"
-                        android:padding="@dimen/dp_10"
-                        android:src="@drawable/icon_arrow_right_bg_tran"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
-                </androidx.constraintlayout.widget.ConstraintLayout>
-            </androidx.cardview.widget.CardView>
+                <View
+                    android:id="@+id/view_line2"
+                    android:layout_width="1px"
+                    android:layout_height="1px"
+                    android:layout_marginTop="21dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/viewpager_menu" />
+
+
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/bg_announcement2"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:layout_marginEnd="14dp"
+                    android:visibility="gone"
+                    app:cardBackgroundColor="@color/color_fef9f4"
+                    app:cardCornerRadius="10dp"
+                    app:cardElevation="0dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/view_bg_header">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:id="@+id/iv_bell2"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="6dp"
+                            android:src="@drawable/icon_home_bell"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <TextView
+                            android:id="@+id/tv_notice_content2"
+                            android:layout_width="wrap_content"
+                            android:layout_height="44dp"
+                            android:layout_marginStart="7dp"
+                            android:gravity="center"
+                            android:includeFontPadding="false"
+                            android:textColor="@color/color_1a1a1a"
+                            android:textSize="@dimen/sp_14"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintLeft_toRightOf="@+id/iv_bell2"
+                            app:layout_constraintTop_toTopOf="parent"
+                            tools:text="网络教室升级公告" />
+
+                        <ImageView
+                            android:id="@+id/im_notice_list2"
+                            android:layout_width="@dimen/dp_38"
+                            android:layout_height="@dimen/dp_38"
+                            android:layout_marginRight="@dimen/dp_1"
+                            android:padding="@dimen/dp_10"
+                            android:src="@drawable/icon_calendar_next_month"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintRight_toRightOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+                </androidx.cardview.widget.CardView>
+
+
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/fl_course_enter"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="24dp"
+                    android:layout_marginEnd="14dp"
+                    android:visibility="gone"
+                    app:cardBackgroundColor="@color/white"
+                    app:cardCornerRadius="10dp"
+                    app:cardElevation="0dp"
+                    app:cardPreventCornerOverlap="true"
+                    app:cardUseCompatPadding="false"
+                    app:layout_constraintTop_toBottomOf="@+id/bg_announcement2">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="70dp">
+
+                        <TextView
+                            android:id="@+id/tv_live_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="128dp"
+                            android:includeFontPadding="false"
+                            android:text="您有新课程即将开始"
+                            android:textColor="@color/color_1a1a1a"
+                            android:textSize="@dimen/sp_16"
+                            app:layout_constraintBottom_toTopOf="@+id/alarm_icon"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintVertical_chainStyle="packed" />
+
+                        <ImageView
+                            android:id="@+id/alarm_icon"
+                            android:layout_width="@dimen/dp_15"
+                            android:layout_height="@dimen/dp_15"
+                            android:layout_marginTop="10dp"
+                            android:src="@drawable/small_alarm_clock"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintLeft_toLeftOf="@+id/tv_live_title"
+                            app:layout_constraintTop_toBottomOf="@+id/tv_live_title" />
+
+
+                        <TextView
+                            android:id="@+id/tv_live_time"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="@dimen/dp_1"
+                            android:layout_marginBottom="@dimen/dp_5"
+                            android:paddingStart="5dp"
+                            android:textColor="@color/color_FF806F"
+                            android:textSize="@dimen/sp_13"
+                            app:layout_constraintBottom_toBottomOf="@+id/alarm_icon"
+                            app:layout_constraintLeft_toRightOf="@+id/alarm_icon"
+                            app:layout_constraintTop_toTopOf="@+id/alarm_icon"
+                            tools:text="今日 16:30-17:05" />
+
+
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginEnd="11dp"
+                            android:src="@drawable/icon_arrow_right_bg_tran"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintRight_toRightOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+                </androidx.cardview.widget.CardView>
+
+                <com.airbnb.lottie.LottieAnimationView
+                    android:id="@+id/iv_course_enter_anim"
+                    android:layout_width="128dp"
+                    android:layout_height="91dp"
+                    android:visibility="gone"
+                    app:layout_constraintBottom_toBottomOf="@+id/fl_course_enter"
+                    app:layout_constraintLeft_toLeftOf="@+id/fl_course_enter"
+                    app:lottie_autoPlay="true"
+                    app:lottie_loop="true" />
 
-            <androidx.viewpager.widget.ViewPager
-                android:id="@+id/viewpager_menu"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/dp_93"
-                android:layout_marginTop="@dimen/dp_8"
-                android:layout_marginBottom="@dimen/dp_2"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/bg_announcement" />
-
-            <View
-                android:id="@+id/view_line2"
-                android:layout_width="1px"
-                android:layout_height="1px"
-                android:layout_marginTop="21dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/viewpager_menu" />
-
-
-            <androidx.cardview.widget.CardView
-                android:id="@+id/bg_announcement2"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="14dp"
-                android:layout_marginTop="@dimen/dp_12"
-                android:layout_marginEnd="14dp"
-                android:visibility="gone"
-                app:cardBackgroundColor="@color/color_fef9f4"
-                app:cardCornerRadius="10dp"
-                app:cardElevation="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/view_bg_header">
 
                 <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_hot_album"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal">
+                    android:layout_marginTop="@dimen/dp_18"
+                    android:visibility="visible"
+                    app:layout_constraintTop_toBottomOf="@+id/fl_course_enter">
+
+                    <View
+                        android:id="@+id/tv_hot_album_line"
+                        android:layout_width="4dp"
+                        android:layout_height="17dp"
+                        android:layout_marginStart="14dp"
+                        android:background="@drawable/shape_course_title_tag_bg"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_hot_album" />
 
-                    <ImageView
-                        android:id="@+id/iv_bell2"
+                    <TextView
+                        android:id="@+id/tv_hot_album"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginLeft="6dp"
-                        android:src="@drawable/icon_home_bell"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
+                        android:layout_marginLeft="@dimen/dp_6"
+                        android:gravity="center"
+                        android:text="热门专辑"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_18"
+                        android:textStyle="bold"
+                        app:layout_constraintLeft_toRightOf="@+id/tv_hot_album_line"
                         app:layout_constraintTop_toTopOf="parent" />
 
                     <TextView
-                        android:id="@+id/tv_notice_content2"
+                        android:id="@+id/tv_hot_album_more"
                         android:layout_width="wrap_content"
-                        android:layout_height="44dp"
-                        android:layout_marginStart="7dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="@dimen/dp_14"
+                        android:background="@drawable/shape_f2f2f2_9dp"
+                        android:drawableEnd="@drawable/icon_next_right"
+                        android:drawablePadding="1dp"
                         android:gravity="center"
-                        android:includeFontPadding="false"
-                        android:textColor="@color/color_1a1a1a"
-                        android:textSize="@dimen/sp_14"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@+id/iv_bell2"
-                        app:layout_constraintTop_toTopOf="parent"
-                        tools:text="网络教室升级公告" />
-
-                    <ImageView
-                        android:id="@+id/im_notice_list2"
-                        android:layout_width="@dimen/dp_38"
-                        android:layout_height="@dimen/dp_38"
-                        android:layout_marginRight="@dimen/dp_1"
-                        android:padding="@dimen/dp_10"
-                        android:src="@drawable/icon_calendar_next_month"
-                        app:layout_constraintBottom_toBottomOf="parent"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="3dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_12"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
                         app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
-                </androidx.constraintlayout.widget.ConstraintLayout>
-            </androidx.cardview.widget.CardView>
+                        app:layout_constraintTop_toTopOf="@+id/tv_hot_album" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_hot_album"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="12dp"
+                        android:overScrollMode="never"
+                        android:paddingLeft="@dimen/dp_14"
+                        android:scrollbars="none"
+                        app:layout_constraintTop_toBottomOf="@+id/tv_hot_album" />
 
+                </androidx.constraintlayout.widget.ConstraintLayout>
 
-            <androidx.cardview.widget.CardView
-                android:id="@+id/fl_course_enter"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="14dp"
-                android:layout_marginTop="24dp"
-                android:layout_marginEnd="14dp"
-                android:visibility="gone"
-                app:cardBackgroundColor="@color/white"
-                app:cardCornerRadius="10dp"
-                app:cardElevation="0dp"
-                app:cardPreventCornerOverlap="true"
-                app:cardUseCompatPadding="false"
-                app:layout_constraintTop_toBottomOf="@+id/bg_announcement2">
 
                 <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_hot_track"
                     android:layout_width="match_parent"
-                    android:layout_height="70dp">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_18"
+                    android:visibility="visible"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_hot_album">
+
+                    <View
+                        android:id="@+id/tv_hot_track_line"
+                        android:layout_width="4dp"
+                        android:layout_height="17dp"
+                        android:layout_marginStart="14dp"
+                        android:background="@drawable/shape_course_title_tag_bg"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_hot_track"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_hot_track" />
 
                     <TextView
-                        android:id="@+id/tv_live_title"
+                        android:id="@+id/tv_hot_track"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginStart="128dp"
-                        android:includeFontPadding="false"
-                        android:text="您有新课程即将开始"
-                        android:textColor="@color/color_1a1a1a"
-                        android:textSize="@dimen/sp_16"
-                        app:layout_constraintBottom_toTopOf="@+id/alarm_icon"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintVertical_chainStyle="packed" />
-
-                    <ImageView
-                        android:id="@+id/alarm_icon"
-                        android:layout_width="@dimen/dp_15"
-                        android:layout_height="@dimen/dp_15"
-                        android:layout_marginTop="10dp"
-                        android:src="@drawable/small_alarm_clock"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toLeftOf="@+id/tv_live_title"
-                        app:layout_constraintTop_toBottomOf="@+id/tv_live_title" />
-
+                        android:layout_marginLeft="@dimen/dp_6"
+                        android:gravity="center"
+                        android:text="热门曲目"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_18"
+                        android:textStyle="bold"
+                        app:layout_constraintLeft_toRightOf="@+id/tv_hot_track_line"
+                        app:layout_constraintTop_toTopOf="parent" />
 
                     <TextView
-                        android:id="@+id/tv_live_time"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/dp_1"
-                        android:layout_marginBottom="@dimen/dp_5"
-                        android:paddingStart="5dp"
-                        android:textColor="@color/color_FF806F"
-                        android:textSize="@dimen/sp_13"
-                        app:layout_constraintBottom_toBottomOf="@+id/alarm_icon"
-                        app:layout_constraintLeft_toRightOf="@+id/alarm_icon"
-                        app:layout_constraintTop_toTopOf="@+id/alarm_icon"
-                        tools:text="今日 16:30-17:05" />
-
-
-                    <ImageView
+                        android:id="@+id/tv_hot_track_more"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginEnd="11dp"
-                        android:src="@drawable/icon_arrow_right_bg_tran"
-                        app:layout_constraintBottom_toBottomOf="parent"
+                        android:layout_marginRight="@dimen/dp_14"
+                        android:background="@drawable/shape_f2f2f2_9dp"
+                        android:drawableEnd="@drawable/icon_next_right"
+                        android:drawablePadding="1dp"
+                        android:gravity="center"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="3dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_12"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_hot_track"
                         app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
-
+                        app:layout_constraintTop_toTopOf="@+id/tv_hot_track" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_hot_track"
+                        android:layout_width="match_parent"
+                        android:layout_height="239dp"
+                        android:layout_marginTop="12dp"
+                        android:overScrollMode="never"
+                        android:paddingLeft="@dimen/dp_14"
+                        android:scrollbars="none"
+                        app:layout_constraintTop_toBottomOf="@+id/tv_hot_track" />
 
                 </androidx.constraintlayout.widget.ConstraintLayout>
-            </androidx.cardview.widget.CardView>
-
-            <com.airbnb.lottie.LottieAnimationView
-                android:id="@+id/iv_course_enter_anim"
-                android:layout_width="128dp"
-                android:layout_height="91dp"
-                android:visibility="gone"
-                app:layout_constraintBottom_toBottomOf="@+id/fl_course_enter"
-                app:layout_constraintLeft_toLeftOf="@+id/fl_course_enter"
-                app:lottie_autoPlay="true"
-                app:lottie_loop="true" />
 
 
-            <androidx.constraintlayout.widget.ConstraintLayout
-                android:id="@+id/cl_hot_album"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_18"
-                android:visibility="visible"
-                app:layout_constraintTop_toBottomOf="@+id/fl_course_enter">
-
                 <View
-                    android:id="@+id/tv_hot_album_line"
+                    android:id="@+id/tv_recommend_teacher_line"
                     android:layout_width="4dp"
                     android:layout_height="17dp"
                     android:layout_marginStart="14dp"
                     android:background="@drawable/shape_course_title_tag_bg"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_recommend_teacher_title"
                     app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/tv_hot_album" />
+                    app:layout_constraintTop_toTopOf="@+id/tv_recommend_teacher_title" />
 
                 <TextView
-                    android:id="@+id/tv_hot_album"
+                    android:id="@+id/tv_recommend_teacher_title"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="@dimen/dp_6"
+                    android:layout_marginTop="30dp"
                     android:gravity="center"
-                    android:text="热门专辑"
+                    android:text="推荐达人"
                     android:textColor="@color/color_333333"
                     android:textSize="@dimen/sp_18"
                     android:textStyle="bold"
-                    app:layout_constraintLeft_toRightOf="@+id/tv_hot_album_line"
-                    app:layout_constraintTop_toTopOf="parent" />
+                    app:layout_constraintLeft_toRightOf="@+id/tv_recommend_teacher_line"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_hot_track" />
 
                 <TextView
-                    android:id="@+id/tv_hot_album_more"
+                    android:id="@+id/tv_recommend_teacher_more"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginRight="@dimen/dp_14"
@@ -394,272 +523,152 @@
                     android:text="更多"
                     android:textColor="@color/color_999999"
                     android:textSize="@dimen/sp_12"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_recommend_teacher_title"
                     app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/tv_hot_album" />
-
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/rv_hot_album"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="12dp"
-                    android:overScrollMode="never"
-                    android:paddingLeft="@dimen/dp_14"
-                    android:scrollbars="none"
-                    app:layout_constraintTop_toBottomOf="@+id/tv_hot_album" />
-
-            </androidx.constraintlayout.widget.ConstraintLayout>
-
-
-            <androidx.constraintlayout.widget.ConstraintLayout
-                android:id="@+id/cl_hot_track"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_18"
-                android:visibility="visible"
-                app:layout_constraintTop_toBottomOf="@+id/cl_hot_album">
-
-                <View
-                    android:id="@+id/tv_hot_track_line"
-                    android:layout_width="4dp"
-                    android:layout_height="17dp"
-                    android:layout_marginStart="14dp"
-                    android:background="@drawable/shape_course_title_tag_bg"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_hot_track"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/tv_hot_track" />
+                    app:layout_constraintTop_toTopOf="@+id/tv_recommend_teacher_title" />
 
-                <TextView
-                    android:id="@+id/tv_hot_track"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_6"
-                    android:gravity="center"
-                    android:text="热门曲目"
-                    android:textColor="@color/color_333333"
-                    android:textSize="@dimen/sp_18"
-                    android:textStyle="bold"
-                    app:layout_constraintLeft_toRightOf="@+id/tv_hot_track_line"
-                    app:layout_constraintTop_toTopOf="parent" />
-
-                <TextView
-                    android:id="@+id/tv_hot_track_more"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginRight="@dimen/dp_14"
-                    android:background="@drawable/shape_f2f2f2_9dp"
-                    android:drawableEnd="@drawable/icon_next_right"
-                    android:drawablePadding="1dp"
-                    android:gravity="center"
-                    android:paddingStart="7dp"
-                    android:paddingTop="2dp"
-                    android:paddingEnd="3dp"
-                    android:paddingBottom="2dp"
-                    android:text="更多"
-                    android:textColor="@color/color_999999"
-                    android:textSize="@dimen/sp_12"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_hot_track"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/tv_hot_track" />
 
                 <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/rv_hot_track"
+                    android:id="@+id/recyclerview_recommend_talent"
                     android:layout_width="match_parent"
-                    android:layout_height="239dp"
+                    android:layout_height="146dp"
                     android:layout_marginTop="12dp"
                     android:overScrollMode="never"
                     android:paddingLeft="@dimen/dp_14"
                     android:scrollbars="none"
-                    app:layout_constraintTop_toBottomOf="@+id/tv_hot_track" />
-
-            </androidx.constraintlayout.widget.ConstraintLayout>
-
-
-            <View
-                android:id="@+id/tv_recommend_teacher_line"
-                android:layout_width="4dp"
-                android:layout_height="17dp"
-                android:layout_marginStart="14dp"
-                android:background="@drawable/shape_course_title_tag_bg"
-                app:layout_constraintBottom_toBottomOf="@+id/tv_recommend_teacher_title"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="@+id/tv_recommend_teacher_title" />
-
-            <TextView
-                android:id="@+id/tv_recommend_teacher_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_6"
-                android:layout_marginTop="30dp"
-                android:gravity="center"
-                android:text="推荐达人"
-                android:textColor="@color/color_333333"
-                android:textSize="@dimen/sp_18"
-                android:textStyle="bold"
-                app:layout_constraintLeft_toRightOf="@+id/tv_recommend_teacher_line"
-                app:layout_constraintTop_toBottomOf="@+id/cl_hot_track" />
-
-            <TextView
-                android:id="@+id/tv_recommend_teacher_more"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="@dimen/dp_14"
-                android:background="@drawable/shape_f2f2f2_9dp"
-                android:drawableEnd="@drawable/icon_next_right"
-                android:drawablePadding="1dp"
-                android:gravity="center"
-                android:paddingStart="7dp"
-                android:paddingTop="2dp"
-                android:paddingEnd="3dp"
-                android:paddingBottom="2dp"
-                android:text="更多"
-                android:textColor="@color/color_999999"
-                android:textSize="@dimen/sp_12"
-                app:layout_constraintBottom_toBottomOf="@+id/tv_recommend_teacher_title"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="@+id/tv_recommend_teacher_title" />
-
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/recyclerview_recommend_talent"
-                android:layout_width="match_parent"
-                android:layout_height="146dp"
-                android:layout_marginTop="12dp"
-                android:overScrollMode="never"
-                android:paddingLeft="@dimen/dp_14"
-                android:scrollbars="none"
-                app:layout_constraintTop_toBottomOf="@+id/tv_recommend_teacher_title" />
-
-            <androidx.constraintlayout.widget.ConstraintLayout
-                android:id="@+id/cl_video_course"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_30"
-                android:visibility="visible"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/recyclerview_recommend_talent">
-
-                <View
-                    android:id="@+id/tv_video_course_line"
-                    android:layout_width="4dp"
-                    android:layout_height="17dp"
-                    android:layout_marginStart="14dp"
-                    android:background="@drawable/shape_course_title_tag_bg"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_video_course_title"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/tv_video_course_title" />
+                    app:layout_constraintTop_toBottomOf="@+id/tv_recommend_teacher_title" />
 
-                <TextView
-                    android:id="@+id/tv_video_course_title"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_6"
-                    android:gravity="center"
-                    android:text="精品视频课"
-                    android:textColor="@color/color_333333"
-                    android:textSize="@dimen/sp_16"
-                    android:textStyle="bold"
-                    app:layout_constraintLeft_toRightOf="@+id/tv_video_course_line"
-                    app:layout_constraintTop_toTopOf="parent" />
-
-                <TextView
-                    android:id="@+id/tv_video_course_more"
-                    android:layout_width="wrap_content"
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_video_course"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginRight="@dimen/dp_20"
-                    android:background="@drawable/shape_f2f2f2_9dp"
-                    android:drawableEnd="@drawable/icon_next_right"
-                    android:drawablePadding="1dp"
-                    android:gravity="center"
-                    android:paddingStart="7dp"
-                    android:paddingTop="2dp"
-                    android:paddingEnd="3dp"
-                    android:paddingBottom="2dp"
-                    android:text="更多"
-                    android:textColor="@color/color_999999"
-                    android:textSize="@dimen/sp_12"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_video_course_title"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/tv_video_course_title" />
+                    android:layout_marginTop="@dimen/dp_30"
+                    android:visibility="visible"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/recyclerview_recommend_talent">
+
+                    <View
+                        android:id="@+id/tv_video_course_line"
+                        android:layout_width="4dp"
+                        android:layout_height="17dp"
+                        android:layout_marginStart="14dp"
+                        android:background="@drawable/shape_course_title_tag_bg"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_video_course_title"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_video_course_title" />
 
+                    <TextView
+                        android:id="@+id/tv_video_course_title"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/dp_6"
+                        android:gravity="center"
+                        android:text="精品视频课"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_16"
+                        android:textStyle="bold"
+                        app:layout_constraintLeft_toRightOf="@+id/tv_video_course_line"
+                        app:layout_constraintTop_toTopOf="parent" />
 
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/rv_video_course"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:overScrollMode="never"
-                    android:paddingTop="@dimen/dp_7"
-                    android:scrollbars="none"
-                    app:layout_constraintTop_toBottomOf="@+id/tv_video_course_title" />
+                    <TextView
+                        android:id="@+id/tv_video_course_more"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="@dimen/dp_20"
+                        android:background="@drawable/shape_f2f2f2_9dp"
+                        android:drawableEnd="@drawable/icon_next_right"
+                        android:drawablePadding="1dp"
+                        android:gravity="center"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="3dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_12"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_video_course_title"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_video_course_title" />
 
-            </androidx.constraintlayout.widget.ConstraintLayout>
 
-            <androidx.constraintlayout.widget.ConstraintLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="30dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/cl_video_course">
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_video_course"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:overScrollMode="never"
+                        android:paddingTop="@dimen/dp_7"
+                        android:scrollbars="none"
+                        app:layout_constraintTop_toBottomOf="@+id/tv_video_course_title" />
 
-                <View
-                    android:id="@+id/view_talent_style_news"
-                    android:layout_width="63dp"
-                    android:layout_height="12dp"
-                    android:layout_marginTop="13dp"
-                    android:background="@drawable/shape_2dc7aa_6dp"
-                    app:layout_constraintLeft_toLeftOf="@+id/tv_talent_style_title"
-                    app:layout_constraintRight_toRightOf="@+id/tv_talent_style_title"
-                    app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
 
-                <TextView
-                    android:id="@+id/tv_talent_style_title"
-                    android:layout_width="wrap_content"
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="24dp"
-                    android:includeFontPadding="false"
-                    android:text="达人风采"
-                    android:textColor="@color/color_333333"
-                    android:textSize="@dimen/sp_18"
-                    android:textStyle="bold"
+                    android:layout_marginTop="30dp"
                     app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="parent" />
+                    app:layout_constraintTop_toBottomOf="@+id/cl_video_course">
+
+                    <View
+                        android:id="@+id/view_talent_style_news"
+                        android:layout_width="63dp"
+                        android:layout_height="12dp"
+                        android:layout_marginTop="13dp"
+                        android:background="@drawable/shape_2dc7aa_6dp"
+                        app:layout_constraintLeft_toLeftOf="@+id/tv_talent_style_title"
+                        app:layout_constraintRight_toRightOf="@+id/tv_talent_style_title"
+                        app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
 
+                    <TextView
+                        android:id="@+id/tv_talent_style_title"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="24dp"
+                        android:includeFontPadding="false"
+                        android:text="达人风采"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_18"
+                        android:textStyle="bold"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
 
-                <View
-                    android:id="@+id/view_tab_hot_news"
-                    android:layout_width="63dp"
-                    android:layout_height="12dp"
-                    android:layout_marginTop="13dp"
-                    android:background="@drawable/shape_2dc7aa_6dp"
-                    android:visibility="gone"
-                    app:layout_constraintLeft_toLeftOf="@+id/tv_hot_news_title"
-                    app:layout_constraintRight_toRightOf="@+id/tv_hot_news_title"
-                    app:layout_constraintTop_toTopOf="@+id/tv_hot_news_title" />
 
-                <TextView
-                    android:id="@+id/tv_hot_news_title"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="36dp"
-                    android:includeFontPadding="false"
-                    android:text="热门资讯"
-                    android:textColor="@color/color_999999"
-                    android:textSize="@dimen/sp_18"
-                    android:textStyle="bold"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_talent_style_title"
-                    app:layout_constraintLeft_toRightOf="@+id/tv_talent_style_title"
-                    app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
+                    <View
+                        android:id="@+id/view_tab_hot_news"
+                        android:layout_width="63dp"
+                        android:layout_height="12dp"
+                        android:layout_marginTop="13dp"
+                        android:background="@drawable/shape_2dc7aa_6dp"
+                        android:visibility="gone"
+                        app:layout_constraintLeft_toLeftOf="@+id/tv_hot_news_title"
+                        app:layout_constraintRight_toRightOf="@+id/tv_hot_news_title"
+                        app:layout_constraintTop_toTopOf="@+id/tv_hot_news_title" />
 
-                <androidx.viewpager2.widget.ViewPager2
-                    android:id="@+id/view_pager_bottom"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="18dp"
-                    android:overScrollMode="never"
-                    android:scrollbars="none"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/tv_talent_style_title" />
+                    <TextView
+                        android:id="@+id/tv_hot_news_title"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="36dp"
+                        android:includeFontPadding="false"
+                        android:text="热门资讯"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_18"
+                        android:textStyle="bold"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_talent_style_title"
+                        app:layout_constraintLeft_toRightOf="@+id/tv_talent_style_title"
+                        app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
+
+                    <androidx.viewpager2.widget.ViewPager2
+                        android:id="@+id/view_pager_bottom"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="18dp"
+                        android:overScrollMode="never"
+                        android:scrollbars="none"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toBottomOf="@+id/tv_talent_style_title" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
             </androidx.constraintlayout.widget.ConstraintLayout>
-        </androidx.constraintlayout.widget.ConstraintLayout>
-    </androidx.core.widget.NestedScrollView>
+        </androidx.core.widget.NestedScrollView>
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 9 - 0
student/src/main/res/layout/item_home_hot_music_sheet_layout.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/ll_container"
+    android:layout_width="312dp"
+    android:layout_height="match_parent"
+    android:background="@drawable/shape_8dp_white"
+    android:orientation="vertical">
+
+</LinearLayout>

+ 1 - 0
student/src/main/res/layout/layout_home_hot_album_item.xml

@@ -28,6 +28,7 @@
 
 
         <ImageView
+            android:id="@+id/iv_icon"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:src="@drawable/icon_hot_album_collect_num_tag" />

+ 100 - 0
student/src/main/res/layout/view_hot_music_sheet_child_layout.xml

@@ -0,0 +1,100 @@
+<?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"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="79dp"
+    android:paddingStart="11dp"
+    android:paddingEnd="11dp">
+
+    <TextView
+        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintBottom_toTopOf="@+id/tv_upload_author"
+        android:id="@+id/tv_tag"
+        android:layout_width="30dp"
+        android:layout_height="17dp"
+        android:background="@drawable/shape_01b84f_border"
+        android:gravity="center"
+        android:text="免费"
+        android:textSize="@dimen/sp_10"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxWidth="129dp"
+        android:lines="1"
+        android:paddingStart="6dp"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_tag"
+        app:layout_constraintLeft_toRightOf="@+id/tv_tag"
+        app:layout_constraintRight_toLeftOf="@+id/tv_author"
+        app:layout_constraintTop_toTopOf="@+id/tv_tag"
+        tools:text="维瓦尔第 E第一维瓦尔第维瓦尔第维瓦尔第" />
+
+    <TextView
+        android:id="@+id/tv_author"
+        android:layout_width="68dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="25dp"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:paddingStart="6dp"
+        android:lines="1"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
+        tools:text="-维瓦尔第…维瓦尔第维瓦尔第" />
+
+    <ImageView
+        android:id="@+id/iv_play"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="14dp"
+        android:src="@drawable/icon_music_sheet_play"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+
+    <TextView
+        android:id="@+id/tv_upload_author"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="12dp"
+        android:layout_marginEnd="25dp"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_tag"
+        app:layout_constraintTop_toBottomOf="@+id/tv_tag"
+        tools:text="上传者:一把剑走天涯" />
+
+    <LinearLayout
+        android:layout_marginStart="12dp"
+        android:id="@+id/ll_music_subject"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_upload_author"
+        app:layout_constraintLeft_toRightOf="@+id/tv_upload_author"
+        app:layout_constraintRight_toLeftOf="@+id/iv_play"
+        app:layout_constraintTop_toTopOf="@+id/tv_upload_author" />
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:background="@color/color_e8e8e8"
+        app:layout_constraintBottom_toBottomOf="parent" />
+</androidx.constraintlayout.widget.ConstraintLayout>

File diff suppressed because it is too large
+ 0 - 0
student/src/main/res/raw/home_live_course_enter.json


File diff suppressed because it is too large
+ 0 - 0
student/src/main/res/raw/home_piano_course_enter.json


File diff suppressed because it is too large
+ 0 - 0
student/src/main/res/raw/home_sparring_course_enter.json


+ 6 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragment.java

@@ -40,6 +40,7 @@ import com.cooleshow.teacher.widgets.HomeHotMusicSheetItemDecoration;
 import com.cooleshow.teacher.widgets.dialog.BadgeDesDialog;
 import com.cooleshow.teacher.widgets.dialog.HomeCertTipDialog;
 import com.cooleshow.usercenter.helper.UserHelper;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import com.youth.banner.adapter.BannerImageAdapter;
 import com.youth.banner.config.BannerConfig;
 import com.youth.banner.config.IndicatorConfig;
@@ -76,10 +77,12 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
     private int teacherFlag = 0;//教资认证
     private int degreeFlag = 0;//老师学历认证
     private String entryStatus = "";//达人认证状态
+    private SmartRefreshLayout refreshLayout;
 
     @Override
     protected void initView(View rootView) {
         Utils.setHeadView(mViewBinding.viewStatusBar, requireContext(), 0);
+        refreshLayout = mViewBinding.refreshLayout;
     }
 
     @Override
@@ -343,6 +346,9 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
         if (isDetached()) {
             return;
         }
+        if (refreshLayout != null) {
+            refreshLayout.finishRefresh();
+        }
         bindBanner(homeMenuBean.banner);
         if (homeMenuBean != null && homeMenuBean.appMenu != null && homeMenuBean.appMenu.size() > 0) {
             mViewBinding.flTopMenu.setVisibility(View.VISIBLE);

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