Quellcode durchsuchen

增加老师端新主页

Pq vor 8 Monaten
Ursprung
Commit
e8bad9d48b
28 geänderte Dateien mit 1552 neuen und 38 gelöschten Zeilen
  1. 0 0
      BaseLibrary/src/main/res/drawable/shape_border_f5f5f5_1dp_10dp.xml
  2. BIN
      student/src/main/res/drawable-xhdpi/icon_home_notice_arrow.png
  3. BIN
      student/src/main/res/drawable-xxhdpi/icon_home_notice_arrow.png
  4. 1 1
      student/src/main/res/layout/fg_new_home_v2_layout.xml
  5. 1 3
      student/src/main/res/layout/fragment_home_menu.xml
  6. 1 0
      teacher/src/main/java/com/cooleshow/teacher/bean/HomeLiveAndVideoBean.java
  7. 13 1
      teacher/src/main/java/com/cooleshow/teacher/bean/HomeMenuBean.java
  8. 11 0
      teacher/src/main/java/com/cooleshow/teacher/constants/HomeMenuConstants.java
  9. 18 2
      teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeMenuFragment.java
  10. 2 20
      teacher/src/main/java/com/cooleshow/teacher/ui/main/MainActivity.java
  11. 1 0
      teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragment.java
  12. 819 0
      teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragmentV2.java
  13. BIN
      teacher/src/main/res/drawable-xhdpi/icon_home_entry_doing.png
  14. BIN
      teacher/src/main/res/drawable-xhdpi/icon_home_menu_tenant_course.png
  15. BIN
      teacher/src/main/res/drawable-xhdpi/icon_home_notice_arrow.png
  16. BIN
      teacher/src/main/res/drawable-xhdpi/icon_home_un_certification.png
  17. BIN
      teacher/src/main/res/drawable-xhdpi/small_alarm_clock_green.png
  18. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_cert_complete.png
  19. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_entry_doing.png
  20. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_menu_tenant_course.png
  21. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_notice_arrow.png
  22. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_un_certification.png
  23. BIN
      teacher/src/main/res/drawable-xxhdpi/small_alarm_clock_green.png
  24. 4 1
      teacher/src/main/res/drawable/bg_red_8dp_border_1dp.xml
  25. 672 0
      teacher/src/main/res/layout/fg_new_home_v2_layout.xml
  26. 2 4
      teacher/src/main/res/layout/fragment_home_menu.xml
  27. 6 6
      teacher/src/main/res/layout/layout_home_menu_item.xml
  28. 1 0
      teacher/src/main/res/values/colors.xml

+ 0 - 0
student/src/main/res/drawable/shape_border_f5f5f5_1dp_10dp.xml → BaseLibrary/src/main/res/drawable/shape_border_f5f5f5_1dp_10dp.xml


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


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


+ 1 - 1
student/src/main/res/layout/fg_new_home_v2_layout.xml

@@ -438,7 +438,7 @@
                                     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"
+                                    android:src="@drawable/icon_home_notice_arrow"
                                     app:layout_constraintBottom_toBottomOf="parent"
                                     app:layout_constraintRight_toRightOf="parent"
                                     app:layout_constraintTop_toTopOf="parent" />

+ 1 - 3
student/src/main/res/layout/fragment_home_menu.xml

@@ -3,9 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="160dp"
-    android:orientation="horizontal"
-    android:paddingLeft="@dimen/dp_10"
-    android:paddingRight="@dimen/dp_10">
+    android:orientation="horizontal">
 
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/rv_menu"

+ 1 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/HomeLiveAndVideoBean.java

@@ -95,6 +95,7 @@ public class HomeLiveAndVideoBean {
         public String courseGroupName;
         public long courseId;
         public String courseStartTime;
+        public String courseEndTime;
         public String courseType;
         public String realName;
         public String status;

+ 13 - 1
teacher/src/main/java/com/cooleshow/teacher/bean/HomeMenuBean.java

@@ -253,6 +253,15 @@ public class HomeMenuBean {
         public String updateName;
         public String updateTime;
         public String videoCoverImage;
+        public int coverImageRes;
+
+
+        public static ItemBean createByLocal(String tag,int drawRes){
+            ItemBean bean =new ItemBean();
+            bean.linkUrl = tag;
+            bean.coverImageRes =drawRes;
+            return bean;
+        }
 
         @Override
         public int describeContents() {
@@ -288,6 +297,7 @@ public class HomeMenuBean {
             dest.writeString(this.updateName);
             dest.writeString(this.updateTime);
             dest.writeString(this.videoCoverImage);
+            dest.writeInt(this.coverImageRes);
         }
 
         public void readFromParcel(Parcel source) {
@@ -318,6 +328,7 @@ public class HomeMenuBean {
             this.updateName = source.readString();
             this.updateTime = source.readString();
             this.videoCoverImage = source.readString();
+            this.coverImageRes = source.readInt();
         }
 
         public ItemBean() {
@@ -351,9 +362,10 @@ public class HomeMenuBean {
             this.updateName = in.readString();
             this.updateTime = in.readString();
             this.videoCoverImage = in.readString();
+            this.coverImageRes = in.readInt();
         }
 
-        public static final Parcelable.Creator<ItemBean> CREATOR = new Parcelable.Creator<ItemBean>() {
+        public static final Creator<ItemBean> CREATOR = new Creator<ItemBean>() {
             @Override
             public ItemBean createFromParcel(Parcel source) {
                 return new ItemBean(source);

+ 11 - 0
teacher/src/main/java/com/cooleshow/teacher/constants/HomeMenuConstants.java

@@ -0,0 +1,11 @@
+package com.cooleshow.teacher.constants;
+
+/**
+ * Author by pq, Date on 2024/11/28.
+ */
+public class HomeMenuConstants {
+    public static final String NATIVE_METRONOME = "native-metronome";//调音器
+    public static final String NATIVE_INSTITUTIONAL_COURSE = "native-InstitutionaCourse";//机构教程
+    public static final String NATIVE_HOMEPAGE = "native-homepage";//个人主页
+    public static final String NATIVE_HOMEWORK = "native-homework";//作业
+}

+ 18 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeMenuFragment.java

@@ -11,8 +11,10 @@ import com.chad.library.adapter.base.listener.OnItemClickListener;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseFragment;
+import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.teacher.adapter.HomeMenuItemAdapter;
 import com.cooleshow.teacher.bean.HomeMenuBean;
+import com.cooleshow.teacher.constants.HomeMenuConstants;
 import com.cooleshow.teacher.databinding.FragmentHomeMenuBinding;
 
 import java.io.Serializable;
@@ -53,7 +55,7 @@ public class HomeMenuFragment extends BaseFragment<FragmentHomeMenuBinding> {
             itemBeanList = getArguments().getParcelableArrayList("itemBeanList");
         }
         RecyclerView rvMenu = mViewBinding.rvMenu;
-        GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 4);
+        GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 5);
         rvMenu.setLayoutManager(gridLayoutManager);
         HomeMenuItemAdapter addPhotoListAdapter = new HomeMenuItemAdapter();
         rvMenu.setAdapter(addPhotoListAdapter);
@@ -64,10 +66,24 @@ public class HomeMenuFragment extends BaseFragment<FragmentHomeMenuBinding> {
                 if (position < addPhotoListAdapter.getData().size()) {
                     HomeMenuBean.ItemBean item = (HomeMenuBean.ItemBean) adapter.getItem(position);
                     if (!TextUtils.isEmpty(item.linkUrl)) {
-                        if (item.linkUrl.contains("native-metronome")) {
+                        if (item.linkUrl.contains(HomeMenuConstants.NATIVE_METRONOME)) {
                             ARouter.getInstance().build(RouterPath.MusicTuner.MUSIC_TUNER_PAGE).navigation();
                             return;
                         }
+                        if (item.linkUrl.contains(HomeMenuConstants.NATIVE_INSTITUTIONAL_COURSE)) {
+                            WebStartHelper.startTrainTools();
+                            return;
+                        }
+                        if (item.linkUrl.contains(HomeMenuConstants.NATIVE_HOMEPAGE)) {
+                            ARouter.getInstance().build(RouterPath.MineCenter.HOME_PAGE)
+                                    .navigation();
+                            return;
+                        }
+                        if (item.linkUrl.contains(HomeMenuConstants.NATIVE_HOMEWORK)) {
+                            ARouter.getInstance().build(RouterPath.WorkCenter.TEACHER_WORK_HOMEWORK)
+                                    .navigation();
+                            return;
+                        }
                         ARouter.getInstance()
                                 .build(RouterPath.WebCenter.ACTIVITY_HTML)
                                 .withString(WebConstants.WEB_URL, item.linkUrl)

+ 2 - 20
teacher/src/main/java/com/cooleshow/teacher/ui/main/MainActivity.java

@@ -65,7 +65,7 @@ import static com.cooleshow.base.constanst.Constants.MAIN_PAGE_SELECT_POTION_KEY
 @Route(path = RouterPath.APPCenter.PATH_HOME)
 public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPresenter> implements MainContract.MainView {
     private ArrayList<Fragment> mFragments = new ArrayList<>();
-    private NewHomeFragment mHomeFragment;
+    private NewHomeFragmentV2 mHomeFragment;
     private MineFragment mMineFragment;
     private MallFragment shopMallFragment;
     private TextView tvMsgCount;
@@ -155,7 +155,7 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
         shopMallFragment = new MallFragment();
         mChatFragment = new ChatFragment();
         mMineFragment = new MineFragment();
-        mHomeFragment = new NewHomeFragment();
+        mHomeFragment = new NewHomeFragmentV2();
         mFragments.add(mHomeFragment);
         mFragments.add(courseTableFragment);
         mFragments.add(mChatFragment);
@@ -238,24 +238,6 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
                 IMCenter.getInstance().loginIM(this, imUserId, userIMToken);
             }
 
-
-//            if (!TextUtils.isEmpty(userIMToken)) {
-//                RongIMClient.ConnectionStatusListener.ConnectionStatus currentConnectionStatus = RongIMClient.getInstance().getCurrentConnectionStatus();
-//                if (currentConnectionStatus != RongIMClient.ConnectionStatusListener.ConnectionStatus.CONNECTED) {
-//                    LogUtils.i("pq", "im connect:" + userIMToken);
-//                    IMManager.getInstance().login(userIMToken, new ResultCallback<String>() {
-//                        @Override
-//                        public void onSuccess(String s) {
-//                            LogUtils.i("pq", "im connect success:" + s);
-//                        }
-//
-//                        @Override
-//                        public void onFail(int errorCode, String errorStr) {
-//                            LogUtils.i("pq", "im connect fail:" + errorStr + "-errorCode:" + errorCode);
-//                        }
-//                    });
-//                }
-//            }
         }
     }
 

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

@@ -85,6 +85,7 @@ import androidx.viewpager.widget.ViewPager;
 /**
  * Author by pq, Date on 2022/8/8.
  */
+@Deprecated
 public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener {
     public static final int MAX_HOT_MUSIC_LIST_PAGE = 4;//热门曲目一页最大条数
     public static final int MAX_GOOD_MUSIC_LIST_PAGE = 4;//精品曲目一页最大条数

+ 819 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragmentV2.java

@@ -0,0 +1,819 @@
+package com.cooleshow.teacher.ui.main;
+
+import android.content.Intent;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.bumptech.glide.Glide;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.constanst.EVipType;
+import com.cooleshow.base.constanst.EventConstants;
+import com.cooleshow.base.event.RefreshUserStatusEvent;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.JumpUtils;
+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.base.utils.helper.WebStartHelper;
+import com.cooleshow.base.widgets.dialog.AwardTipDialog;
+import com.cooleshow.base.widgets.dialog.RecommendMoreMenuDialog;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.adapter.HomeHotAlbumAdapter;
+import com.cooleshow.teacher.adapter.HomeHotMusicSheetAdapter;
+import com.cooleshow.teacher.adapter.HomeMenuPageAdapter;
+import com.cooleshow.teacher.bean.AwardStatusBean;
+import com.cooleshow.teacher.bean.CountOfUnreadBean;
+import com.cooleshow.teacher.bean.HelpCenterContentBean;
+import com.cooleshow.teacher.bean.HomeCountBean;
+import com.cooleshow.teacher.bean.HomeHotAlbumListBean;
+import com.cooleshow.teacher.bean.HomeHotMusicSheetBean;
+import com.cooleshow.teacher.bean.HomeHotMusicSheetItemBean;
+import com.cooleshow.teacher.bean.HomeLiveAndVideoBean;
+import com.cooleshow.teacher.bean.HomeMenuBean;
+import com.cooleshow.teacher.bean.TeachableInstrumentBean;
+import com.cooleshow.teacher.constants.CourseConstants;
+import com.cooleshow.teacher.constants.HomeMenuConstants;
+import com.cooleshow.teacher.constants.TeacherInfoConstants;
+import com.cooleshow.teacher.contract.HomeContract;
+import com.cooleshow.teacher.databinding.FgNewHomeV2LayoutBinding;
+import com.cooleshow.teacher.helper.EventHelper;
+import com.cooleshow.teacher.presenter.main.HomePresenter;
+import com.cooleshow.teacher.widgets.HomeHotAlbumItemDecoration;
+import com.cooleshow.teacher.widgets.HomeHotMusicSheetItemDecoration;
+import com.cooleshow.teacher.widgets.dialog.BadgeDesDialog;
+import com.cooleshow.teacher.widgets.dialog.HomeCertTipDialog;
+import com.cooleshow.usercenter.bean.TeacherUserInfo;
+import com.cooleshow.usercenter.helper.UserHelper;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
+import com.youth.banner.adapter.BannerImageAdapter;
+import com.youth.banner.config.IndicatorConfig;
+import com.youth.banner.holder.BannerImageHolder;
+import com.youth.banner.indicator.RectangleIndicator;
+import com.youth.banner.listener.OnBannerListener;
+
+import org.greenrobot.eventbus.EventBus;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.LinearSnapHelper;
+import androidx.viewpager.widget.ViewPager;
+
+/**
+ * Author by pq, Date on 2022/8/8.
+ */
+public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener {
+    public static int MAX_NUM_FOR_TOP_MENU = 10;//金刚位一页个数
+    public static final int MAX_HOT_MUSIC_LIST_PAGE = 4;//热门曲目一页最大条数
+    public static final int MAX_GOOD_MUSIC_LIST_PAGE = 4;//精品曲目一页最大条数
+    public static final int SELECT_SUBJECT_REQUEST_CODE = 1001;//获取乐器筛选条件
+    public static final String STYLE_TYPE = "STYLE";
+    public static final String VIDEON_TYPE = "VIDEO";
+    public static final String LIVE_TYPE = "LIVE";
+    public static final String MUSIC_TYPE = "MUSIC";
+    private long noticeId = 0;
+    private HomeLiveAndVideoBean.RecentCoursesBean mRecentCourses;
+    private ArrayList<Fragment> fragments = new ArrayList();
+    private HomeMenuPageAdapter menuAdapter;
+    private HomeHotAlbumAdapter mAlbumAdapter;
+    private HomeHotMusicSheetAdapter mHomeHotMusicSheetAdapter;
+    private ArrayList<HomeMenuBean.BannerBean> mBannerList = new ArrayList<>();
+    private BannerImageAdapter mBannerImageAdapter;
+    private int teacherFlag = 0;//教资认证
+    private int degreeFlag = 0;//老师学历认证
+    private String entryStatus = "";//老师认证状态
+    private SmartRefreshLayout refreshLayout;
+    private HomeHotMusicSheetAdapter mRecommendAdapter;
+    private HomeHotMusicSheetAdapter mLatestAdapter;
+    private String currentSubjectId = "";
+    private int indicatorWidth = 0;//金刚位indicator宽度
+    private int tenantAlbumStatus = 0;
+
+    @Override
+    protected void initView(View rootView) {
+        Utils.setHeadView(mViewBinding.viewStatusBar, requireContext(), 0);
+        refreshLayout = mViewBinding.refreshLayout;
+        indicatorWidth = SizeUtils.dp2px(18);
+    }
+
+    @Override
+    protected void initData() {
+        initMenu();
+        LinearLayoutManager manager = new LinearLayoutManager(getContext());
+        manager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mViewBinding.rvHotAlbum.setLayoutManager(manager);
+        mAlbumAdapter = new HomeHotAlbumAdapter();
+        HomeHotAlbumItemDecoration hotAlbumItemDecoration = new HomeHotAlbumItemDecoration(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 recommendSnapHelper = new LinearSnapHelper();
+        recommendSnapHelper.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 latestTrackSnapHelper = new LinearSnapHelper();
+        latestTrackSnapHelper.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 hotTrackSnapHelper = new LinearSnapHelper();
+        hotTrackSnapHelper.attachToRecyclerView(mViewBinding.rvHotTrack);
+        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);
+        mBannerImageAdapter = new BannerImageAdapter<HomeMenuBean.BannerBean>(mBannerList) {
+            @Override
+            public void onBindView(BannerImageHolder holder, HomeMenuBean.BannerBean data, int position, int size) {
+                Glide.with(holder.imageView)
+                        .load(data.coverImage)
+                        .thumbnail(Glide.with(holder.itemView).load(com.cooleshow.base.R.drawable.bg_video_placeholder))//加载成功前显示一个loading的加载
+                        //.apply(RequestOptions.bitmapTransform(new RoundedCorners(30)))  //设置图片圆角
+                        .into(holder.imageView);
+            }
+        };
+        //banner自带图片轮播的适配器
+        mViewBinding.banner.setAdapter(mBannerImageAdapter, true);
+        initListener();
+    }
+
+
+    private void initMenu() {
+        if (menuAdapter == null) {
+            menuAdapter = new HomeMenuPageAdapter(getChildFragmentManager());
+            menuAdapter.setFragments(fragments);
+        }
+        mViewBinding.viewpagerMenu.setAdapter(menuAdapter);
+    }
+
+    private void initListener() {
+        mViewBinding.ivScan.setOnClickListener(this);
+        mViewBinding.imMessage.setOnClickListener(this);
+        mViewBinding.flCourseEnter.setOnClickListener(this);
+        mViewBinding.ivCert.setOnClickListener(this);
+        mViewBinding.bgAnnouncement.setOnClickListener(this);
+        mViewBinding.tvHotAlbumMore.setOnClickListener(this);
+        mViewBinding.tvHotTrackMore.setOnClickListener(this);
+        mViewBinding.tvRecommendTrackMore.setOnClickListener(this);
+        mViewBinding.tvLatestTrackMore.setOnClickListener(this);
+        mViewBinding.tvCurrentSubject.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            mViewBinding.refreshLayout.finishRefresh();
+            presenter.queryCountOfUnread();
+            presenter.queryLiveAndVideo();
+            getUserInfo();
+        });
+
+        mViewBinding.banner.addBannerLifecycleObserver(this)//添加生命周期观察者
+                .setIntercept(true) //是否要拦截事件
+                .isAutoLoop(true)
+                .setIndicatorGravity(IndicatorConfig.Direction.RIGHT)
+//                .removeIndicator()
+                .setIndicator(new RectangleIndicator(getContext())) //圆形指示器 还支持条形指示器等
+                .setOnBannerListener(new OnBannerListener<HomeMenuBean.BannerBean>() {
+                    @Override
+                    public void OnBannerClick(HomeMenuBean.BannerBean item, int position) {
+                        if (!TextUtils.isEmpty(item.linkUrl)) {
+                            if (TextUtils.equals(item.linkType, "OUT")) {
+                                JumpUtils.openSystemBrowser(getContext(), item.linkUrl);
+                                return;
+                            }
+                            ARouter.getInstance()
+                                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                                    .withString(WebConstants.WEB_URL, item.linkUrl)
+                                    .navigation();
+                        }
+                    }
+                });
+
+        mAlbumAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                if (position < mAlbumAdapter.getData().size()) {
+                    HomeHotAlbumListBean.RowsBean rowsBean = mAlbumAdapter.getData().get(position);
+                    if (rowsBean != null) {
+                        WebStartHelper.startHotAlbumDetail(rowsBean.id);
+                    }
+                }
+            }
+        });
+
+        mViewBinding.viewpagerMenu.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+                mViewBinding.indicatorMainLine.setTranslationX(indicatorWidth * (position + positionOffset));
+            }
+
+            @Override
+            public void onPageSelected(int position) {
+
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int state) {
+
+            }
+        });
+    }
+
+    private void getUserInfo() {
+        EventBus.getDefault().post(new RefreshUserStatusEvent(0));
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (presenter != null) {
+            presenter.queryCountOfUnread();
+            presenter.queryLiveAndVideo();
+            //获取领奖状态
+            presenter.getAwardStatus();
+        }
+    }
+
+    @Override
+    public void getHomeCountSuccess(HomeCountBean data) {
+
+    }
+
+
+    private void bindBanner(List<HomeMenuBean.BannerBean> bannerList) {
+        if (null == bannerList || bannerList.size() == 0) {
+            mViewBinding.banner.setVisibility(View.GONE);
+            return;
+        }
+        mViewBinding.banner.setVisibility(View.VISIBLE);
+        mBannerList.clear();
+        mBannerList.addAll(bannerList);
+        if (mBannerImageAdapter != null) {
+            mBannerImageAdapter.notifyDataSetChanged();
+        }
+    }
+
+    @Override
+    public void helpCenterContentListSuccess(HelpCenterContentBean data) {
+        if (data != null && data.rows != null && data.rows.size() > 0) {
+            mViewBinding.tvNoticeContent.setText(data.rows.get(0).title);
+            noticeId = data.rows.get(0).id;
+            if (mRecentCourses != null) {
+                //有进入课程提示
+                mViewBinding.bgAnnouncement.setVisibility(View.VISIBLE);
+            } else {
+                mViewBinding.bgAnnouncement.setVisibility(View.GONE);
+            }
+        } else {
+            mViewBinding.bgAnnouncement.setVisibility(View.GONE);
+        }
+    }
+
+
+    @Override
+    public void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data) {
+        if (data != null && data.size() > 0) {
+            mViewBinding.viewUnreadMessage.setVisibility(View.VISIBLE);
+        } else {
+            mViewBinding.viewUnreadMessage.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void queryLiveAndVideoSuccess(HomeLiveAndVideoBean bean) {
+        if (bean == null) {
+            return;
+        }
+        mRecentCourses = bean.recentCourses;
+        presenter.helpCenterContentList();
+        mViewBinding.flCourseEnter.setVisibility(mRecentCourses != null ? View.VISIBLE : View.GONE);
+        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");
+                String endTimeText = TimeUtils.date2String(TimeUtils.getDate(mRecentCourses.courseEndTime), "HH:mm");
+                mViewBinding.tvLiveTime.setText(String.format("今日 %s-%s", timeText, endTimeText));
+            } else {
+                String startTimeText = TimeUtils.date2String(
+                        TimeUtils.getDate(mRecentCourses.courseStartTime),
+                        "yyyy-MM-dd HH:mm"
+                );
+                String endTimeText = TimeUtils.date2String(TimeUtils.getDate(mRecentCourses.courseEndTime), "yyyy-MM-dd HH:mm");
+                mViewBinding.tvLiveTime.setText(startTimeText + "-" + endTimeText);
+            }
+        }
+    }
+
+    /**
+     * 跳转直播课详情页面
+     *
+     * @param
+     */
+    private void gotoCourseDetail(HomeLiveAndVideoBean.RecentCoursesBean bean) {
+        if (bean == null) {
+            return;
+        }
+
+        if (TextUtils.equals(bean.courseType, CourseConstants.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();
+            return;
+        }
+        if (TextUtils.equals(bean.courseType, CourseConstants.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))
+                    .withString(CourseConstants.STUDENT_ID, bean.studentId.toString())
+                    .navigation();
+            return;
+        }
+
+        if (TextUtils.equals(bean.courseType, CourseConstants.PIANO_ROOM_COURSE)) {
+            //琴房课 跳转详情页
+            ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
+                    .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
+                    .navigation();
+            return;
+        }
+    }
+
+    @Override
+    public void appHomeSuccess(HomeMenuBean homeMenuBean) {
+        if (isDetached()) {
+            return;
+        }
+        if (refreshLayout != null) {
+            refreshLayout.finishRefresh();
+        }
+        bindBanner(homeMenuBean.banner);
+        checkToRefreshTopMenu(homeMenuBean.appMenu);
+
+        if (getActivity() instanceof MainActivity) {
+            MainActivity mainActivity = (MainActivity) getActivity();
+            if (homeMenuBean.suspension != null && homeMenuBean.suspension.size() > 0) {
+                HomeMenuBean.ItemBean itemBean = homeMenuBean.suspension.get(0);
+                mainActivity.showFloatView(itemBean.linkUrl, itemBean.coverImage);
+            } else {
+                mainActivity.hideFloatView();
+            }
+        }
+    }
+
+
+    private void checkToRefreshTopMenu(List<HomeMenuBean.ItemBean> appMenu) {
+        //此业务需要关联userInfo tenantAlbumStatus相关字段来控制是否添加机构教程入口
+        checkIsAddTenantMenu(appMenu);
+        initHomeMenu(appMenu);
+    }
+
+    private void checkIsAddTenantMenu(List<HomeMenuBean.ItemBean> menuList) {
+        if (tenantAlbumStatus != 0) {
+            //添加机构教程入口
+            if (menuList == null) {
+                menuList = new ArrayList<>();
+            }
+            HomeMenuBean.ItemBean bean = HomeMenuBean.ItemBean.createByLocal(HomeMenuConstants.NATIVE_INSTITUTIONAL_COURSE, R.drawable.icon_home_menu_tenant_course);
+            menuList.add(bean);
+        }
+    }
+
+    private void initHomeMenu(List<HomeMenuBean.ItemBean> menuList) {
+        if (menuAdapter == null || mViewBinding.viewpagerMenu == null) {
+            return;
+        }
+
+        if (menuList != null && menuList.size() != 0) {
+            fragments.clear();
+            int count = menuList.size() / MAX_NUM_FOR_TOP_MENU;
+            if (menuList.size() % MAX_NUM_FOR_TOP_MENU > 0) {
+                count++;
+            }
+            for (int i = 0; i < count; i++) {
+                ArrayList<HomeMenuBean.ItemBean> dataList = new ArrayList<>();
+                for (int j = i * MAX_NUM_FOR_TOP_MENU; j < menuList.size() && j < (i + 1) * MAX_NUM_FOR_TOP_MENU; j++) {
+                    dataList.add(menuList.get(j));
+                }
+                fragments.add(HomeMenuFragment.newInstance(dataList));
+            }
+            if (fragments.size() == 0) {
+                mViewBinding.viewpagerMenu.setVisibility(View.GONE);
+                mViewBinding.rlIndicator.setVisibility(View.GONE);
+                return;
+            } else {
+                mViewBinding.viewpagerMenu.setVisibility(View.VISIBLE);
+                mViewBinding.rlIndicator.setVisibility(fragments.size() > 1 ? View.VISIBLE : View.GONE);
+            }
+            initIndicator();
+            menuAdapter.setFragments(fragments);
+            menuAdapter.notifyDataSetChanged();
+        } else {
+            fragments.clear();
+            menuAdapter.notifyDataSetChanged();
+            mViewBinding.viewpagerMenu.setVisibility(View.GONE);
+            mViewBinding.rlIndicator.setVisibility(View.GONE);
+        }
+    }
+
+    private void initIndicator() {
+        ViewGroup.LayoutParams params = mViewBinding.rlIndicator.getLayoutParams();
+        params.width = fragments.size() * indicatorWidth;
+        mViewBinding.rlIndicator.setLayoutParams(params);
+        mViewBinding.indicatorMainLine.setTranslationX(0);
+    }
+
+    @Override
+    public void getHotAlbumListSuccess(HomeHotAlbumListBean 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) {
+            int pageCount = 0;
+            int pageResult = rows.size() % 4;
+            if (pageResult == 0) {
+                pageCount = rows.size() / 4;
+            } else {
+                pageCount = (rows.size() / 4) + 1;
+            }
+            for (int i = 0; i < pageCount; i++) {
+                HomeHotMusicSheetItemBean hotMusicSheetItemBean = new HomeHotMusicSheetItemBean();
+                for (int k = i * 4; k < rows.size() && k < (i + 1) * 4; k++) {
+                    hotMusicSheetItemBean.sheetBeans.add(rows.get(k));
+                }
+                itemBeans.add(hotMusicSheetItemBean);
+            }
+        }
+        return itemBeans;
+    }
+
+    @Override
+    public void getAwardStatus(AwardStatusBean awardStatusBean) {
+        if (isDetached()) {
+            return;
+        }
+        if (awardStatusBean != null && TextUtils.equals(awardStatusBean.check, "1")) {
+            showAwardTipDialog();
+        }
+    }
+
+    private void showAwardTipDialog() {
+        if (UserHelper.getShowAwardDialogTipIsCompleted()) {
+            return;
+        }
+        AwardTipDialog awardTipDialog = new AwardTipDialog(getContext());
+        awardTipDialog.show();
+        UserHelper.setShowAwardDialogTipCompleted();
+    }
+
+    public void getTeacherInfoSuccess(TeacherUserInfo teacherUserInfo) {
+        if (teacherUserInfo == null) {
+            return;
+        }
+        if (isDetached() || !isAdded()) {
+            return;
+        }
+        if (mViewBinding == null || mViewBinding.tvTeacherName == null) {
+            return;
+        }
+        if (refreshLayout != null) {
+            refreshLayout.finishRefresh();
+        }
+        //处理声部
+        currentSubjectId = teacherUserInfo.getDefaultSubject();
+        mViewBinding.tvCurrentSubject.setText(!TextUtils.isEmpty(teacherUserInfo.defaultSubjectName) ? teacherUserInfo.defaultSubjectName : "全部");
+        refreshMusicData();
+        //昵称
+        if (teacherUserInfo != null) {
+            String teacherName = UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId);
+            mViewBinding.tvTeacherName.setEllipsize(TextUtils.TruncateAt.END);
+            if (teacherName.length() > 4) {
+                mViewBinding.tvTeacherName.setText(teacherName);
+            } else {
+                mViewBinding.tvTeacherName.setText(String.format("你好,%s", teacherName));
+            }
+            if (UserHelper.isTenantAccount(teacherUserInfo.getTenantId())) {
+                mViewBinding.flTenantName.setVisibility(View.VISIBLE);
+                mViewBinding.tvTenantName.setText(teacherUserInfo.getTenantName());
+            } else {
+                mViewBinding.flTenantName.setVisibility(View.GONE);
+            }
+        }
+        //VIP
+        handleVipStyle(teacherUserInfo);
+        //入驻状态
+        this.teacherFlag = teacherUserInfo.teacherFlag;
+        this.degreeFlag = teacherUserInfo.degreeFlag;
+        if (teacherUserInfo.degreeFlag == 1 && teacherUserInfo.teacherFlag == 1) {
+            mViewBinding.viewCertRedPoint.setVisibility(View.GONE);
+        } else {
+            if (TextUtils.equals(teacherUserInfo.entryStatus, TeacherInfoConstants.ENTRY_STATUS_PASS)) {
+                mViewBinding.viewCertRedPoint.setVisibility(View.VISIBLE);
+            } else {
+                mViewBinding.viewCertRedPoint.setVisibility(View.GONE);
+            }
+        }
+        this.entryStatus = teacherUserInfo.entryStatus;
+        mViewBinding.tvCertFailTip.setVisibility(View.GONE);
+        if (TextUtils.equals(teacherUserInfo.entryStatus, TeacherInfoConstants.ENTRY_STATUS_DOING)) {
+            //入驻审核中
+            mViewBinding.ivCert.setClickable(true);
+            mViewBinding.ivCert.setImageResource(R.drawable.icon_home_entry_doing);
+        } else if (TextUtils.equals(teacherUserInfo.entryStatus, TeacherInfoConstants.ENTRY_STATUS_PASS)) {
+            //入驻审核通过
+            mViewBinding.ivCert.setClickable(true);
+            mViewBinding.ivCert.setImageResource(R.drawable.icon_home_cert_complete);
+        } else if (TextUtils.equals(teacherUserInfo.entryStatus, TeacherInfoConstants.ENTRY_STATUS_UNPASS)) {
+            //未通过或者未申请
+            mViewBinding.tvCertFailTip.setVisibility(View.VISIBLE);
+            mViewBinding.ivCert.setClickable(true);
+            mViewBinding.ivCert.setImageResource(R.drawable.icon_home_un_certification);
+        } else {
+            //未申请
+            mViewBinding.ivCert.setClickable(true);
+            mViewBinding.ivCert.setImageResource(R.drawable.icon_home_un_certification);
+        }
+
+        //机构模式下专辑配置 不等于0为已配置 显示相应入口
+        tenantAlbumStatus = teacherUserInfo.getTenantAlbumStatus();
+        presenter.appHome();
+    }
+
+    private void handleVipStyle(TeacherUserInfo userInfo) {
+        try {
+            TeacherUserInfo.VipBean userVip = userInfo.getUserVip();
+            EVipType eVipType;
+            if (userVip == null || TextUtils.isEmpty(userVip.getVipType())) {
+                eVipType = EVipType.NOT_VIP;
+            } else {
+                eVipType = EVipType.valueOf(userVip.getVipType());
+            }
+            if (eVipType == EVipType.NOT_VIP) {
+                //非会员
+                mViewBinding.ivVip.setVisibility(View.GONE);
+            } else {
+                mViewBinding.ivVip.setVisibility(View.VISIBLE);
+                mViewBinding.ivVip.setImageResource(EVipType.getVipAvatarTag(eVipType));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    private boolean isEnableForBadge(String tag, String type) {
+        if (TextUtils.isEmpty(tag)) {
+            return false;
+        }
+        return tag.contains(type);
+    }
+
+    @Override
+    protected FgNewHomeV2LayoutBinding getLayoutView() {
+        return FgNewHomeV2LayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected HomePresenter createPresenter() {
+        return new HomePresenter();
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (UiUtils.isFastClick()) {
+            return;
+        }
+        if (id == R.id.fl_course_enter) {
+            if (mRecentCourses != null) {
+                gotoCourseDetail(mRecentCourses);
+            }
+            return;
+        }
+
+        if (id == R.id.iv_scan) {
+            //二维码扫描
+            ARouter.getInstance()
+                    .build(RouterPath.UserCenter.SCAN_QR_CODE)
+                    .navigation();
+            return;
+        }
+
+        if (id == R.id.im_message) {
+            //系统消息
+            ARouter.getInstance().build(RouterPath.MessageCenter.TEACHER_MESSAGE_MESSAGEBOX)
+                    .navigation();
+            //事件埋点->消息列表
+            EventHelper.addEvent(EventConstants.EVENT_ID_NOTIFICATION_FOR_TEACHER);
+            return;
+        }
+        if (id == R.id.iv_cert) {
+            //老师认证
+            if (TextUtils.equals(entryStatus, TeacherInfoConstants.ENTRY_STATUS_PASS)) {
+                showCertTipDialog();
+            } else {
+                ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_CERT)
+                        .navigation();
+            }
+            return;
+        }
+        if (id == R.id.bg_announcement || id == R.id.bg_announcement2) {
+            if (noticeId == 0) {
+                return;
+            }
+            //点击单条公告
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_DETAIL + noticeId)
+                    .navigation();
+            return;
+        }
+        if (id == R.id.tv_hot_album_more) {
+            //热门专辑更多
+            WebStartHelper.startHotAlbum();
+            return;
+        }
+        if (id == R.id.tv_hot_track_more) {
+            //热门曲目更多
+            WebStartHelper.startHotMusicSheetList();
+            return;
+        }
+        if (id == R.id.tv_recommend_track_more) {
+            //推荐曲目 最新曲目更多
+            showRecommendMenuDialog();
+            return;
+        }
+
+        if (id == R.id.tv_latest_track_more) {
+            //推荐曲目 最新曲目更多
+            WebStartHelper.startHotMusicSheetList();
+            return;
+        }
+        if (id == R.id.view_badge) {
+            showBadgeDialog();
+            return;
+        }
+
+        if (id == R.id.tv_current_subject) {
+            selectSubject();
+            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();
+    }
+
+
+    private void showCertTipDialog() {
+        HomeCertTipDialog homeCertTipDialog = new HomeCertTipDialog(getContext());
+        homeCertTipDialog.show();
+        homeCertTipDialog.setData(degreeFlag, teacherFlag);
+    }
+
+    private void showBadgeDialog() {
+        BadgeDesDialog badgeDesDialog = new BadgeDesDialog(getContext());
+        badgeDesDialog.show();
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == SELECT_SUBJECT_REQUEST_CODE) {
+            try {
+                List<TeachableInstrumentBean> selectTeachableInstrument = (List<TeachableInstrumentBean>) data.getSerializableExtra("selectTeachableInstrument");
+                if (selectTeachableInstrument != null && selectTeachableInstrument.size() > 0) {
+                    TeachableInstrumentBean teachableInstrumentBean = selectTeachableInstrument.get(0);
+                    currentSubjectId = String.valueOf(teachableInstrumentBean.id);
+                    mViewBinding.tvCurrentSubject.setText(teachableInstrumentBean.name);
+                    if (presenter != null) {
+                        //同步选中id
+                        presenter.syncSubjectFilter(currentSubjectId);
+                    }
+                    refreshMusicData();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private void selectSubject() {
+        ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
+                .withBoolean("isSingleSelect", true)
+                .navigation(getActivity(), SELECT_SUBJECT_REQUEST_CODE);
+    }
+
+    /**
+     * 刷新专辑和曲目数据
+     */
+    private void refreshMusicData() {
+        //热门专辑
+        presenter.getHotAlbumList(currentSubjectId);
+        //热门曲目
+        presenter.getHotMusicSheetList(currentSubjectId);
+    }
+}

BIN
teacher/src/main/res/drawable-xhdpi/icon_home_entry_doing.png


BIN
teacher/src/main/res/drawable-xhdpi/icon_home_menu_tenant_course.png


BIN
teacher/src/main/res/drawable-xhdpi/icon_home_notice_arrow.png


BIN
teacher/src/main/res/drawable-xhdpi/icon_home_un_certification.png


BIN
teacher/src/main/res/drawable-xhdpi/small_alarm_clock_green.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_home_cert_complete.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_home_entry_doing.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_home_menu_tenant_course.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_home_notice_arrow.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_home_un_certification.png


BIN
teacher/src/main/res/drawable-xxhdpi/small_alarm_clock_green.png


+ 4 - 1
teacher/src/main/res/drawable/bg_red_8dp_border_1dp.xml

@@ -5,7 +5,10 @@
         android:bottomRightRadius="8dp"
         android:topLeftRadius="8dp"
         android:topRightRadius="8dp" />
+
+    <solid android:color="#FFF5F2"/>
+
     <stroke
         android:width="1dp"
-        android:color="@color/white" />
+        android:color="#FF7852" />
 </shape>

+ 672 - 0
teacher/src/main/res/layout/fg_new_home_v2_layout.xml

@@ -0,0 +1,672 @@
+<?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">
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:paddingStart="14dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <View
+            android:id="@+id/view_status_bar"
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_teacher_name"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="24dp"
+            android:ellipsize="end"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:textColor="@color/color_1a1a1a"
+            android:textSize="@dimen/sp_22"
+            android:textStyle="bold"
+            app:layout_constraintHorizontal_bias="0"
+            app:layout_constraintHorizontal_chainStyle="packed"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toLeftOf="@+id/iv_vip"
+            app:layout_constraintTop_toBottomOf="@+id/view_status_bar"
+            app:layout_constraintWidth_default="wrap"
+            tools:text="您好,李老师您好,李老师您好,李老师" />
+
+        <ImageView
+            android:id="@+id/iv_vip"
+            android:layout_width="37dp"
+            android:layout_height="18dp"
+            android:layout_marginStart="2dp"
+            android:layout_marginEnd="6dp"
+            android:layout_marginBottom="2dp"
+            android:src="@drawable/icon_vip_enable"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+            app:layout_constraintLeft_toRightOf="@+id/tv_teacher_name"
+            app:layout_constraintRight_toLeftOf="@+id/iv_scan"
+            app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
+
+        <ImageView
+            android:id="@+id/iv_scan"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:padding="12dp"
+            android:src="@drawable/icon_scan_for_teacher"
+            android:visibility="visible"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+            app:layout_constraintRight_toLeftOf="@+id/im_message"
+            app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
+
+        <ImageView
+            android:id="@+id/im_message"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="@dimen/dp_17"
+            android:padding="8dp"
+            android:src="@drawable/icon_top_message"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
+
+        <View
+            android:id="@+id/view_unread_message"
+            android:layout_width="@dimen/dp_7"
+            android:layout_height="@dimen/dp_7"
+            android:layout_marginTop="6dp"
+            android:layout_marginRight="6dp"
+            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="visible" />
+
+        <FrameLayout
+            android:paddingBottom="6dp"
+            tools:visibility="visible"
+            android:visibility="gone"
+            android:id="@+id/fl_tenant_name"
+            android:layout_width="0dp"
+            android:layout_marginTop="11dp"
+            android:layout_height="wrap_content"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_teacher_name">
+
+            <TextView
+                android:id="@+id/tv_tenant_name"
+                android:layout_width="wrap_content"
+                android:layout_height="18dp"
+                android:background="@drawable/shape_12ffa673_border_ffbf9a_4dp"
+                android:paddingStart="5dp"
+                android:paddingEnd="5dp"
+                android:maxLines="1"
+                android:ellipsize="end"
+                android:textColor="@color/color_ff7b31"
+                android:textSize="@dimen/sp_12"
+                app:layout_constraintHorizontal_bias="0"
+                tools:text="星机构构武汉市小星星机构武汉市" />
+        </FrameLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+    <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/cs_header"
+        app:srlEnableLoadMore="false">
+
+        <androidx.core.widget.NestedScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/cs_header">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingBottom="20dp">
+
+                <View
+                    android:id="@+id/top_view_bg"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:background="@drawable/shape_white_18dp_bottom"
+                    app:layout_constraintBottom_toBottomOf="@+id/top_help_line"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+
+                <ImageView
+                    android:layout_marginStart="14dp"
+                    android:id="@+id/iv_cert"
+                    android:layout_width="wrap_content"
+                    android:layout_height="30dp"
+                    android:layout_marginEnd="25dp"
+                    android:adjustViewBounds="true"
+                    android:clickable="false"
+                    android:layout_marginTop="7dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    android:src="@drawable/icon_home_un_certification"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_cert_fail_tip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/bg_red_8dp_border_1dp"
+                    android:gravity="center"
+                    android:paddingStart="7dp"
+                    android:paddingTop="1dp"
+                    android:paddingEnd="7dp"
+                    android:paddingBottom="1dp"
+                    android:text="认证失败"
+                    android:textColor="@color/color_fb5e32"
+                    android:textSize="@dimen/sp_10"
+                    tools:visibility="visible"
+                    android:visibility="gone"
+                    app:layout_constraintCircle="@+id/iv_cert"
+                    app:layout_constraintCircleAngle="80"
+                    app:layout_constraintCircleRadius="75dp" />
+
+                <View
+                    android:id="@+id/view_cert_red_point"
+                    android:layout_width="8dp"
+                    android:layout_height="8dp"
+                    android:background="@drawable/shape_red_point"
+                    android:visibility="gone"
+                    app:layout_constraintRight_toRightOf="@+id/iv_cert"
+                    app:layout_constraintTop_toTopOf="@+id/iv_cert" />
+
+                <TextView
+                    android:id="@+id/tv_subject_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="14dp"
+                    android:text="声部:"
+                    android:textColor="@color/color_333333"
+                    android:textSize="@dimen/sp_14"
+                    app:layout_constraintRight_toLeftOf="@+id/tv_current_subject"
+                    app:layout_constraintBottom_toBottomOf="@+id/iv_cert"
+                    app:layout_constraintTop_toTopOf="@+id/iv_cert" />
+
+                <TextView
+                    android:layout_marginEnd="14dp"
+                    android:id="@+id/tv_current_subject"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:drawableRight="@drawable/icon_arrow_down2"
+                    android:drawablePadding="5dp"
+                    android:gravity="center"
+                    android:paddingTop="5dp"
+                    android:paddingBottom="5dp"
+                    android:textColor="@color/color_666666"
+                    android:textSize="@dimen/sp_14"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_subject_title"
+                    app:layout_constraintTop_toTopOf="@+id/tv_subject_title"
+                    tools:text="中音萨克斯" />
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/fl_course_enter"
+                    android:layout_width="match_parent"
+                    android:layout_height="70dp"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="16dp"
+                    android:layout_marginEnd="14dp"
+                    android:background="@drawable/shape_border_f5f5f5_1dp_10dp"
+                    android:visibility="gone"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/iv_cert"
+                    tools:visibility="visible">
+
+                    <TextView
+                        android:id="@+id/tv_live_title"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="16dp"
+                        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_green"
+                        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_2dc7aa"
+                        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" />
+
+                    <TextView
+                        android:layout_width="76dp"
+                        android:layout_height="26dp"
+                        android:layout_marginEnd="16dp"
+                        android:background="@drawable/shape_2dc7aa_13dp"
+                        android:gravity="center"
+                        android:includeFontPadding="false"
+                        android:text="进入教室"
+                        android:textColor="@color/white"
+                        android:textSize="@dimen/sp_14"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <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_gravity="right"
+                    app:banner_indicator_height="5dp"
+                    app:banner_indicator_marginBottom="8dp"
+                    app:banner_indicator_marginRight="12dp"
+                    app:banner_indicator_normal_color="@color/white"
+                    app:banner_indicator_normal_width="5dp"
+                    app:banner_indicator_selected_color="@color/white"
+                    app:banner_indicator_selected_width="12dp"
+                    app:banner_radius="10dp"
+                    app:layout_constraintTop_toBottomOf="@+id/fl_course_enter" />
+
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/bg_announcement"
+                    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/white"
+                    app:cardCornerRadius="10dp"
+                    app:cardElevation="0dp"
+                    tools:visibility="visible"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/banner">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        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_home_notice_arrow"
+                            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_top_menu"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="12dp"
+                    android:layout_marginEnd="14dp"
+                    android:visibility="visible"
+                    app:cardBackgroundColor="@color/white"
+                    app:cardCornerRadius="10dp"
+                    app:cardElevation="0dp"
+                    app:cardPreventCornerOverlap="true"
+                    app:cardUseCompatPadding="false"
+                    app:layout_constraintTop_toBottomOf="@+id/bg_announcement">
+
+                    <androidx.viewpager.widget.ViewPager
+                        android:id="@+id/viewpager_menu"
+                        android:layout_width="match_parent"
+                        android:layout_height="160dp"
+                        android:overScrollMode="never"
+                        android:scrollbars="none" />
+
+                    <FrameLayout
+                        android:id="@+id/rl_indicator"
+                        android:layout_width="wrap_content"
+                        android:layout_height="3dp"
+                        android:layout_gravity="center_horizontal|bottom"
+                        android:layout_marginBottom="5dp"
+                        android:background="@drawable/shape_d8d8d8_3dp"
+                        android:visibility="visible"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toBottomOf="@id/viewpager_menu">
+
+                        <View
+                            android:id="@+id/indicator_main_line"
+                            android:layout_width="18dp"
+                            android:layout_height="3dp"
+                            android:layout_centerVertical="true"
+                            android:background="@drawable/shape_2dc7aa_3dp" />
+                    </FrameLayout>
+                </androidx.cardview.widget.CardView>
+
+                <View
+                    android:id="@+id/top_help_line"
+                    android:layout_width="1px"
+                    android:layout_height="1px"
+                    app:layout_goneMarginTop="20dp"
+                    android:layout_marginTop="8dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/fl_top_menu" />
+
+                <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_20"
+                    android:visibility="gone"
+                    tools:visibility="visible"
+                    app:layout_constraintTop_toBottomOf="@+id/top_help_line">
+
+                    <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_17"
+                        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">
+
+                    <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_17"
+                        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:drawablePadding="5dp"
+                        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">
+
+                    <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_17"
+                        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_18"
+                    android:visibility="gone"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_latest_track">
+
+                    <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_17"
+                        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>

+ 2 - 4
teacher/src/main/res/layout/fragment_home_menu.xml

@@ -2,10 +2,8 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="horizontal"
-    android:paddingLeft="@dimen/dp_10"
-    android:paddingRight="@dimen/dp_10">
+    android:layout_height="160dp"
+    android:orientation="horizontal">
 
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/rv_menu"

+ 6 - 6
teacher/src/main/res/layout/layout_home_menu_item.xml

@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
+    android:layout_height="80dp"
     android:gravity="center"
+    android:paddingBottom="12dp"
     android:orientation="vertical">
 
     <ImageView
         android:id="@+id/im_pic"
-        android:layout_width="@dimen/dp_45"
-        android:layout_height="@dimen/dp_45" />
+        android:layout_width="@dimen/dp_50"
+        android:layout_height="@dimen/dp_50" />
 
     <TextView
+        android:layout_marginTop="1dp"
         android:id="@+id/tv_title"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="1dp"
-        android:includeFontPadding="false"
+        android:layout_height="17dp"
         android:textColor="@color/color_333333"
         android:textSize="@dimen/sp_12" />
 </LinearLayout>

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

@@ -8,4 +8,5 @@
     <color name="black">#FF000000</color>
     <color name="white">#FFFFFFFF</color>
     <color name="color_ff5160">#FF5160</color>
+    <color name="color_fb5e32">#FB5E32</color>
 </resources>