Browse Source

增加学生端音乐厅页面

Pq 3 months ago
parent
commit
3afd8934d6

+ 36 - 0
student/src/main/java/com/cooleshow/student/contract/HomeMusicHallContract.java

@@ -0,0 +1,36 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.student.bean.AppHomeBean;
+import com.cooleshow.student.bean.AwardStatusBean;
+import com.cooleshow.student.bean.CountOfUnreadBean;
+import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
+import com.cooleshow.student.bean.HomeHotNewsBean;
+import com.cooleshow.student.bean.HomeLiveAndVideoBean;
+import com.cooleshow.student.bean.HomeStyleBean;
+import com.cooleshow.student.bean.HotAlbumBean;
+import com.cooleshow.student.bean.RecommendTalentListBean;
+import com.cooleshow.usercenter.bean.StudentUserInfo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 创建日期:2022/5/26 10:09
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface HomeMusicHallContract {
+    interface HomeMusicHallView extends BaseView {
+
+        void hotAlbumListSuccess(HotAlbumBean data);
+
+        void getHotMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean);
+
+    }
+
+    interface Presenter {
+    }
+}

+ 102 - 0
student/src/main/java/com/cooleshow/student/presenter/main/MusicHallPresenter.java

@@ -0,0 +1,102 @@
+package com.cooleshow.student.presenter.main;
+
+import android.util.Log;
+
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.data.net.BaseResponse;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.student.api.APIService;
+import com.cooleshow.student.bean.AppHomeBean;
+import com.cooleshow.student.bean.AwardStatusBean;
+import com.cooleshow.student.bean.CountOfUnreadBean;
+import com.cooleshow.student.bean.HelpCenterContentBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
+import com.cooleshow.student.bean.HomeHotNewsBean;
+import com.cooleshow.student.bean.HomeLiveAndVideoBean;
+import com.cooleshow.student.bean.HomeStyleBean;
+import com.cooleshow.student.bean.HotAlbumBean;
+import com.cooleshow.student.bean.RecommendTalentListBean;
+import com.cooleshow.student.bean.TempLiveTeacherListBean;
+import com.cooleshow.student.constants.CommonConfig;
+import com.cooleshow.student.contract.HomeContract;
+import com.cooleshow.student.contract.HomeMusicHallContract;
+import com.cooleshow.usercenter.bean.StudentUserInfo;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
+import io.reactivex.rxjava3.annotations.NonNull;
+import io.reactivex.rxjava3.core.Observable;
+import io.reactivex.rxjava3.core.ObservableSource;
+import io.reactivex.rxjava3.core.Observer;
+import io.reactivex.rxjava3.disposables.Disposable;
+import io.reactivex.rxjava3.functions.Function;
+import io.reactivex.rxjava3.schedulers.Schedulers;
+
+/**
+ * 创建日期:2022/5/26 10:09
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class MusicHallPresenter extends BasePresenter<HomeMusicHallContract.HomeMusicHallView> implements HomeContract.Presenter {
+
+
+    public void userAccountPage() {
+
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("platform", "android");
+            jsonObject.putOpt("version", "1");
+            jsonObject.putOpt("page", 1);
+            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).hotAlbumList(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<HotAlbumBean>(getView()) {
+            @Override
+            protected void onSuccess(HotAlbumBean data) {
+                if (getView() != null) {
+                    getView().hotAlbumListSuccess(data);
+                }
+            }
+        });
+    }
+
+
+
+
+
+
+
+
+    /**
+     * 获取热门曲目
+     */
+    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 - 1
student/src/main/java/com/cooleshow/student/ui/main/MainActivity.java

@@ -164,11 +164,12 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
         CourseTableFragment courseTableFragment = new CourseTableFragment();
         mChatFragment = new ChatFragment();
         shopMallFragment = new MallFragment();
+        MusicHallFragment musicHallFragment =new MusicHallFragment();
         mMineFragment = new MineFragment();
         mFragments.add(newHomeFragment);
         mFragments.add(courseTableFragment);
         mFragments.add(mChatFragment);
-        mFragments.add(shopMallFragment);
+        mFragments.add(musicHallFragment);
         mFragments.add(mMineFragment);
         homePageAdapter.setFragments(mFragments);
         getViewBinding().viewPager.setAdapter(homePageAdapter);

+ 270 - 0
student/src/main/java/com/cooleshow/student/ui/main/MusicHallFragment.java

@@ -0,0 +1,270 @@
+package com.cooleshow.student.ui.main;
+
+import android.view.View;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.SizeUtils;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.utils.Utils;
+import com.cooleshow.base.utils.helper.WebStartHelper;
+import com.cooleshow.base.widgets.dialog.RecommendMoreMenuDialog;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.HomeHotAlbumAdapter;
+import com.cooleshow.student.adapter.HomeHotMusicSheetAdapter;
+import com.cooleshow.student.adapter.HomeRecommendTalentAdapter;
+import com.cooleshow.student.bean.HomeHotMusicSheetBean;
+import com.cooleshow.student.bean.HomeHotMusicSheetItemBean;
+import com.cooleshow.student.bean.HotAlbumBean;
+import com.cooleshow.student.contract.HomeMusicHallContract;
+import com.cooleshow.student.databinding.FgMusicHallLayoutBinding;
+import com.cooleshow.student.presenter.main.MusicHallPresenter;
+import com.cooleshow.student.widgets.HomeHotAlbumDecoration;
+import com.cooleshow.student.widgets.HomeHotMusicSheetItemDecoration;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.LinearSnapHelper;
+import androidx.viewbinding.ViewBinding;
+
+/**
+ * Author by pq, Date on 2024/11/13.
+ */
+public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding, MusicHallPresenter> implements HomeMusicHallContract.HomeMusicHallView, View.OnClickListener {
+    public static final int MAX_HOT_MUSIC_LIST_PAGE = 4;//热门曲目一页最大条数
+    private HomeHotAlbumAdapter mAlbumAdapter;
+    private HomeHotMusicSheetAdapter mHomeHotMusicSheetAdapter;
+    private HomeHotMusicSheetAdapter mRecommendAdapter;
+    private HomeHotMusicSheetAdapter mLatestAdapter;
+
+    @Override
+    protected FgMusicHallLayoutBinding getLayoutView() {
+        return FgMusicHallLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected MusicHallPresenter createPresenter() {
+        return new MusicHallPresenter();
+    }
+
+    @Override
+    protected void initView(View rootView) {
+        Utils.setHeadView(mViewBinding.viewStatusBar, requireContext(), SizeUtils.dp2px(3.5f));
+    }
+
+    @Override
+    protected void initData() {
+        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 recommendMusicSheetManager = new LinearLayoutManager(getContext());
+        recommendMusicSheetManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mRecommendAdapter = new HomeHotMusicSheetAdapter();
+        LinearSnapHelper recommendlinearSnapHelper = new LinearSnapHelper();
+        recommendlinearSnapHelper.attachToRecyclerView(mViewBinding.rvRecommendTrack);
+        HomeHotMusicSheetItemDecoration itemDecoration1 = new HomeHotMusicSheetItemDecoration(0, SizeUtils.dp2px(12), 0, SizeUtils.dp2px(12), 0);
+        mViewBinding.rvRecommendTrack.addItemDecoration(itemDecoration1);
+        mViewBinding.rvRecommendTrack.setLayoutManager(recommendMusicSheetManager);
+        mViewBinding.rvRecommendTrack.setAdapter(mRecommendAdapter);
+        mViewBinding.rvRecommendTrack.setNestedScrollingEnabled(false);
+
+        LinearLayoutManager latestMusicSheetManager = new LinearLayoutManager(getContext());
+        latestMusicSheetManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mLatestAdapter = new HomeHotMusicSheetAdapter();
+        LinearSnapHelper linearSnapHelper = new LinearSnapHelper();
+        linearSnapHelper.attachToRecyclerView(mViewBinding.rvLatestTrack);
+        HomeHotMusicSheetItemDecoration itemDecoration2 = new HomeHotMusicSheetItemDecoration(0, SizeUtils.dp2px(12), 0, SizeUtils.dp2px(12), 0);
+        mViewBinding.rvLatestTrack.addItemDecoration(itemDecoration2);
+        mViewBinding.rvLatestTrack.setLayoutManager(latestMusicSheetManager);
+        mViewBinding.rvLatestTrack.setAdapter(mLatestAdapter);
+        mViewBinding.rvLatestTrack.setNestedScrollingEnabled(false);
+
+        //热门曲目
+        LinearLayoutManager musicSheetManager = new LinearLayoutManager(getContext());
+        musicSheetManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mHomeHotMusicSheetAdapter = new HomeHotMusicSheetAdapter();
+        LinearSnapHelper hotTracklinearSnapHelper = new LinearSnapHelper();
+        hotTracklinearSnapHelper.attachToRecyclerView(mViewBinding.rvHotTrack);
+        HomeHotMusicSheetItemDecoration itemDecoration = new HomeHotMusicSheetItemDecoration(0, 0, 0, SizeUtils.dp2px(12), 0);
+        mViewBinding.rvHotTrack.addItemDecoration(itemDecoration);
+        mViewBinding.rvHotTrack.setLayoutManager(musicSheetManager);
+        mViewBinding.rvHotTrack.setAdapter(mHomeHotMusicSheetAdapter);
+        initListener();
+    }
+
+    private void initListener() {
+        mViewBinding.viewSearchBg.setOnClickListener(this);
+        mViewBinding.tvHotAlbumMore.setOnClickListener(this);
+        mViewBinding.tvHotTrackMore.setOnClickListener(this);
+        mViewBinding.tvRecommendTrackMore.setOnClickListener(this);
+        mViewBinding.tvLatestTrackMore.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            refreshLayout.finishRefresh();
+            refresh();
+        });
+
+        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();
+        });
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        refresh();
+    }
+
+    private void refresh() {
+        presenter.userAccountPage();
+        presenter.getHotMusicSheetList();
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+
+        if (id == R.id.view_search_bg) {
+            //搜索
+            WebStartHelper.startSearch();
+            return;
+        }
+        if (id == R.id.tv_hot_album_more) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            //热门专辑
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.STUDENT_MUSIC_ALBUM)
+                    .navigation();
+            return;
+        }
+        if (id == R.id.tv_hot_track_more) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            //热门曲目更多
+            WebStartHelper.startHotMusicSheetList();
+            return;
+        }
+        if (id == R.id.tv_recommend_track_more) {
+            //推荐曲目 最新曲目更多
+            showRecommendMenuDialog();
+            return;
+        }
+
+        if (id == R.id.tv_latest_track_more) {
+            //推荐曲目 最新曲目更多
+            WebStartHelper.startHotMusicSheetList();
+            return;
+        }
+    }
+
+    private void showRecommendMenuDialog() {
+        RecommendMoreMenuDialog recommendMoreMenuDialog = new RecommendMoreMenuDialog(getContext());
+        recommendMoreMenuDialog.setOnEventListener(new RecommendMoreMenuDialog.OnEventListener() {
+            @Override
+            public void onClickMore() {
+                WebStartHelper.startHotMusicSheetList();
+            }
+
+            @Override
+            public void onReduceRecommend() {
+                mViewBinding.clRecommendTrack.setVisibility(View.GONE);
+            }
+        });
+        recommendMoreMenuDialog.show();
+    }
+
+
+    @Override
+    public void hotAlbumListSuccess(HotAlbumBean homeHotAlbumListBean) {
+        if (isDetached() || homeHotAlbumListBean == null) {
+            return;
+        }
+        if (mAlbumAdapter != null) {
+            if (homeHotAlbumListBean.rows != null && homeHotAlbumListBean.rows.size() > 0) {
+                mViewBinding.clHotAlbum.setVisibility(View.VISIBLE);
+                mAlbumAdapter.setNewInstance(homeHotAlbumListBean.rows);
+            } else {
+                mViewBinding.clHotAlbum.setVisibility(View.GONE);
+            }
+        }
+    }
+
+    @Override
+    public void getHotMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean) {
+        if (isDetached() || homeHotMusicSheetBean == null) {
+            return;
+        }
+        //推荐曲目
+        if (homeHotMusicSheetBean.topMusicSheet != null && homeHotMusicSheetBean.topMusicSheet.size() > 0) {
+            mViewBinding.clRecommendTrack.setVisibility(View.VISIBLE);
+            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.topMusicSheet);
+            if (mRecommendAdapter != null) {
+                mRecommendAdapter.setNewInstance(itemBeans);
+            }
+        } else {
+            mViewBinding.clRecommendTrack.setVisibility(View.GONE);
+        }
+
+        //最新曲目
+        if (homeHotMusicSheetBean.newMusicSheet != null && homeHotMusicSheetBean.newMusicSheet.size() > 0) {
+            mViewBinding.clLatestTrack.setVisibility(View.VISIBLE);
+            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.newMusicSheet);
+            if (mLatestAdapter != null) {
+                mLatestAdapter.setNewInstance(itemBeans);
+            }
+        } else {
+            mViewBinding.clLatestTrack.setVisibility(View.GONE);
+        }
+
+        //最热曲目
+        if (homeHotMusicSheetBean.hotMusicSheet != null && homeHotMusicSheetBean.hotMusicSheet.size() > 0) {
+            mViewBinding.clHotTrack.setVisibility(View.VISIBLE);
+            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.hotMusicSheet);
+            if (mHomeHotMusicSheetAdapter != null) {
+                mHomeHotMusicSheetAdapter.setNewInstance(itemBeans);
+            }
+        } else {
+            mViewBinding.clHotTrack.setVisibility(View.GONE);
+        }
+    }
+
+    private ArrayList<HomeHotMusicSheetItemBean> formatMusicSheetData(List<HomeHotMusicSheetBean.MusicSheetBean> rows) {
+        ArrayList<HomeHotMusicSheetItemBean> itemBeans = new ArrayList<>();
+        if (rows != null && rows.size() > 0) {
+            mViewBinding.clHotTrack.setVisibility(View.VISIBLE);
+            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);
+            }
+        }
+        return itemBeans;
+    }
+}

+ 389 - 0
student/src/main/res/layout/fg_music_hall_layout.xml

@@ -0,0 +1,389 @@
+<?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="match_parent">
+
+    <View
+        android:id="@+id/view_top_bg"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:background="@color/white"
+        app:layout_constraintBottom_toBottomOf="@+id/top_logo_help_line"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <View
+        android:id="@+id/view_divide_line2"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/color_f9f9f9"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/view_top_bg"
+        app:layout_constraintLeft_toLeftOf="parent" />
+
+    <View
+        android:id="@+id/view_status_bar"
+        android:layout_width="match_parent"
+        android:layout_height="1px"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_logo"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="14dp"
+        android:src="@drawable/icon_home_top_logo"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_status_bar" />
+
+    <View
+        android:id="@+id/top_logo_help_line"
+        android:layout_width="1px"
+        android:layout_height="1px"
+        android:layout_marginTop="10dp"
+        android:orientation="horizontal"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/iv_logo" />
+
+    <View
+        android:id="@+id/view_search_bg"
+        android:layout_width="0dp"
+        android:layout_height="30dp"
+        android:layout_marginStart="17dp"
+        android:layout_marginEnd="17dp"
+        android:background="@drawable/shape_f6f6f6_17dp"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
+        app:layout_constraintLeft_toRightOf="@+id/iv_logo"
+        app:layout_constraintRight_toLeftOf="@+id/iv_scan"
+        app:layout_constraintTop_toTopOf="@+id/iv_logo" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="17dp"
+        android:src="@drawable/icon_home_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+
+    <TextView
+        android:id="@+id/tv_search_tip"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingStart="16dp"
+        android:text="搜索你喜欢的内容"
+        android:textColor="@color/color_cccccc"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_search_icon"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintTop_toTopOf="@+id/iv_search_icon" />
+
+    <ImageView
+        android:id="@+id/iv_scan"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:padding="8dp"
+        android:src="@drawable/icon_scan"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
+        app:layout_constraintRight_toLeftOf="@+id/im_message"
+        app:layout_constraintTop_toTopOf="@+id/iv_logo" />
+
+    <ImageView
+        android:id="@+id/im_message"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="@dimen/dp_14"
+        android:padding="8dp"
+        android:visibility="gone"
+        android:src="@drawable/icon_top_message"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/iv_logo" />
+
+    <View
+        android:id="@+id/view_unread_message"
+        android:layout_width="@dimen/dp_7"
+        android:layout_height="@dimen/dp_7"
+        android:layout_marginTop="5dp"
+        android:layout_marginRight="5dp"
+        android:background="@drawable/bg_red_ovil"
+        android:visibility="gone"
+        app:layout_constraintRight_toRightOf="@+id/im_message"
+        app:layout_constraintTop_toTopOf="@+id/im_message"
+        tools:visibility="gone" />
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_top_bg"
+        app:srlEnableLoadMore="false">
+
+        <androidx.core.widget.NestedScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:paddingBottom="12dp"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_hot_album"
+                    android:layout_marginTop="12dp"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:visibility="visible"
+                    app:layout_constraintTop_toTopOf="parent">
+
+                    <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" />
+
+                    <TextView
+                        android:id="@+id/tv_hot_album"
+                        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_album_line"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_hot_album_more"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="@dimen/dp_14"
+                        android:background="@drawable/shape_1a2dc7aa_10dp"
+                        android:drawableEnd="@drawable/icon_arrow_right_green"
+                        android:drawablePadding="5dp"
+                        android:gravity="center"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="5dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_2dc7aa"
+                        android:textSize="@dimen/sp_12"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
+                        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_recommend_track"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_18"
+                    android:visibility="gone"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_hot_album"
+                    tools:visibility="visible">
+
+                    <View
+                        android:id="@+id/tv_recommend_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_recommend_track"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_recommend_track" />
+
+                    <TextView
+                        android:id="@+id/tv_recommend_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_recommend_track_line"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:id="@+id/tv_recommend_track_more"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="@dimen/dp_14"
+                        android:gravity="center"
+                        android:src="@drawable/icon_more_point"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_recommend_track"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_recommend_track" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_recommend_track"
+                        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_recommend_track" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_latest_track"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_18"
+                    android:visibility="gone"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_recommend_track"
+                    tools:visibility="visible">
+
+                    <View
+                        android:id="@+id/tv_latest_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_latest_track"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_latest_track" />
+
+                    <TextView
+                        android:id="@+id/tv_latest_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_latest_track_line"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_latest_track_more"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="@dimen/dp_14"
+                        android:background="@drawable/shape_1a2dc7aa_10dp"
+                        android:drawableEnd="@drawable/icon_arrow_right_green"
+                        android:drawablePadding="5dp"
+                        android:gravity="center"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="5dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_2dc7aa"
+                        android:textSize="@dimen/sp_12"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_latest_track"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_latest_track" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_latest_track"
+                        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_latest_track" />
+
+                </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_30"
+                    android:visibility="gone"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_latest_track"
+                    tools:visibility="visible">
+
+                    <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_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_1a2dc7aa_10dp"
+                        android:drawableEnd="@drawable/icon_arrow_right_green"
+                        android:drawablePadding="5dp"
+                        android:gravity="center"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="5dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_2dc7aa"
+                        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: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_track" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+        </androidx.core.widget.NestedScrollView>
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>