Explorar o código

修改学生端首页新版样式

Pq hai 6 meses
pai
achega
140023624d
Modificáronse 22 ficheiros con 1186 adicións e 453 borrados
  1. BIN=BIN
      BaseLibrary/src/main/assets/fonts/DIN_Alternate_Bold.ttf
  2. 22 0
      BaseLibrary/src/main/java/com/cooleshow/base/utils/UiUtils.java
  3. 2 0
      classRoom/src/main/res/values/colors.xml
  4. 2 0
      student/src/main/java/com/cooleshow/student/bean/HomeLiveAndVideoBean.java
  5. 9 0
      student/src/main/java/com/cooleshow/student/bean/VIPCourseGroupListBean.java
  6. 2 1
      student/src/main/java/com/cooleshow/student/constants/CommonConfig.java
  7. 1 0
      student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java
  8. 1 1
      student/src/main/java/com/cooleshow/student/ui/main/MainActivity.java
  9. 1 0
      student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragment.java
  10. 842 0
      student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragmentV2.java
  11. BIN=BIN
      student/src/main/res/drawable-xhdpi/bg_home_course_info.png
  12. BIN=BIN
      student/src/main/res/drawable-xhdpi/bg_home_practice_info.png
  13. BIN=BIN
      student/src/main/res/drawable-xhdpi/icon_home_course_info_arrow.png
  14. BIN=BIN
      student/src/main/res/drawable-xhdpi/icon_home_practice_info_arrow.png
  15. BIN=BIN
      student/src/main/res/drawable-xxhdpi/bg_home_course_info.png
  16. BIN=BIN
      student/src/main/res/drawable-xxhdpi/bg_home_practice_info.png
  17. BIN=BIN
      student/src/main/res/drawable-xxhdpi/icon_home_course_info_arrow.png
  18. BIN=BIN
      student/src/main/res/drawable-xxhdpi/icon_home_practice_info_arrow.png
  19. 5 0
      student/src/main/res/drawable/shape_border_f5f5f5_1dp_10dp.xml
  20. 295 449
      student/src/main/res/layout/fg_new_home_v2_layout.xml
  21. 1 1
      student/src/main/res/layout/fragment_home_menu.xml
  22. 3 1
      student/src/main/res/layout/layout_home_menu_item.xml

BIN=BIN
BaseLibrary/src/main/assets/fonts/DIN_Alternate_Bold.ttf


+ 22 - 0
BaseLibrary/src/main/java/com/cooleshow/base/utils/UiUtils.java

@@ -2,6 +2,7 @@ package com.cooleshow.base.utils;
 
 import android.app.Activity;
 import android.content.Context;
+import android.graphics.Paint;
 import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.Typeface;
@@ -440,4 +441,25 @@ public class UiUtils {
         drawableRight = isShow ? selectDrawable : R.drawable.icon_arrow_down;
         textView.setCompoundDrawablesWithIntrinsicBounds(0, 0, drawableRight, 0);
     }
+
+
+    public static void setCustomFont_DIN_Alternate_Bold(Context context, TextView... textView) {
+        if (context != null && context.getAssets() != null && textView != null) {
+            Typeface tf = Typeface.createFromAsset(context.getAssets(), "fonts/DIN_Alternate_Bold.ttf");
+            //设置字体
+            for (TextView view : textView) {
+                view.setTypeface(tf);
+            }
+        }
+    }
+
+    public static void setCustomFont_DIN_Alternate_Bold_for_paint(Context context, Paint... paints) {
+        if (context != null && context.getAssets() != null && paints != null) {
+            Typeface tf = Typeface.createFromAsset(context.getAssets(), "fonts/DIN_Alternate_Bold.ttf");
+            //设置字体
+            for (Paint paint : paints) {
+                paint.setTypeface(tf);
+            }
+        }
+    }
 }

+ 2 - 0
classRoom/src/main/res/values/colors.xml

@@ -24,6 +24,8 @@
     <color name="color_00b2a7">#00b2a7</color>
     <color name="color_333333">#333333</color>
     <color name="color_777777">#777777</color>
+    <color name="color_b98344">#B98344</color>
+    <color name="color_559199">#559199</color>
     <color name="white">#ffffff</color>
     <color name="text_green_2D">#2DC7AA</color>
     <color name="color_e6f3f5f5">#e6f3f5f5</color>

+ 2 - 0
student/src/main/java/com/cooleshow/student/bean/HomeLiveAndVideoBean.java

@@ -93,8 +93,10 @@ public class HomeLiveAndVideoBean {
         public String avatar;
         public long courseGroupId;
         public String courseGroupName;
+        public String courseName;
         public long courseId;
         public String courseStartTime;
+        public String courseEndTime;
         public String courseType;
         public String realName;
         public String status;

+ 9 - 0
student/src/main/java/com/cooleshow/student/bean/VIPCourseGroupListBean.java

@@ -117,6 +117,15 @@ public class VIPCourseGroupListBean {
         private String subjectId;
         private String subjectName;
         private String teacherName;
+        private String teacherAvatar;
+
+        public String getTeacherAvatar() {
+            return teacherAvatar;
+        }
+
+        public void setTeacherAvatar(String teacherAvatar) {
+            this.teacherAvatar = teacherAvatar;
+        }
 
         public String getTeacherName() {
             return teacherName;

+ 2 - 1
student/src/main/java/com/cooleshow/student/constants/CommonConfig.java

@@ -18,6 +18,7 @@ public class CommonConfig {
     }
 
     public static int getHomeMenuCount(Context context){
-        return QMUIDeviceHelper.isTablet(context) ? 7 : 5;
+//        return QMUIDeviceHelper.isTablet(context) ? 7 : 5;
+        return 5;
     }
 }

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

@@ -78,6 +78,7 @@ import java.util.TreeMap;
  * @author Ryan
  * 类说明:
  */
+@Deprecated
 public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener {
     private boolean isShowFlashPage = false;
     private String mCurrentShowNoticeId;

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

@@ -160,7 +160,7 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
         onTabClick(viewBinding.viewHome);
         HomePageAdapter homePageAdapter = new HomePageAdapter(this);
 //        mHomeFragment = new HomeFragment();
-        NewHomeFragment newHomeFragment = new NewHomeFragment();
+        NewHomeFragmentV2 newHomeFragment = new NewHomeFragmentV2();
         CourseTableFragment courseTableFragment = new CourseTableFragment();
         mChatFragment = new ChatFragment();
         shopMallFragment = new MallFragment();

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

@@ -95,6 +95,7 @@ import static com.cooleshow.student.constants.CourseConstants.PIANO_ROOM_COURSE;
 /**
  * Author by pq, Date on 2022/8/29.
  */
+@Deprecated
 public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener, TalentStyleFragment.OnEventListener, HotNewsFragment.OnEventListener {
     public static final int MAX_HOT_MUSIC_LIST_PAGE = 4;//热门曲目一页最大条数
     public static final int MAX_GOOD_MUSIC_LIST_PAGE = 3;//精品曲目一页最大条数

+ 842 - 0
student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragmentV2.java

@@ -0,0 +1,842 @@
+package com.cooleshow.student.ui.main;
+
+import android.animation.ArgbEvaluator;
+import android.animation.ValueAnimator;
+import android.text.TextUtils;
+import android.util.Log;
+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.OnItemChildClickListener;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.EventConstants;
+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.CommonItemDecoration;
+import com.cooleshow.base.widgets.dialog.AwardTipDialog;
+import com.cooleshow.base.widgets.dialog.RecommendMoreMenuDialog;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.HomeBottomPageAdapter;
+import com.cooleshow.student.adapter.HomeHotAlbumAdapter;
+import com.cooleshow.student.adapter.HomeHotMusicSheetAdapter;
+import com.cooleshow.student.adapter.HomeMenuPagerAdapter;
+import com.cooleshow.student.adapter.HomeRecommendTalentAdapter;
+import com.cooleshow.student.adapter.NewHomeVideoCourseAdapter;
+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.HomeHotMusicSheetItemBean;
+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.constants.CommonConfig;
+import com.cooleshow.student.constants.CourseConstants;
+import com.cooleshow.student.contract.HomeContract;
+import com.cooleshow.student.databinding.FgNewHomeV2LayoutBinding;
+import com.cooleshow.student.databinding.FragmentNewHomeLayoutBinding;
+import com.cooleshow.student.helper.EventHelper;
+import com.cooleshow.student.presenter.main.HomePresenter;
+import com.cooleshow.student.widgets.AppBarLayoutStateChangeListener;
+import com.cooleshow.student.widgets.DialogUtils;
+import com.cooleshow.student.widgets.HomeHotAlbumDecoration;
+import com.cooleshow.student.widgets.HomeHotMusicSheetItemDecoration;
+import com.cooleshow.usercenter.bean.StudentUserInfo;
+import com.cooleshow.usercenter.helper.UserHelper;
+import com.google.android.material.appbar.AppBarLayout;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
+import com.youth.banner.Banner;
+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 java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.LinearSnapHelper;
+import androidx.viewpager.widget.ViewPager;
+import androidx.viewpager2.widget.ViewPager2;
+
+import static com.cooleshow.student.constants.CourseConstants.LIVE_COURSE;
+import static com.cooleshow.student.constants.CourseConstants.OTHER_COURSE;
+import static com.cooleshow.student.constants.CourseConstants.PIANO_ROOM_COURSE;
+
+/**
+ * Author by pq, Date on 2022/8/29.
+ */
+public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener, TalentStyleFragment.OnEventListener, HotNewsFragment.OnEventListener {
+    public static int MAX_NUM_FOR_TOP_MENU = 10;//金刚位一页个数
+    private Banner banner;
+    private SmartRefreshLayout refreshLayout;
+    private ArrayList<AppHomeBean.ItemBean> itemBeans = new ArrayList<>();
+    private BannerImageAdapter mBannerImageAdapter;
+    private HomeLiveAndVideoBean.RecentCoursesBean mRecentCourses;
+    private List<Fragment> fragments = new ArrayList<>();
+    private HomeMenuPagerAdapter mMenuPagerAdapter;
+    private String noticeId;
+    private HomeRecommendTalentAdapter mRecommendTalentAdapter;
+    private NewHomeVideoCourseAdapter mHomeVideoCourseAdapter;
+    private HotNewsFragment mHotNewsFragment;
+    private ValueAnimator bottomTabValueAnimator;
+    private boolean isCollapsed = false;//控制底部tab
+    private int indicatorWidth = 0;//金刚位indicator宽度
+
+    private ViewPager2.OnPageChangeCallback onPageChangeCallback = new ViewPager2.OnPageChangeCallback() {
+        @Override
+        public void onPageSelected(int position) {
+            super.onPageSelected(position);
+            switchTabStyle(position);
+        }
+    };
+
+    @Override
+    protected FgNewHomeV2LayoutBinding getLayoutView() {
+        return FgNewHomeV2LayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected HomePresenter createPresenter() {
+        return new HomePresenter();
+    }
+
+    @Override
+    protected void initView(View rootView) {
+        Utils.setHeadView(mViewBinding.viewStatusBar, requireContext(), SizeUtils.dp2px(3.5f));
+        banner = mViewBinding.banner;
+        indicatorWidth = SizeUtils.dp2px(18);
+        refreshLayout = mViewBinding.refreshLayout;
+        mViewBinding.bgAnnouncement.setOnClickListener(this);
+        mViewBinding.ivScan.setOnClickListener(this);
+        mViewBinding.imMessage.setOnClickListener(this);
+        mViewBinding.flCourseEnter.setOnClickListener(this);
+        mViewBinding.tvRecommendTeacherMore.setOnClickListener(this);
+        mViewBinding.tvVideoCourseMore.setOnClickListener(this);
+        mViewBinding.viewTalentStyleClick.setOnClickListener(this);
+        mViewBinding.viewHotNewsClick.setOnClickListener(this);
+    }
+
+    @Override
+    protected void initData() {
+        UiUtils.setCustomFont_DIN_Alternate_Bold(getContext(),mViewBinding.tvPracticeMinutes,mViewBinding.tvPracticeSecond,mViewBinding.tvCourseInfo);
+        //推荐老师
+        mRecommendTalentAdapter = new HomeRecommendTalentAdapter();
+        CommonItemDecoration commonItemDecoration = new CommonItemDecoration(0, 0, 0, SizeUtils.dp2px(12), 0);
+        LinearLayoutManager recommendTalentManager = new LinearLayoutManager(getContext());
+        recommendTalentManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        mViewBinding.recyclerviewRecommendTalent.setLayoutManager(recommendTalentManager);
+        mViewBinding.recyclerviewRecommendTalent.addItemDecoration(commonItemDecoration);
+        mViewBinding.recyclerviewRecommendTalent.setAdapter(mRecommendTalentAdapter);
+
+        LinearLayoutManager videoCourseManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false);
+        mViewBinding.rvVideoCourse.setLayoutManager(videoCourseManager);
+        mHomeVideoCourseAdapter = new NewHomeVideoCourseAdapter();
+        CommonItemDecoration videoListItemDecoration = new CommonItemDecoration(SizeUtils.dp2px(12), 0, 0, SizeUtils.dp2px(10), 0);
+        mViewBinding.rvVideoCourse.addItemDecoration(videoListItemDecoration);
+        mViewBinding.rvVideoCourse.setAdapter(mHomeVideoCourseAdapter);
+
+
+        ArrayList<Fragment> bottomFragments = new ArrayList<>();
+        mHotNewsFragment = new HotNewsFragment();
+        mHotNewsFragment.setOnEventListener(NewHomeFragmentV2.this);
+        bottomFragments.add(mHotNewsFragment);
+        HomeBottomPageAdapter homeBottomPageAdapter = new HomeBottomPageAdapter(this.getChildFragmentManager(), bottomFragments);
+//        getChildFragmentManager().beginTransaction()
+//                .add(R.id.fl_talent_style_container, mTalentStyleFragment)
+//                .add(R.id.fl_hot_news_container, mHotNewsFragment).commit();
+        mViewBinding.viewPagerBottom.setOffscreenPageLimit(bottomFragments.size());
+        mViewBinding.viewPagerBottom.setAdapter(homeBottomPageAdapter);
+
+        mMenuPagerAdapter = new HomeMenuPagerAdapter(getChildFragmentManager(), fragments);
+        mViewBinding.viewpagerMenu.setAdapter(mMenuPagerAdapter);
+        mBannerImageAdapter = new BannerImageAdapter<AppHomeBean.ItemBean>(itemBeans) {
+            @Override
+            public void onBindView(BannerImageHolder holder, AppHomeBean.ItemBean 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.setAdapter(mBannerImageAdapter, true).addBannerLifecycleObserver(this)//添加生命周期观察者
+                .isAutoLoop(true)
+                .setIndicatorGravity(IndicatorConfig.Direction.RIGHT)
+//                .removeIndicator()
+                .setIndicator(new RectangleIndicator(getContext())) //圆形指示器 还支持条形指示器等
+                .setOnBannerListener(new OnBannerListener() {
+                    @Override
+                    public void OnBannerClick(Object data, int position) {
+                        AppHomeBean.ItemBean item = (AppHomeBean.ItemBean) data;
+                        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();
+                        }
+                    }
+                });
+        initListener();
+    }
+
+    private void initListener() {
+        mRecommendTalentAdapter.setOnItemChildClickListener(new OnItemChildClickListener() {
+            @Override
+            public void onItemChildClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                if (view.getId() == R.id.tv_focus) {
+                    //关注
+                    if (position < mRecommendTalentAdapter.getData().size()) {
+                        RecommendTalentListBean data = mRecommendTalentAdapter.getData().get(position);
+                        if (presenter != null && !data.watch) {
+                            presenter.followTeacher(Constants.STUDENT_FOCUS_TEACHER_STATUS_FOLLOW, String.valueOf(data.userId));
+                        }
+                    }
+                }
+            }
+        });
+
+
+        mViewBinding.viewPagerBottom.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+
+            }
+
+            @Override
+            public void onPageSelected(int position) {
+                switchTabStyle(position);
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int state) {
+
+            }
+        });
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            refreshLayout.finishRefresh();
+            presenter.queryLiveAndVideo();
+            presenter.appHome();
+            presenter.userAccountPage();
+            presenter.getHotMusicSheetList();
+            presenter.getRecommendTalentList();
+            refreshBottomData();
+        });
+
+        mHomeVideoCourseAdapter.setOnItemClickListener((adapter, view, position) -> {
+            HomeLiveAndVideoBean.VideoCourseBean item = (HomeLiveAndVideoBean.VideoCourseBean) adapter.getItem(position);
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_DETAIL + "?groupId=" + item.videoGroupId)
+                    .navigation();
+        });
+
+        mRecommendTalentAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                if (position < mRecommendTalentAdapter.getData().size()) {
+                    //跳转老师风采
+                    RecommendTalentListBean item = mRecommendTalentAdapter.getItem(position);
+                    ARouter.getInstance()
+                            .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                            .withString(WebConstants.WEB_URL, WebConstants.STUDENT_TEACHER_HOME + item.userId)
+                            .navigation();
+                }
+            }
+        });
+
+
+
+        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) {
+
+            }
+        });
+
+
+        mViewBinding.appBarLayout.addOnOffsetChangedListener(new AppBarLayoutStateChangeListener() {
+            @Override
+            public void onStateChanged(AppBarLayout appBarLayout, State state) {
+                switch (state) {
+                    case EXPANDED:    //展开
+                        break;
+                    case COLLAPSED:    //折叠
+                        if (!isCollapsed) {
+                            isCollapsed = true;
+                            mViewBinding.viewDivideLine2.setVisibility(View.VISIBLE);
+                            handleTabAnim(1);
+                        }
+                        break;
+                    case INTERMEDIATE: //中间状态
+                        if (isCollapsed) {
+                            handleTabAnim(0);
+                            isCollapsed = false;
+                            mViewBinding.viewDivideLine2.setVisibility(View.GONE);
+                        }
+                        break;
+                }
+            }
+        });
+    }
+
+
+    private void resetBannerAuto() {
+        boolean localVisibleRect = UiUtils.getLocalVisibleRect(getActivity(), banner, 10);
+        //banner可见的时候就自动循环,否则就停止,解决问题:在scrollview到最底部时候,由于banner自动到第一个时候就往上顶一段距离
+        if (localVisibleRect) {
+            if (null != banner) {
+                banner.isAutoLoop(true);
+            }
+        } else {
+            if (null != banner) {
+                banner.isAutoLoop(false);
+            }
+        }
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (presenter != null) {
+            //红点
+            presenter.queryCountOfUnread();
+            presenter.appHome();
+            //获取课程信息
+            presenter.queryLiveAndVideo();
+            refreshBottomData();
+            //查询个人信息
+            presenter.queryUserInfo();
+            //获取推荐老师列表
+            presenter.getRecommendTalentList();
+            //获取热门专辑
+            presenter.userAccountPage();
+            //获取热门曲目
+            presenter.getHotMusicSheetList();
+            //获取领奖状态
+            presenter.getAwardStatus();
+        }
+    }
+
+    private void refreshBottomData() {
+        if (mHotNewsFragment != null) {
+            mHotNewsFragment.refresh();
+        }
+    }
+
+    @Override
+    public void appHomeSuccess(AppHomeBean appHomeBean) {
+        if (isDetached()) {
+            return;
+        }
+        if (refreshLayout != null) {
+            refreshLayout.finishRefresh();
+        }
+        //banner
+        bindBanner(appHomeBean.banner);
+        //后台配置menu
+        initMenu(appHomeBean.appMenu);
+        showFlashDialog(appHomeBean.flashPage);
+        if (getActivity() instanceof MainActivity) {
+            MainActivity mainActivity = (MainActivity) getActivity();
+            if (appHomeBean.suspension != null && appHomeBean.suspension.size() > 0) {
+                AppHomeBean.ItemBean itemBean = appHomeBean.suspension.get(0);
+                mainActivity.showFloatView(itemBean.linkUrl, itemBean.coverImage);
+            } else {
+                mainActivity.hideFloatView();
+            }
+        }
+    }
+
+    private void showFlashDialog(List<AppHomeBean.ItemBean> flashPage) {
+        if (null == flashPage || flashPage.size() == 0) {
+            return;
+        }
+        if (!CommonConfig.isShowHomeFlashPage) {
+            return;
+        }
+        DialogUtils.showHomeDialog(getContext(), flashPage.get(0));
+        CommonConfig.isShowHomeFlashPage = false;
+    }
+
+    /**
+     * 处理banner数据
+     *
+     * @param bannerList
+     */
+    private void bindBanner(List<AppHomeBean.ItemBean> bannerList) {
+        if (mBannerImageAdapter == null) {
+            return;
+        }
+        if (bannerList != null && bannerList.size() > 0) {
+            banner.setVisibility(View.VISIBLE);
+            itemBeans.clear();
+            itemBeans.addAll(bannerList);
+            mBannerImageAdapter.notifyDataSetChanged();
+        } else {
+            itemBeans.clear();
+            banner.setVisibility(View.GONE);
+        }
+    }
+
+    private void initMenu(List<AppHomeBean.ItemBean> menuList) {
+        if (mMenuPagerAdapter == 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++) {
+                List<AppHomeBean.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();
+            mMenuPagerAdapter.setFragments(fragments);
+            mMenuPagerAdapter.notifyDataSetChanged();
+        } else {
+            fragments.clear();
+            mMenuPagerAdapter.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 hotAlbumListSuccess(HotAlbumBean homeHotAlbumListBean) {
+        if (isDetached() || homeHotAlbumListBean == null) {
+            return;
+        }
+    }
+
+    @Override
+    public void queryLiveAndVideoSuccess(HomeLiveAndVideoBean bean) {
+        //是否有进入课程
+        if (bean == null) {
+            return;
+        }
+        bindVideoCourse(bean.videoList);
+        bindRecentCourse(bean.recentCourses);
+    }
+
+    private void bindRecentCourse(HomeLiveAndVideoBean.RecentCoursesBean recentCoursesBean) {
+        this.mRecentCourses = recentCoursesBean;
+        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");
+                mViewBinding.tvLiveTime.setText(String.format("今日 %s", timeText));
+            } else {
+                mViewBinding.tvLiveTime.setText(TimeUtils.date2String(
+                        TimeUtils.getDate(mRecentCourses.courseStartTime),
+                        "yyyy-MM-dd HH:mm"
+                ));
+            }
+        }
+    }
+
+    private void bindVideoCourse(List<HomeLiveAndVideoBean.VideoCourseBean> videoList) {
+        if (null == videoList || videoList.size() == 0) {
+            mViewBinding.clVideoCourse.setVisibility(View.GONE);
+            return;
+        }
+        mViewBinding.clVideoCourse.setVisibility(View.VISIBLE);
+        if (mHomeVideoCourseAdapter != null) {
+            mHomeVideoCourseAdapter.setNewInstance(videoList);
+        }
+    }
+
+
+    @Override
+    public void getStylePageSuccess(int page, HomeStyleBean data) {
+    }
+
+    @Override
+    public void queryUserInfoSuccess(StudentUserInfo data) {
+        if (TextUtils.isEmpty(data.subjectName)) {
+            ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
+                    .withBoolean("hintBar", true)
+                    .navigation();
+        }
+    }
+
+    @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 (isDetached()) {
+            return;
+        }
+        if (null == data || data.size() == 0) {
+            mViewBinding.viewUnreadMessage.setVisibility(View.GONE);
+            return;
+        }
+        int totalCount = 0;
+        for (CountOfUnreadBean datum : data) {
+            totalCount += datum.value;
+        }
+        if (totalCount > 0) {
+            mViewBinding.viewUnreadMessage.setVisibility(View.VISIBLE);
+        } else {
+            mViewBinding.viewUnreadMessage.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void getHotMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean) {
+        if (isDetached() || homeHotMusicSheetBean == null) {
+            return;
+        }
+    }
+
+    @Override
+    public void getRecommendTalentSuccess(ArrayList<RecommendTalentListBean> talentListBeans) {
+        if (isDetached()) {
+            return;
+        }
+        if (talentListBeans != null && talentListBeans.size() > 0) {
+            mViewBinding.csRecommendTalent.setVisibility(View.VISIBLE);
+            if (mRecommendTalentAdapter != null) {
+                mRecommendTalentAdapter.setNewInstance(talentListBeans);
+            }
+        } else {
+            mViewBinding.csRecommendTalent.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void getHotNewsSuccess(int page, HomeHotNewsBean homeHotNewsBean) {
+        //获取热门资讯Success
+        bindHotNews(page, homeHotNewsBean);
+    }
+
+    private void bindHotNews(int page, HomeHotNewsBean information) {
+        if (mHotNewsFragment != null) {
+            mHotNewsFragment.setData(page, information);
+        }
+    }
+
+    @Override
+    public void getHotNewsError(int page) {
+        //获取热门资讯Error
+        if (mHotNewsFragment != null) {
+            mHotNewsFragment.getHotNewsError(page);
+        }
+    }
+
+    @Override
+    public void followTeacherSuccess() {
+        //关注老师成功
+        if (isDetached()) {
+            return;
+        }
+        //获取推荐老师列表
+        if (presenter != null) {
+            presenter.getRecommendTalentList();
+        }
+    }
+
+    @Override
+    public void getAwardStatus(AwardStatusBean awardStatusBean) {
+        if (isDetached()) {
+            return;
+        }
+        if (awardStatusBean != null && TextUtils.equals(awardStatusBean.check, "1")) {
+            showAwardTipDialog();
+        }
+    }
+
+    private void showAwardTipDialog() {
+        if (CommonConfig.getTodayShowAwardIsCompleted()) {
+            return;
+        }
+        AwardTipDialog awardTipDialog = new AwardTipDialog(getContext());
+        awardTipDialog.show();
+        UserHelper.setShowAwardDialogTipCompleted();
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+
+        if (id == R.id.view_search_bg) {
+            //搜索
+            WebStartHelper.startSearch();
+            return;
+        }
+        if (id == R.id.iv_scan) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            //二维码扫描
+            ARouter.getInstance()
+                    .build(RouterPath.UserCenter.SCAN_QR_CODE)
+                    .navigation();
+            return;
+        }
+        if (id == R.id.im_message) {
+            //消息列表页面
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            ARouter.getInstance().build(RouterPath.MessageCenter.TEACHER_MESSAGE_MESSAGEBOX)
+                    .navigation();
+            //事件埋点->消息列表
+            EventHelper.addEvent(EventConstants.EVENT_ID_NOTIFICATION);
+            return;
+        }
+        if (id == R.id.fl_course_enter) {
+            //进入教室
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            if (mRecentCourses != null) {
+                gotoCourseDetail(mRecentCourses);
+            }
+            return;
+        }
+        if (id == R.id.bg_announcement || id == R.id.bg_announcement2) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            if (TextUtils.isEmpty(noticeId)) {
+                return;
+            }
+            //点击单条公告
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_DETAIL + noticeId)
+                    .navigation();
+            return;
+        }
+
+        if (id == R.id.tv_recommend_teacher_more) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            showRecommendTalentMenuDialog();
+            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_video_course_more) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            //视频课更多
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.STUDENT_VIDEO_CLASS)
+                    .navigation();
+            return;
+        }
+        if (id == R.id.view_talent_style_click) {
+            //老师风采tab点击
+            mViewBinding.viewPagerBottom.setCurrentItem(0);
+            return;
+        }
+
+        if (id == R.id.view_hot_news_click) {
+            //热门资讯tab点击
+            mViewBinding.viewPagerBottom.setCurrentItem(1);
+            return;
+        }
+    }
+
+    private void showRecommendTalentMenuDialog() {
+        RecommendMoreMenuDialog recommendMoreMenuDialog = new RecommendMoreMenuDialog(getContext());
+        recommendMoreMenuDialog.setOnEventListener(new RecommendMoreMenuDialog.OnEventListener() {
+            @Override
+            public void onClickMore() {
+                //老师风采
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, WebConstants.STUDENT_TEACHER_ELEGANT)
+                        .navigation();
+            }
+
+            @Override
+            public void onReduceRecommend() {
+                mViewBinding.csRecommendTalent.setVisibility(View.GONE);
+            }
+        });
+        recommendMoreMenuDialog.show();
+    }
+
+    /**
+     * 切换tab样式
+     *
+     * @param position
+     */
+    private void switchTabStyle(int position) {
+        //view_talent_style_news
+        boolean isSelectFirst = position == 0;
+        mViewBinding.viewTalentStyleNews.setVisibility(isSelectFirst ? View.VISIBLE : View.GONE);
+        mViewBinding.tvTalentStyleTitle.setTextColor(getResources().getColor(isSelectFirst ? com.cooleshow.base.R.color.color_333333 : com.cooleshow.base.R.color.color_999999));
+        mViewBinding.viewTabHotNews.setVisibility(isSelectFirst ? View.GONE : View.VISIBLE);
+        mViewBinding.tvHotNewsTitle.setTextColor(getResources().getColor(isSelectFirst ? com.cooleshow.base.R.color.color_999999 : com.cooleshow.base.R.color.color_333333));
+    }
+
+
+    private void handleTabAnim(int animationMode) {
+        int colorFrom = getResources().getColor(animationMode == 0 ? com.cooleshow.base.R.color.white : com.cooleshow.base.R.color.color_f6f8f9);
+        int colorTo = getResources().getColor(animationMode == 0 ? com.cooleshow.base.R.color.color_f6f8f9 : com.cooleshow.base.R.color.white);
+        if (bottomTabValueAnimator == null) {
+            bottomTabValueAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), colorFrom, colorTo);
+            bottomTabValueAnimator.setDuration(150);
+            bottomTabValueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                @Override
+                public void onAnimationUpdate(ValueAnimator animation) {
+                    if (mViewBinding != null) {
+                        int colorValue = (int) animation.getAnimatedValue();
+                        mViewBinding.csBottomTab.setBackgroundColor(colorValue);
+                    }
+                }
+            });
+        }
+        if (bottomTabValueAnimator.isRunning()) {
+            bottomTabValueAnimator.cancel();
+        }
+        bottomTabValueAnimator.setObjectValues(colorFrom, colorTo);
+        bottomTabValueAnimator.start();
+    }
+
+    /**
+     * 跳转直播课详情页面
+     *
+     * @param bean
+     */
+    private void gotoCourseDetail(HomeLiveAndVideoBean.RecentCoursesBean bean) {
+        switch (bean.courseType) {
+            case LIVE_COURSE:
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, bean.courseGroupId, bean.courseId))
+                        .navigation();
+                break;
+            case OTHER_COURSE:
+                //陪练课
+                ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
+                        .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
+                        .withString(CourseConstants.COURSE_GROUP_ID, String.valueOf(bean.courseGroupId))
+                        .navigation();
+                break;
+            case PIANO_ROOM_COURSE:
+                //琴房课 跳转详情页
+                ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
+                        .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
+                        .navigation();
+                break;
+        }
+
+    }
+
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        if (bottomTabValueAnimator != null) {
+            bottomTabValueAnimator.cancel();
+            bottomTabValueAnimator = null;
+        }
+    }
+
+    //获取老师风采列表
+    @Override
+    public void getStyleData(int page) {
+        if (presenter != null) {
+            presenter.getTalentStyle(page);
+        }
+    }
+
+    @Override
+    public void getNewsData(int page) {
+        if (presenter != null) {
+            presenter.getHotNewsPage(page);
+        }
+    }
+}

BIN=BIN
student/src/main/res/drawable-xhdpi/bg_home_course_info.png


BIN=BIN
student/src/main/res/drawable-xhdpi/bg_home_practice_info.png


BIN=BIN
student/src/main/res/drawable-xhdpi/icon_home_course_info_arrow.png


BIN=BIN
student/src/main/res/drawable-xhdpi/icon_home_practice_info_arrow.png


BIN=BIN
student/src/main/res/drawable-xxhdpi/bg_home_course_info.png


BIN=BIN
student/src/main/res/drawable-xxhdpi/bg_home_practice_info.png


BIN=BIN
student/src/main/res/drawable-xxhdpi/icon_home_course_info_arrow.png


BIN=BIN
student/src/main/res/drawable-xxhdpi/icon_home_practice_info_arrow.png


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

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

+ 295 - 449
student/src/main/res/layout/fg_new_home_v2_layout.xml

@@ -145,55 +145,196 @@
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintTop_toTopOf="parent" />
 
-                        <View
-                            android:layout_marginTop="12dp"
+                        <ImageView
                             android:id="@+id/view_practice_info_bg"
                             android:layout_width="0dp"
-                            android:layout_height="67dp"
+                            android:layout_height="wrap_content"
                             android:layout_marginStart="14dp"
+                            android:layout_marginTop="12dp"
+                            android:adjustViewBounds="true"
+                            android:src="@drawable/bg_home_practice_info"
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintRight_toLeftOf="@+id/view_course_info_bg"
                             app:layout_constraintTop_toBottomOf="@+id/banner" />
 
 
-                        <View
-                            android:layout_marginStart="9dp"
+                        <ImageView
                             android:id="@+id/view_course_info_bg"
                             android:layout_width="0dp"
-                            android:layout_height="67dp"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="9dp"
                             android:layout_marginEnd="14dp"
+                            android:adjustViewBounds="true"
+                            android:src="@drawable/bg_home_course_info"
                             app:layout_constraintLeft_toRightOf="@+id/view_practice_info_bg"
                             app:layout_constraintRight_toRightOf="parent"
                             app:layout_constraintTop_toTopOf="@+id/view_practice_info_bg" />
 
                         <TextView
-                            android:layout_marginBottom="13dp"
+                            android:id="@+id/tv_week_pratice_info_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
                             android:layout_marginStart="15dp"
-                            app:layout_constraintBottom_toBottomOf="@+id/view_practice_info_bg"
-                            app:layout_constraintLeft_toLeftOf="@+id/view_practice_info_bg"
+                            android:layout_marginTop="4dp"
+                            android:drawableEnd="@drawable/icon_home_practice_info_arrow"
                             android:drawablePadding="4dp"
-                            android:text="本周练习"
                             android:includeFontPadding="false"
+                            android:text="本周练习"
                             android:textColor="@color/color_b98344"
                             android:textSize="@dimen/sp_14"
-                            android:drawableEnd="@drawable/icon_home_practice_info_arrow"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"/>
+                            app:layout_constraintBottom_toBottomOf="@+id/view_practice_info_bg"
+                            app:layout_constraintLeft_toLeftOf="@+id/view_practice_info_bg"
+                            app:layout_constraintTop_toBottomOf="@+id/tv_practice_minutes" />
 
 
                         <TextView
-                            android:layout_marginBottom="13dp"
+                            android:id="@+id/tv_week_course_info_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
                             android:layout_marginStart="15dp"
-                            app:layout_constraintBottom_toBottomOf="@+id/view_course_info_bg"
-                            app:layout_constraintLeft_toLeftOf="@+id/view_course_info_bg"
+                            android:layout_marginTop="4dp"
+                            android:drawableEnd="@drawable/icon_home_course_info_arrow"
                             android:drawablePadding="4dp"
-                            android:text="本周课程"
                             android:includeFontPadding="false"
+                            android:text="本周课程"
                             android:textColor="@color/color_559199"
                             android:textSize="@dimen/sp_14"
-                            android:drawableEnd="@drawable/icon_home_course_info_arrow"
+                            app:layout_constraintBottom_toBottomOf="@+id/view_course_info_bg"
+                            app:layout_constraintLeft_toLeftOf="@+id/view_course_info_bg"
+                            app:layout_constraintTop_toBottomOf="@+id/tv_course_info" />
+
+                        <TextView
+                            android:id="@+id/tv_practice_minutes"
                             android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"/>
+                            android:layout_height="wrap_content"
+                            android:includeFontPadding="false"
+                            android:text="0"
+                            android:textColor="@color/color_333333"
+                            android:textSize="@dimen/sp_22"
+                            app:layout_constraintBottom_toTopOf="@+id/tv_week_pratice_info_title"
+                            app:layout_constraintLeft_toLeftOf="@+id/tv_week_pratice_info_title"
+                            app:layout_constraintTop_toTopOf="@+id/view_practice_info_bg"
+                            app:layout_constraintVertical_chainStyle="packed"
+                            tools:text="23" />
+
+                        <TextView
+                            android:id="@+id/tv_practice_minutes_unit"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:includeFontPadding="false"
+                            android:paddingStart="2dp"
+                            android:paddingEnd="2dp"
+                            android:text="分"
+                            android:textColor="@color/color_777777"
+                            android:textSize="@dimen/sp_12"
+                            app:layout_constraintBaseline_toBaselineOf="@+id/tv_practice_minutes"
+                            app:layout_constraintLeft_toRightOf="@+id/tv_practice_minutes" />
+
+                        <TextView
+                            android:id="@+id/tv_practice_second"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:includeFontPadding="false"
+                            android:text="0"
+                            android:textColor="@color/color_333333"
+                            android:textSize="@dimen/sp_22"
+                            app:layout_constraintBaseline_toBaselineOf="@+id/tv_practice_minutes_unit"
+                            app:layout_constraintLeft_toRightOf="@+id/tv_practice_minutes_unit"
+                            tools:text="23" />
+
+                        <TextView
+                            android:id="@+id/tv_practice_second_unit"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:includeFontPadding="false"
+                            android:paddingStart="2dp"
+                            android:paddingEnd="2dp"
+                            android:text="秒"
+                            android:textColor="@color/color_777777"
+                            android:textSize="@dimen/sp_12"
+                            app:layout_constraintBaseline_toBaselineOf="@+id/tv_practice_second"
+                            app:layout_constraintLeft_toRightOf="@+id/tv_practice_second" />
+
+
+                        <TextView
+                            android:id="@+id/tv_course_info"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:includeFontPadding="false"
+                            android:text="0/0"
+                            android:textColor="@color/color_333333"
+                            android:textSize="@dimen/sp_22"
+                            app:layout_constraintBottom_toTopOf="@+id/tv_week_course_info_title"
+                            app:layout_constraintLeft_toLeftOf="@+id/tv_week_course_info_title"
+                            app:layout_constraintTop_toTopOf="@+id/view_course_info_bg"
+                            app:layout_constraintVertical_chainStyle="packed"
+                            tools:text="3/23" />
+
+                        <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="12dp"
+                            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/view_practice_info_bg"
+                            tools:visibility="visible">
+
+                            <TextView
+                                android:id="@+id/tv_live_title"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginStart="128dp"
+                                android:includeFontPadding="false"
+                                android:text="您有新课程即将开始"
+                                android:textColor="@color/color_1a1a1a"
+                                android:textSize="@dimen/sp_16"
+                                app:layout_constraintBottom_toTopOf="@+id/alarm_icon"
+                                app:layout_constraintLeft_toLeftOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"
+                                app:layout_constraintVertical_chainStyle="packed" />
+
+                            <ImageView
+                                android:id="@+id/alarm_icon"
+                                android:layout_width="@dimen/dp_15"
+                                android:layout_height="@dimen/dp_15"
+                                android:layout_marginTop="10dp"
+                                android:src="@drawable/small_alarm_clock"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintLeft_toLeftOf="@+id/tv_live_title"
+                                app:layout_constraintTop_toBottomOf="@+id/tv_live_title" />
+
+
+                            <TextView
+                                android:id="@+id/tv_live_time"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginTop="@dimen/dp_1"
+                                android:layout_marginBottom="@dimen/dp_5"
+                                android:paddingStart="5dp"
+                                android:textColor="@color/color_FF806F"
+                                android:textSize="@dimen/sp_13"
+                                app:layout_constraintBottom_toBottomOf="@+id/alarm_icon"
+                                app:layout_constraintLeft_toRightOf="@+id/alarm_icon"
+                                app:layout_constraintTop_toTopOf="@+id/alarm_icon"
+                                tools:text="今日 16:30-17:05" />
+
+
+                            <ImageView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginEnd="11dp"
+                                android:src="@drawable/icon_arrow_right_bg_tran"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintRight_toRightOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
 
                         <androidx.cardview.widget.CardView
                             android:id="@+id/bg_announcement"
@@ -207,7 +348,8 @@
                             app:cardCornerRadius="10dp"
                             app:cardElevation="0dp"
                             app:layout_constraintLeft_toLeftOf="parent"
-                            app:layout_constraintTop_toBottomOf="@+id/banner">
+                            app:layout_constraintTop_toBottomOf="@+id/fl_course_enter"
+                            tools:visibility="visible">
 
                             <androidx.constraintlayout.widget.ConstraintLayout
                                 android:layout_width="match_parent"
@@ -254,13 +396,11 @@
                         <androidx.viewpager.widget.ViewPager
                             android:id="@+id/viewpager_menu"
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="@dimen/dp_8"
-                            app:layout_constraintHeight_min="148dp"
+                            android:layout_height="160dp"
+                            android:layout_marginTop="@dimen/dp_12"
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintTop_toBottomOf="@+id/bg_announcement" />
 
-
                         <FrameLayout
                             android:id="@+id/rl_indicator"
                             android:layout_width="wrap_content"
@@ -285,346 +425,19 @@
                             android:id="@+id/view_line2"
                             android:layout_width="1px"
                             android:layout_height="1px"
-                            android:layout_marginTop="14dp"
+                            android:layout_marginTop="8dp"
                             app:layout_constraintLeft_toLeftOf="parent"
-                            app:layout_constraintTop_toBottomOf="@+id/view_practice_info_bg"
-                            app:layout_goneMarginTop="21dp" />
-
-                        <androidx.cardview.widget.CardView
-                            android:id="@+id/fl_course_enter"
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:layout_marginStart="14dp"
-                            android:layout_marginTop="24dp"
-                            android:layout_marginEnd="14dp"
-                            android:visibility="gone"
-                            app:cardBackgroundColor="@color/white"
-                            app:cardCornerRadius="10dp"
-                            app:cardElevation="0dp"
-                            app:cardPreventCornerOverlap="true"
-                            app:cardUseCompatPadding="false"
-                            app:layout_constraintTop_toBottomOf="@+id/view_bg_header">
-
-                            <androidx.constraintlayout.widget.ConstraintLayout
-                                android:layout_width="match_parent"
-                                android:layout_height="70dp">
-
-                                <TextView
-                                    android:id="@+id/tv_live_title"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginStart="128dp"
-                                    android:includeFontPadding="false"
-                                    android:text="您有新课程即将开始"
-                                    android:textColor="@color/color_1a1a1a"
-                                    android:textSize="@dimen/sp_16"
-                                    app:layout_constraintBottom_toTopOf="@+id/alarm_icon"
-                                    app:layout_constraintLeft_toLeftOf="parent"
-                                    app:layout_constraintTop_toTopOf="parent"
-                                    app:layout_constraintVertical_chainStyle="packed" />
-
-                                <ImageView
-                                    android:id="@+id/alarm_icon"
-                                    android:layout_width="@dimen/dp_15"
-                                    android:layout_height="@dimen/dp_15"
-                                    android:layout_marginTop="10dp"
-                                    android:src="@drawable/small_alarm_clock"
-                                    app:layout_constraintBottom_toBottomOf="parent"
-                                    app:layout_constraintLeft_toLeftOf="@+id/tv_live_title"
-                                    app:layout_constraintTop_toBottomOf="@+id/tv_live_title" />
-
-
-                                <TextView
-                                    android:id="@+id/tv_live_time"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginTop="@dimen/dp_1"
-                                    android:layout_marginBottom="@dimen/dp_5"
-                                    android:paddingStart="5dp"
-                                    android:textColor="@color/color_FF806F"
-                                    android:textSize="@dimen/sp_13"
-                                    app:layout_constraintBottom_toBottomOf="@+id/alarm_icon"
-                                    app:layout_constraintLeft_toRightOf="@+id/alarm_icon"
-                                    app:layout_constraintTop_toTopOf="@+id/alarm_icon"
-                                    tools:text="今日 16:30-17:05" />
-
-
-                                <ImageView
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginEnd="11dp"
-                                    android:src="@drawable/icon_arrow_right_bg_tran"
-                                    app:layout_constraintBottom_toBottomOf="parent"
-                                    app:layout_constraintRight_toRightOf="parent"
-                                    app:layout_constraintTop_toTopOf="parent" />
-
-
-                            </androidx.constraintlayout.widget.ConstraintLayout>
-                        </androidx.cardview.widget.CardView>
-
-                        <com.airbnb.lottie.LottieAnimationView
-                            android:id="@+id/iv_course_enter_anim"
-                            android:layout_width="128dp"
-                            android:layout_height="91dp"
-                            android:visibility="gone"
-                            app:layout_constraintBottom_toBottomOf="@+id/fl_course_enter"
-                            app:layout_constraintLeft_toLeftOf="@+id/fl_course_enter"
-                            app:lottie_autoPlay="true"
-                            app:lottie_loop="true" />
-
-
-                        <androidx.constraintlayout.widget.ConstraintLayout
-                            android:id="@+id/cl_hot_album"
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="@dimen/dp_30"
-                            android:visibility="gone"
-                            app:layout_constraintTop_toBottomOf="@+id/fl_course_enter">
-
-                            <View
-                                android:id="@+id/tv_hot_album_line"
-                                android:layout_width="4dp"
-                                android:layout_height="17dp"
-                                android:layout_marginStart="14dp"
-                                android:background="@drawable/shape_course_title_tag_bg"
-                                app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
-                                app:layout_constraintLeft_toLeftOf="parent"
-                                app:layout_constraintTop_toTopOf="@+id/tv_hot_album" />
-
-                            <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>
+                            app:layout_constraintTop_toBottomOf="@+id/viewpager_menu" />
 
 
                         <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_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">
-
-                            <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
                             android:id="@+id/cs_recommend_talent"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginTop="@dimen/dp_30"
+                            android:layout_marginTop="@dimen/dp_20"
                             android:visibility="gone"
-                            app:layout_constraintTop_toBottomOf="@+id/cl_hot_track">
+                            app:layout_constraintTop_toBottomOf="@+id/view_bg_header"
+                            tools:visibility="visible">
 
                             <View
                                 android:id="@+id/tv_recommend_teacher_line"
@@ -642,9 +455,9 @@
                                 android:layout_height="wrap_content"
                                 android:layout_marginLeft="@dimen/dp_6"
                                 android:gravity="center"
-                                android:text="推荐老师"
+                                android:text="老师"
                                 android:textColor="@color/color_333333"
-                                android:textSize="@dimen/sp_18"
+                                android:textSize="@dimen/sp_17"
                                 android:textStyle="bold"
                                 app:layout_constraintLeft_toRightOf="@+id/tv_recommend_teacher_line"
                                 app:layout_constraintTop_toTopOf="parent" />
@@ -677,7 +490,7 @@
                             android:id="@+id/cl_video_course"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginTop="@dimen/dp_30"
+                            android:layout_marginTop="@dimen/dp_20"
                             android:visibility="visible"
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintTop_toBottomOf="@+id/cs_recommend_talent">
@@ -698,9 +511,9 @@
                                 android:layout_height="wrap_content"
                                 android:layout_marginLeft="@dimen/dp_6"
                                 android:gravity="center"
-                                android:text="精品视频课"
+                                android:text="视频课"
                                 android:textColor="@color/color_333333"
-                                android:textSize="@dimen/sp_16"
+                                android:textSize="@dimen/sp_17"
                                 android:textStyle="bold"
                                 app:layout_constraintLeft_toRightOf="@+id/tv_video_course_line"
                                 app:layout_constraintTop_toTopOf="parent" />
@@ -736,101 +549,134 @@
                                 app:layout_constraintTop_toBottomOf="@+id/tv_video_course_title" />
 
                         </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="20dp"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/cl_video_course">
+
+                            <View
+                                android:id="@+id/tv_news_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_news_title"
+                                app:layout_constraintLeft_toLeftOf="parent"
+                                app:layout_constraintTop_toTopOf="@+id/tv_news_title" />
+
+                            <TextView
+                                android:id="@+id/tv_news_title"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/dp_6"
+                                android:gravity="center"
+                                android:text="热门资讯"
+                                android:textColor="@color/color_333333"
+                                android:textSize="@dimen/sp_17"
+                                android:textStyle="bold"
+                                app:layout_constraintLeft_toRightOf="@+id/tv_news_line"
+                                app:layout_constraintTop_toTopOf="parent" />
+                        </LinearLayout>
                     </androidx.constraintlayout.widget.ConstraintLayout>
-                </com.google.android.material.appbar.CollapsingToolbarLayout>
 
-                <androidx.constraintlayout.widget.ConstraintLayout
-                    android:id="@+id/cs_bottom_tab"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingTop="8dp"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/cl_video_course">
-
-                    <View
-                        android:id="@+id/view_talent_style_news"
-                        android:layout_width="63dp"
-                        android:layout_height="12dp"
-                        android:layout_marginTop="13dp"
-                        android:background="@drawable/shape_2dc7aa_6dp"
-                        app:layout_constraintLeft_toLeftOf="@+id/tv_talent_style_title"
-                        app:layout_constraintRight_toRightOf="@+id/tv_talent_style_title"
-                        app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
-
-                    <TextView
-                        android:id="@+id/tv_talent_style_title"
-                        android:layout_width="wrap_content"
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:id="@+id/cs_bottom_tab"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:layout_marginStart="24dp"
-                        android:includeFontPadding="false"
-                        android:text="老师风采"
-                        android:textColor="@color/color_333333"
-                        android:textSize="@dimen/sp_18"
-                        android:textStyle="bold"
+                        android:paddingTop="8dp"
+                        android:visibility="gone"
                         app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
+                        app:layout_constraintTop_toBottomOf="@+id/cl_video_course">
 
+                        <View
+                            android:id="@+id/view_talent_style_news"
+                            android:layout_width="63dp"
+                            android:layout_height="12dp"
+                            android:layout_marginTop="13dp"
+                            android:background="@drawable/shape_2dc7aa_6dp"
+                            app:layout_constraintLeft_toLeftOf="@+id/tv_talent_style_title"
+                            app:layout_constraintRight_toRightOf="@+id/tv_talent_style_title"
+                            app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
 
-                    <View
-                        android:id="@+id/view_tab_hot_news"
-                        android:layout_width="63dp"
-                        android:layout_height="12dp"
-                        android:layout_marginTop="13dp"
-                        android:background="@drawable/shape_2dc7aa_6dp"
-                        android:visibility="gone"
-                        app:layout_constraintLeft_toLeftOf="@+id/tv_hot_news_title"
-                        app:layout_constraintRight_toRightOf="@+id/tv_hot_news_title"
-                        app:layout_constraintTop_toTopOf="@+id/tv_hot_news_title" />
+                        <TextView
+                            android:id="@+id/tv_talent_style_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="24dp"
+                            android:includeFontPadding="false"
+                            android:text="老师风采"
+                            android:textColor="@color/color_333333"
+                            android:textSize="@dimen/sp_18"
+                            android:textStyle="bold"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
 
-                    <TextView
-                        android:id="@+id/tv_hot_news_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="36dp"
-                        android:includeFontPadding="false"
-                        android:text="热门资讯"
-                        android:textColor="@color/color_999999"
-                        android:textSize="@dimen/sp_18"
-                        android:textStyle="bold"
-                        app:layout_constraintBottom_toBottomOf="@+id/tv_talent_style_title"
-                        app:layout_constraintLeft_toRightOf="@+id/tv_talent_style_title"
-                        app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
-
-                    <View
-                        android:id="@+id/view_help_line2"
-                        android:layout_width="1px"
-                        android:layout_height="1px"
-                        app:layout_constraintLeft_toRightOf="@+id/tv_talent_style_title"
-                        app:layout_constraintRight_toLeftOf="@+id/tv_hot_news_title"
-                        app:layout_constraintTop_toTopOf="@+id/tv_hot_news_title" />
-
-                    <View
-                        android:id="@+id/view_talent_style_click"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintBottom_toTopOf="@+id/view_help_line3"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="@+id/view_help_line2"
-                        app:layout_constraintTop_toTopOf="parent" />
-
-                    <View
-                        android:id="@+id/view_hot_news_click"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintBottom_toTopOf="@+id/view_help_line3"
-                        app:layout_constraintLeft_toLeftOf="@+id/view_help_line2"
-                        app:layout_constraintRight_toRightOf="@+id/tv_hot_news_title"
-                        app:layout_constraintTop_toTopOf="parent" />
-
-
-                    <View
-                        android:id="@+id/view_help_line3"
-                        android:layout_width="1px"
-                        android:layout_height="1px"
-                        android:layout_marginTop="10dp"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toBottomOf="@+id/tv_talent_style_title" />
-                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <View
+                            android:id="@+id/view_tab_hot_news"
+                            android:layout_width="63dp"
+                            android:layout_height="12dp"
+                            android:layout_marginTop="13dp"
+                            android:background="@drawable/shape_2dc7aa_6dp"
+                            android:visibility="gone"
+                            app:layout_constraintLeft_toLeftOf="@+id/tv_hot_news_title"
+                            app:layout_constraintRight_toRightOf="@+id/tv_hot_news_title"
+                            app:layout_constraintTop_toTopOf="@+id/tv_hot_news_title" />
+
+                        <TextView
+                            android:id="@+id/tv_hot_news_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="36dp"
+                            android:includeFontPadding="false"
+                            android:text="热门资讯"
+                            android:textColor="@color/color_999999"
+                            android:textSize="@dimen/sp_18"
+                            android:textStyle="bold"
+                            app:layout_constraintBottom_toBottomOf="@+id/tv_talent_style_title"
+                            app:layout_constraintLeft_toRightOf="@+id/tv_talent_style_title"
+                            app:layout_constraintTop_toTopOf="@+id/tv_talent_style_title" />
+
+                        <View
+                            android:id="@+id/view_help_line2"
+                            android:layout_width="1px"
+                            android:layout_height="1px"
+                            app:layout_constraintLeft_toRightOf="@+id/tv_talent_style_title"
+                            app:layout_constraintRight_toLeftOf="@+id/tv_hot_news_title"
+                            app:layout_constraintTop_toTopOf="@+id/tv_hot_news_title" />
+
+                        <View
+                            android:id="@+id/view_talent_style_click"
+                            android:layout_width="0dp"
+                            android:layout_height="0dp"
+                            app:layout_constraintBottom_toTopOf="@+id/view_help_line3"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintRight_toRightOf="@+id/view_help_line2"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <View
+                            android:id="@+id/view_hot_news_click"
+                            android:layout_width="0dp"
+                            android:layout_height="0dp"
+                            app:layout_constraintBottom_toTopOf="@+id/view_help_line3"
+                            app:layout_constraintLeft_toLeftOf="@+id/view_help_line2"
+                            app:layout_constraintRight_toRightOf="@+id/tv_hot_news_title"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+
+                        <View
+                            android:id="@+id/view_help_line3"
+                            android:layout_width="1px"
+                            android:layout_height="1px"
+                            android:layout_marginTop="10dp"
+                            app:layout_constraintLeft_toLeftOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/tv_talent_style_title" />
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </com.google.android.material.appbar.CollapsingToolbarLayout>
             </com.google.android.material.appbar.AppBarLayout>
 
             <androidx.viewpager.widget.ViewPager

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

@@ -2,7 +2,7 @@
 <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="@dimen/dp_67"
+    android:layout_height="160dp"
     android:orientation="horizontal"
     android:paddingLeft="@dimen/dp_10"
     android:paddingRight="@dimen/dp_10">

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

@@ -1,8 +1,9 @@
 <?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
@@ -11,6 +12,7 @@
         android:layout_height="@dimen/dp_50" />
 
     <TextView
+        android:layout_marginTop="1dp"
         android:id="@+id/tv_title"
         android:layout_width="wrap_content"
         android:layout_height="17dp"