Browse Source

修改老师端个人主页课程样式

Pq 3 months ago
parent
commit
7f9cb8a2b9
19 changed files with 196 additions and 360 deletions
  1. 5 0
      BaseLibrary/src/main/res/drawable/shape_12ff802c_2dp.xml
  2. 5 0
      BaseLibrary/src/main/res/drawable/shape_66000000_3dp.xml
  3. 4 1
      teacher/src/main/java/com/cooleshow/teacher/adapter/MineLiveCourseListAdapter.java
  4. 9 0
      teacher/src/main/java/com/cooleshow/teacher/ui/homepage/InterestCorrectCoursePageFragment.java
  5. 24 14
      teacher/src/main/java/com/cooleshow/teacher/ui/homepage/LiveCoursePageFragment.java
  6. 10 1
      teacher/src/main/java/com/cooleshow/teacher/ui/homepage/VIPCustomCoursePageFragment.java
  7. 29 12
      teacher/src/main/java/com/cooleshow/teacher/widgets/HomePageCourseCommonHeaderView.java
  8. 0 90
      teacher/src/main/java/com/cooleshow/teacher/widgets/InterestCoursePageHeaderView.java
  9. BIN
      teacher/src/main/res/drawable-xhdpi/icon_live_course_set.png
  10. BIN
      teacher/src/main/res/drawable-xhdpi/icon_live_course_time_tag.png
  11. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_live_course_set.png
  12. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_live_course_time_tag.png
  13. 2 1
      teacher/src/main/res/layout/fragment_interest_correct_course_page_layout.xml
  14. 5 40
      teacher/src/main/res/layout/fragment_live_course_page_layout.xml
  15. 2 1
      teacher/src/main/res/layout/fragment_vip_custom_course_page_layout.xml
  16. 92 92
      teacher/src/main/res/layout/item_home_page_live_course_list_layout.xml
  17. 2 1
      teacher/src/main/res/layout/item_hp_common_course_header_layout.xml
  18. 0 107
      teacher/src/main/res/layout/item_hp_interest_course_header_layout.xml
  19. 7 0
      teacher/src/main/res/values/strings.xml

+ 5 - 0
BaseLibrary/src/main/res/drawable/shape_12ff802c_2dp.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#12ff802c"/>
+    <corners android:radius="2dp"/>
+</shape>

+ 5 - 0
BaseLibrary/src/main/res/drawable/shape_66000000_3dp.xml

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

+ 4 - 1
teacher/src/main/java/com/cooleshow/teacher/adapter/MineLiveCourseListAdapter.java

@@ -35,10 +35,13 @@ public class MineLiveCourseListAdapter extends BaseQuickAdapter<MineLiveCourseLi
         if (data == null) {
             return;
         }
+        String timeStr = TextUtils.isEmpty(data.courseStartTime) ? "" : TimeUtils.date2String(TimeUtils.string2Date(data.courseStartTime), "yyyy-MM-dd HH:mm");
         //时间
-        holder.setText(R.id.tv_time, TextUtils.isEmpty(data.courseStartTime) ? "" : TimeUtils.date2String(TimeUtils.string2Date(data.courseStartTime), "yyyy-MM-dd HH:mm"));
+        holder.setText(R.id.tv_time, "开课时间:" + timeStr);
         //title
         holder.setText(R.id.tv_title, data.courseGroupName);
+        //介绍
+        holder.setText(R.id.tv_des, data.courseIntroduce);
         //subjectName
         holder.setText(R.id.tv_course_name, data.subjectName);
         //购买人数

+ 9 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/InterestCorrectCoursePageFragment.java

@@ -6,6 +6,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.listener.OnItemClickListener;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.HomePageVipCourseAdapter;
 import com.cooleshow.teacher.bean.VideoCourseListBean;
 import com.cooleshow.teacher.contract.VideoCoursePageContract;
@@ -25,10 +26,18 @@ import androidx.recyclerview.widget.RecyclerView;
  * Author by pq, Date on 2022/5/9.
  */
 public class InterestCorrectCoursePageFragment extends BaseMVPFragment<FragmentInterestCorrectCoursePageLayoutBinding, InterestCoursePagePresenter> implements VideoCoursePageContract.VideoCoursePageView, View.OnClickListener {
+    public static final String TIP_CACHE_KEY = "interest_tip_key";
     private HomePageVipCourseAdapter mPageVipCourseAdapter;
 
     @Override
     protected void initView(View rootView) {
+        mViewBinding.commonHeader.setDataStyle(TIP_CACHE_KEY, R.drawable.icon_vip_custom_course_des_tag, getString(R.string.interest_course_des_title), getString(R.string.interest_correct_course_des), R.drawable.icon_interest_course_set,getString(R.string.set_interest_course_text), new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+            }
+        });
+
         RecyclerView rvAddress = mViewBinding.recyclerView;
         LinearLayoutManager manager = new LinearLayoutManager(getContext());
         rvAddress.setLayoutManager(manager);

+ 24 - 14
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/LiveCoursePageFragment.java

@@ -36,6 +36,7 @@ import java.util.Date;
  * 我的主页-直播课
  */
 public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePageLayoutBinding, LiveCoursePagePresenter> implements LiveCoursePageContract.LiveCoursePageView, View.OnClickListener {
+    public static final String TIP_CACHE_KEY = "live_course_tip_key";
     private int currentPage;
     private MineLiveCourseListAdapter mAdapter;
     private EmptyViewLayout mEmptyView;
@@ -47,12 +48,20 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
 
     @Override
     protected void initView(View rootView) {
-        mViewBinding.tvCreateLiveCourse.setOnClickListener(this);
         mViewBinding.tvOpen.setOnClickListener(this);
     }
 
     @Override
     protected void initData() {
+
+        mViewBinding.commonHeader.setDataStyle(TIP_CACHE_KEY, R.drawable.icon_vip_custom_course_des_tag, getString(R.string.live_course_des_title), getString(R.string.live_course_des), R.drawable.icon_live_course_set,getString(R.string.create_live_course_text), new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                goCreate();
+            }
+        });
+
+
         Date currentSelectDate = TimeUtils.getNowDate();
         String targetDateTimeStr = TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"));
 //        currentFilterDate = targetDateTimeStr;
@@ -96,19 +105,6 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
-            case R.id.tv_create_live_course:
-                if (liveFlag == 0) {
-                    ARouter.getInstance()
-                            .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                            .withString(WebConstants.WEB_URL, WebConstants.TEACHER_OPEN_LIVE)
-                            .navigation();
-                } else {
-                    ARouter.getInstance()
-                            .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                            .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_CREATE)
-                            .navigation();
-                }
-                break;
             case R.id.tv_open:
                 if (mViewBinding.tvOpen.getText().toString().equals("去认证")) {
                     ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
@@ -126,6 +122,20 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
 
     }
 
+    private void goCreate() {
+        if (liveFlag == 0) {
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_OPEN_LIVE)
+                    .navigation();
+        } else {
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_CREATE)
+                    .navigation();
+        }
+    }
+
     @Override
     public void onResume() {
         super.onResume();

+ 10 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/VIPCustomCoursePageFragment.java

@@ -24,7 +24,6 @@ import com.cooleshow.teacher.databinding.FragmentVipCustomCoursePageLayoutBindin
 import com.cooleshow.teacher.presenter.homePage.VIPCustomCoursePagePresenter;
 import com.cooleshow.teacher.presenter.homePage.VideoCoursePagePresenter;
 import com.cooleshow.teacher.ui.course.MineVideoCourseActivity;
-import com.cooleshow.teacher.widgets.VIPCustomCoursePageHeaderView;
 import com.cooleshow.usercenter.bean.TeacherUserInfo;
 import com.scwang.smart.refresh.layout.api.RefreshLayout;
 import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
@@ -39,9 +38,19 @@ import androidx.recyclerview.widget.RecyclerView;
  */
 public class VIPCustomCoursePageFragment extends BaseMVPFragment<FragmentVipCustomCoursePageLayoutBinding, VIPCustomCoursePagePresenter> implements VIPCustomCoursePageContract.View, View.OnClickListener {
     private HomePageVipCourseAdapter mPageVipCourseAdapter;
+    public static final String TIP_CACHE_KEY = "vip_course_tip_key";
+
 
     @Override
     protected void initView(View rootView) {
+
+        mViewBinding.commonHeader.setDataStyle(TIP_CACHE_KEY,R.drawable.icon_vip_custom_course_des_tag, getString(R.string.vip_course_des_title), getString(R.string.vip_custom_course_des), R.drawable.icon_vip_course_set,getString(R.string.set_vip_course_confirm_text), new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+            }
+        });
+
         RecyclerView rvAddress = mViewBinding.recyclerView;
         LinearLayoutManager manager = new LinearLayoutManager(getContext());
         rvAddress.setLayoutManager(manager);

+ 29 - 12
teacher/src/main/java/com/cooleshow/teacher/widgets/VIPCustomCoursePageHeaderView.java → teacher/src/main/java/com/cooleshow/teacher/widgets/HomePageCourseCommonHeaderView.java

@@ -6,7 +6,6 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.cooleshow.teacher.R;
@@ -20,29 +19,33 @@ import androidx.core.widget.NestedScrollView;
 /**
  * Author by pq, Date on 2024/11/15.
  */
-public class VIPCustomCoursePageHeaderView extends NestedScrollView implements View.OnClickListener {
-    public static final String TIP_CACHE_KEY = "vip_course_tip_key";
+public class HomePageCourseCommonHeaderView extends NestedScrollView implements View.OnClickListener {
+    private String cache_key = "";
     private ConstraintLayout mCsDes;
     private ImageView mIvCloseDes;
     private TextView mTvNotRemind;
     private FrameLayout mFlSetting;
+    private ImageView mIvTag;
+    private TextView mTitle;
+    private TextView mTvDes;
+    private TextView mTvConfirm;
 
 
-    public VIPCustomCoursePageHeaderView(@NonNull Context context) {
+    public HomePageCourseCommonHeaderView(@NonNull Context context) {
         this(context,null);
     }
 
-    public VIPCustomCoursePageHeaderView(@NonNull Context context, @Nullable AttributeSet attrs) {
+    public HomePageCourseCommonHeaderView(@NonNull Context context, @Nullable AttributeSet attrs) {
         this(context, attrs,-1);
     }
 
-    public VIPCustomCoursePageHeaderView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+    public HomePageCourseCommonHeaderView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
         super(context, attrs, defStyleAttr);
         init();
     }
 
     private void init(){
-        LayoutInflater.from(getContext()).inflate(R.layout.item_hp_vip_custom_course_header_layout,this);
+        LayoutInflater.from(getContext()).inflate(R.layout.item_hp_common_course_header_layout,this);
         initView();
         initData();
     }
@@ -53,12 +56,29 @@ public class VIPCustomCoursePageHeaderView extends NestedScrollView implements V
         mIvCloseDes = findViewById(R.id.iv_close_des);
         mTvNotRemind = findViewById(R.id.tv_not_remind);
         mFlSetting = findViewById(R.id.fl_setting);
+        mIvTag = findViewById(R.id.iv_tag);
+        mTitle = findViewById(R.id.tv_des_title);
+        mTvDes = findViewById(R.id.tv_des);
+        mTvConfirm = findViewById(R.id.tv_confirm);
     }
 
     private void initData() {
         mIvCloseDes.setOnClickListener(this);
         mTvNotRemind.setOnClickListener(this);
         mFlSetting.setOnClickListener(this);
+    }
+
+    public void setDataStyle(String cacheKey,int tagRes,String title,String des,int confirmTag,String confirmText,View.OnClickListener onClickListener){
+        if(mIvTag == null){
+            return;
+        }
+        this.cache_key =cacheKey;
+        mIvTag.setImageResource(tagRes);
+        mTitle.setText(title);
+        mTvDes.setText(des);
+        mTvConfirm.setText(confirmText);
+        mTvConfirm.setCompoundDrawablesWithIntrinsicBounds(confirmTag,0,0,0);
+        mFlSetting.setOnClickListener(onClickListener);
         boolean showTip = isShowTip();
         mCsDes.setVisibility(showTip ? View.VISIBLE : View.GONE);
     }
@@ -75,18 +95,15 @@ public class VIPCustomCoursePageHeaderView extends NestedScrollView implements V
             updateCache();
             return;
         }
-        if (id == R.id.fl_setting) {
-            return;
-        }
     }
 
     private void updateCache() {
         String userId = UserHelper.getUserId();
-        UserHelper.setCustomCache(TIP_CACHE_KEY + "_" + userId, 1);
+        UserHelper.setCustomCache(cache_key + "_" + userId, 1);
     }
 
     private boolean isShowTip() {
         String userId = UserHelper.getUserId();
-        return UserHelper.getCustomCacheForInt(TIP_CACHE_KEY + "_" + userId) == 0;
+        return UserHelper.getCustomCacheForInt(cache_key + "_" + userId) == 0;
     }
 }

+ 0 - 90
teacher/src/main/java/com/cooleshow/teacher/widgets/InterestCoursePageHeaderView.java

@@ -1,90 +0,0 @@
-package com.cooleshow.teacher.widgets;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.cooleshow.teacher.R;
-import com.cooleshow.usercenter.helper.UserHelper;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.constraintlayout.widget.ConstraintLayout;
-import androidx.core.widget.NestedScrollView;
-
-/**
- * Author by pq, Date on 2024/11/15.
- */
-public class InterestCoursePageHeaderView extends NestedScrollView implements View.OnClickListener {
-    public static final String TIP_CACHE_KEY = "interest_tip_key";
-    private ConstraintLayout mCsDes;
-    private ImageView mIvCloseDes;
-    private TextView mTvNotRemind;
-    private FrameLayout mFlSetting;
-
-    public InterestCoursePageHeaderView(@NonNull Context context) {
-        this(context, null);
-    }
-
-    public InterestCoursePageHeaderView(@NonNull Context context, @Nullable AttributeSet attrs) {
-        this(context, attrs, -1);
-    }
-
-    public InterestCoursePageHeaderView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
-        super(context, attrs, defStyleAttr);
-        init();
-    }
-
-    private void init() {
-        LayoutInflater.from(getContext()).inflate(R.layout.item_hp_interest_course_header_layout, this);
-        initView();
-        initData();
-    }
-
-
-    private void initView() {
-        mCsDes = findViewById(R.id.cs_des);
-        mIvCloseDes = findViewById(R.id.iv_close_des);
-        mTvNotRemind = findViewById(R.id.tv_not_remind);
-        mFlSetting = findViewById(R.id.fl_setting);
-    }
-
-    private void initData() {
-        mIvCloseDes.setOnClickListener(this);
-        mTvNotRemind.setOnClickListener(this);
-        mFlSetting.setOnClickListener(this);
-        boolean showTip = isShowTip();
-        mCsDes.setVisibility(showTip ? View.VISIBLE : View.GONE);
-    }
-
-    @Override
-    public void onClick(View v) {
-        int id = v.getId();
-        if (id == R.id.iv_close_des) {
-            mCsDes.setVisibility(View.GONE);
-            return;
-        }
-        if (id == R.id.tv_not_remind) {
-            mCsDes.setVisibility(View.GONE);
-            updateCache();
-            return;
-        }
-        if (id == R.id.fl_setting) {
-            return;
-        }
-    }
-
-    private void updateCache() {
-        String userId = UserHelper.getUserId();
-        UserHelper.setCustomCache(TIP_CACHE_KEY + "_" + userId, 1);
-    }
-
-    private boolean isShowTip() {
-        String userId = UserHelper.getUserId();
-        return UserHelper.getCustomCacheForInt(TIP_CACHE_KEY + "_" + userId) == 0;
-    }
-}

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


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


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


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


+ 2 - 1
teacher/src/main/res/layout/fragment_interest_correct_course_page_layout.xml

@@ -8,7 +8,8 @@
     android:paddingStart="14dp"
     android:paddingEnd="14dp">
 
-    <com.cooleshow.teacher.widgets.InterestCoursePageHeaderView
+    <com.cooleshow.teacher.widgets.HomePageCourseCommonHeaderView
+        android:id="@+id/common_header"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"/>
 

+ 5 - 40
teacher/src/main/res/layout/fragment_live_course_page_layout.xml

@@ -5,51 +5,16 @@
     android:layout_height="match_parent">
 
     <LinearLayout
+        android:paddingEnd="14dp"
+        android:paddingStart="14dp"
         android:id="@+id/ll_content"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical">
-
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/ll_create_live"
+        <com.cooleshow.teacher.widgets.HomePageCourseCommonHeaderView
+            android:id="@+id/common_header"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_56"
-            android:layout_marginLeft="14dp"
-            android:layout_marginTop="14dp"
-            android:layout_marginRight="14dp"
-            android:background="@drawable/bg_white_10dp"
-            android:gravity="center"
-            android:orientation="horizontal">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="14dp"
-                android:layout_marginLeft="2dp"
-                android:text="我的直播课"
-                android:textColor="@color/black_333"
-                android:textSize="@dimen/sp_18"
-                android:textStyle="bold"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-            <TextView
-                android:id="@+id/tv_create_live_course"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginEnd="14dp"
-                android:drawableRight="@drawable/icon_arrow_right_small_green"
-                android:drawablePadding="5dp"
-                android:gravity="center"
-                android:text="创建课程"
-                android:textStyle="bold"
-                android:textSize="@dimen/sp_16"
-                android:textColor="@color/color_2dc7aa"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-        </androidx.constraintlayout.widget.ConstraintLayout>
+            android:layout_height="wrap_content"/>
 
         <com.scwang.smart.refresh.layout.SmartRefreshLayout
             android:id="@+id/refreshLayout"

+ 2 - 1
teacher/src/main/res/layout/fragment_vip_custom_course_page_layout.xml

@@ -8,7 +8,8 @@
     android:paddingStart="14dp"
     android:paddingEnd="14dp">
 
-    <com.cooleshow.teacher.widgets.VIPCustomCoursePageHeaderView
+    <com.cooleshow.teacher.widgets.HomePageCourseCommonHeaderView
+        android:id="@+id/common_header"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"/>
 

+ 92 - 92
teacher/src/main/res/layout/item_home_page_live_course_list_layout.xml

@@ -4,29 +4,59 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_marginStart="14dp"
-    android:layout_marginTop="12dp"
-    android:layout_marginEnd="14dp"
-    android:background="@drawable/bg_white_10dp"
-    android:paddingStart="14dp"
+    android:layout_marginBottom="12dp"
+    android:background="@drawable/bg_white_6dp"
+    android:paddingStart="12dp"
+    android:paddingEnd="12dp"
     android:paddingBottom="9dp">
 
     <TextView
-        android:id="@+id/tv_status_title"
+        android:drawableStart="@drawable/icon_live_course_time_tag"
+        android:id="@+id/tv_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="9dp"
-        android:text="课程状态"
+        android:includeFontPadding="false"
         android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
         android:textStyle="bold"
+        android:drawablePadding="6dp"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="开课时间:2024-11-16 09:30" />
+
+    <com.cooleshow.base.widgets.QMUIRadiusImageView
+        android:id="@+id/iv_bg"
+        android:layout_width="0dp"
+        app:layout_constraintDimensionRatio="h,16:9"
+        app:layout_constraintRight_toRightOf="parent"
+        android:layout_height="0dp"
+        android:layout_marginTop="11dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_time"
+        app:qmui_corner_radius="6dp" />
+
+    <TextView
+        android:id="@+id/tv_course_name"
+        android:layout_width="wrap_content"
+        android:layout_height="@dimen/dp_19"
+        android:layout_marginTop="8dp"
+        android:layout_marginStart="@dimen/dp_8"
+        android:background="@drawable/shape_66000000_3dp"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:paddingStart="@dimen/dp_6"
+        android:paddingEnd="@dimen/dp_6"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintTop_toTopOf="@+id/iv_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
+        tools:text="单簧管" />
 
     <TextView
         android:id="@+id/tv_course_status_tip"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="7dp"
         android:background="@drawable/shape_ffe7e7_15dp_left"
         android:gravity="center"
         android:paddingStart="12dp"
@@ -36,60 +66,86 @@
         android:text="销售中"
         android:textColor="@color/color_ff1919"
         android:textSize="@dimen/sp_10"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        app:layout_constraintBottom_toBottomOf="@+id/tv_course_name"
+        app:layout_constraintRight_toRightOf="@+id/iv_bg"
+        app:layout_constraintTop_toTopOf="@+id/tv_course_name" />
 
-    <com.cooleshow.base.widgets.QMUIRadiusImageView
-        android:id="@+id/iv_bg"
-        android:layout_width="105dp"
-        android:layout_height="71dp"
-        android:layout_marginTop="11dp"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/tv_status_title"
-        app:qmui_corner_radius="5dp" />
 
     <TextView
         android:id="@+id/tv_title"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="10dp"
-        android:layout_marginEnd="10dp"
         android:ellipsize="end"
         android:includeFontPadding="false"
-        android:maxLines="2"
+        android:maxLines="1"
         android:textColor="@color/color_1a1a1a"
         android:textSize="@dimen/sp_16"
         android:textStyle="bold"
-        app:layout_constraintLeft_toRightOf="@+id/iv_bg"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/iv_bg"
+        android:layout_marginTop="8dp"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
+        app:layout_constraintRight_toRightOf="@+id/iv_bg"
+        app:layout_constraintTop_toBottomOf="@+id/iv_bg"
         app:layout_constraintVertical_chainStyle="packed"
         tools:text="张豆张豆豆豆" />
 
     <TextView
+        android:id="@+id/tv_des"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_777777"
+        android:textSize="@dimen/sp_14"
+        android:layout_marginTop="4dp"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
+        app:layout_constraintRight_toRightOf="@+id/iv_bg"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        tools:text="国际著名长笛演奏家、教育家子珊女士为您讲教育家子珊女士为您讲教育家子珊女士为您讲" />
+
+    <TextView
+        android:id="@+id/tv_buy_num"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="11dp"
+        android:background="@drawable/shape_12ff802c_2dp"
+        android:textColor="@color/color_ff6827"
+        android:textSize="@dimen/sp_12"
+        android:visibility="visible"
+        android:paddingStart="4dp"
+        android:paddingEnd="4dp"
+        android:paddingTop="3dp"
+        android:paddingBottom="3dp"
+        android:includeFontPadding="false"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_des"
+        tools:text="6人已购买" />
+
+
+    <TextView
         android:id="@+id/tv_price"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginRight="11dp"
-        android:paddingStart="14dp"
         android:text="¥120"
-        android:textColor="@color/color_ff0000"
-        android:textSize="@dimen/sp_15"
+        android:textColor="@color/color_f44541"
+        android:textSize="@dimen/sp_20"
         android:textStyle="bold"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_bg"
-        app:layout_constraintLeft_toRightOf="@+id/iv_bg" />
+        android:includeFontPadding="false"
+        app:layout_constraintTop_toTopOf="@+id/tv_buy_num"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_buy_num"
+        app:layout_constraintRight_toLeftOf="@+id/tv_price_unit" />
 
     <TextView
+        android:includeFontPadding="false"
         android:id="@+id/tv_price_unit"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginRight="11dp"
-        android:paddingStart="7dp"
+        android:paddingStart="2dp"
         android:text="/4课时"
         android:textColor="@color/color_999999"
-        android:textSize="@dimen/sp_14"
-        app:layout_constraintBaseline_toBaselineOf="@+id/tv_price"
-        app:layout_constraintLeft_toRightOf="@+id/tv_price" />
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_price" />
 
     <ImageView
         android:layout_width="wrap_content"
@@ -101,62 +157,6 @@
         app:layout_constraintLeft_toRightOf="@+id/tv_title"
         app:layout_constraintTop_toTopOf="@+id/tv_title" />
 
-    <TextView
-        android:id="@+id/tv_course_name"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/dp_13"
-        android:layout_marginStart="@dimen/dp_3"
-        android:layout_marginBottom="@dimen/dp_4"
-        android:background="@drawable/gray_1_radius_bg"
-        android:gravity="center"
-        android:includeFontPadding="false"
-        android:paddingStart="@dimen/dp_3"
-        android:paddingEnd="@dimen/dp_3"
-        android:textColor="@color/white"
-        android:textSize="@dimen/sp_9"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_bg"
-        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
-        tools:text="单簧管" />
-
-
-    <TextView
-        android:id="@+id/tv_buy_num"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="9dp"
-        android:layout_marginEnd="14dp"
-        android:textColor="@color/color_ff802c"
-        android:textSize="@dimen/sp_11"
-        android:visibility="visible"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/view_line"
-        tools:text="6人已购买" />
-
-    <View
-        android:id="@+id/view_line"
-        android:layout_width="0dp"
-        android:layout_height="1dp"
-        android:layout_marginTop="15dp"
-        android:layout_marginEnd="14dp"
-        android:background="@color/color_f2f2f2"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/iv_bg" />
-
-
-    <TextView
-        android:id="@+id/tv_time"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="9dp"
-        android:includeFontPadding="false"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/view_line"
-        tools:text="2021/09/17 14:00~14:25" />
 
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 1
teacher/src/main/res/layout/item_hp_vip_custom_course_header_layout.xml → teacher/src/main/res/layout/item_hp_common_course_header_layout.xml

@@ -6,6 +6,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto">
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/cs_des"
+        android:layout_marginBottom="12dp"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@drawable/bg_white_6dp"
@@ -87,13 +88,13 @@
         android:id="@+id/fl_setting"
         android:layout_width="match_parent"
         android:layout_height="36dp"
-        android:layout_marginTop="12dp"
         android:background="@drawable/shape_2dc7aa_51e1d0_6dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/cs_des">
 
         <TextView
+            android:id="@+id/tv_confirm"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"

+ 0 - 107
teacher/src/main/res/layout/item_hp_interest_course_header_layout.xml

@@ -1,107 +0,0 @@
-<?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="wrap_content"
-    android:orientation="vertical"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/cs_des"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@drawable/bg_white_6dp"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent">
-
-        <ImageView
-            android:id="@+id/iv_tag"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="12dp"
-            android:layout_marginTop="12dp"
-            android:src="@drawable/icon_vip_custom_course_des_tag"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/tv_des_title"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingStart="6dp"
-            android:text="什么是趣纠课?"
-            android:textColor="@color/color_333333"
-            android:textSize="@dimen/sp_15"
-            app:layout_constraintBottom_toBottomOf="@+id/iv_tag"
-            app:layout_constraintLeft_toRightOf="@+id/iv_tag"
-            app:layout_constraintTop_toTopOf="@+id/iv_tag" />
-
-        <ImageView
-            android:id="@+id/iv_close_des"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:padding="13dp"
-            android:src="@drawable/icon_close_gray"
-            app:layout_constraintBottom_toBottomOf="@+id/tv_des_title"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/tv_des_title" />
-
-        <TextView
-            android:id="@+id/tv_des"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:paddingStart="13dp"
-            android:paddingTop="10dp"
-            android:paddingEnd="13dp"
-            android:text="@string/interest_correct_course_des"
-            android:textColor="@color/color_777777"
-            android:textSize="@dimen/sp_13"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/tv_des_title" />
-
-
-        <View
-            android:id="@+id/view_line"
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_marginStart="13dp"
-            android:layout_marginTop="10dp"
-            android:layout_marginEnd="13dp"
-            android:background="@color/color_f2f2f2"
-            app:layout_constraintTop_toBottomOf="@+id/tv_des" />
-
-        <TextView
-            android:id="@+id/tv_not_remind"
-            android:layout_width="0dp"
-            android:layout_height="38dp"
-            android:gravity="center"
-            android:text="不再提醒"
-            android:textColor="@color/color_2dc7aa"
-            android:textSize="@dimen/sp_13"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/view_line" />
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <FrameLayout
-        android:id="@+id/fl_setting"
-        android:layout_width="match_parent"
-        android:layout_height="36dp"
-        android:layout_marginTop="12dp"
-        android:background="@drawable/shape_2dc7aa_51e1d0_6dp"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/cs_des">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:drawableStart="@drawable/icon_interest_course_set"
-            android:drawablePadding="4dp"
-            android:text="设置趣纠课"
-            android:textColor="@color/white"
-            android:textSize="@dimen/sp_15" />
-    </FrameLayout>
-
-</LinearLayout>

+ 7 - 0
teacher/src/main/res/values/strings.xml

@@ -55,5 +55,12 @@
     <string name="app_info_record">增值电信业务经营许可证:鄂B2-20231246\n网络安全等级保护备案号:42010043158-24001\nCopyright@2021-2024|酷乐秀 colexiu.com 版权所有</string>
     <string name="vip_custom_course_des">VIP定制课是专为每位学员量身打造的1v1线上课程。老师将根据您的学习需求和希望达到的成果,定制专属的教学内容。为了确保最佳的上课体验,建议您在约课前与老师充分沟通,达成一致后,根据老师的空闲时间安排上课时间。</string>
     <string name="interest_correct_course_des">趣纠课是老师在您的练习过程中提供的个性化指导服务,旨在纠正错误并帮助您更好地理解和掌握所学内容。上课形式为1v1线上课程。</string>
+    <string name="vip_course_des_title">什么是VIP定制课?</string>
+    <string name="set_vip_course_confirm_text">设置VIP定制课</string>
+    <string name="interest_course_des_title">什么是趣纠课?</string>
+    <string name="set_interest_course_text">设置趣纠课</string>
+    <string name="create_live_course_text">创建直播课</string>
+    <string name="live_course_des_title">什么是直播课?</string>
+    <string name="live_course_des">直播课是老师根据教学目的精心编排的课程,按照固定时间进行直播授课。您可根据老师开放的课程内容,选择自己感兴趣的课程进行学习。如果您错过了直播,也不必担心,可以随时观看直播回放。</string>
 
 </resources>