Browse Source

增加VIP设置页面样式

Pq 7 months ago
parent
commit
3f539d5571

+ 7 - 0
BaseLibrary/src/main/res/drawable/shape_ffffff_6dp_border_e3efed_1dp.xml

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

+ 7 - 0
teacher/src/main/AndroidManifest.xml

@@ -368,6 +368,13 @@
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustPan" />
 
+
+        <activity
+            android:name=".ui.course.VIPCourseSettingActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden|fontScale|smallestScreenSize|screenLayout|uiMode"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan" />
+
         <activity
             android:name="com.tencent.tauth.AuthActivity"
             android:launchMode="singleTask"

+ 17 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/VIPCourseSettingContract.java

@@ -0,0 +1,17 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/5/20 10:34
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface VIPCourseSettingContract {
+    interface View extends BaseView {
+
+    }
+    interface Presenter {
+    }
+}

+ 14 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/course/VIPCourseSettingPresenter.java

@@ -0,0 +1,14 @@
+package com.cooleshow.teacher.presenter.course;
+
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.teacher.contract.CreateLiveCourseArrangementContract;
+import com.cooleshow.teacher.contract.VIPCourseSettingContract;
+
+/**
+ * 创建日期:2022/5/20 10:33
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class VIPCourseSettingPresenter extends BasePresenter<VIPCourseSettingContract.View> implements VIPCourseSettingContract.Presenter {
+}

+ 71 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/course/VIPCourseSettingActivity.java

@@ -0,0 +1,71 @@
+package com.cooleshow.teacher.ui.course;
+
+import android.view.View;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.adapter.HomePageVipCourseAdapter;
+import com.cooleshow.teacher.databinding.AcVipCourseSettingLayoutBinding;
+import com.cooleshow.teacher.presenter.course.VIPCourseSettingPresenter;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+/**
+ * Author by pq, Date on 2024/11/15.
+ */
+public class VIPCourseSettingActivity extends BaseMVPActivity<AcVipCourseSettingLayoutBinding, VIPCourseSettingPresenter> implements View.OnClickListener {
+
+    private HomePageVipCourseAdapter mAdapter;
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar,"VIP定制课设置");
+        viewBinding.toolbarInclude.tvRight.setVisibility(View.VISIBLE);
+        viewBinding.toolbarInclude.tvRight.setImageResource(R.drawable.icon_question_mark);
+        viewBinding.toolbarInclude.tvRight.setOnClickListener(this);
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+
+        RecyclerView rvAddress = viewBinding.recyclerView;
+        LinearLayoutManager manager = new LinearLayoutManager(this);
+        rvAddress.setLayoutManager(manager);
+        mAdapter = new HomePageVipCourseAdapter();
+        EmptyViewLayout mEmptyView = new EmptyViewLayout(this);
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程");
+        mAdapter.setEmptyView(mEmptyView);
+        rvAddress.setAdapter(mAdapter);
+
+        initListener();
+    }
+
+    private void initListener() {
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+            }
+        });
+    }
+
+    @Override
+    protected AcVipCourseSettingLayoutBinding getLayoutView() {
+        return AcVipCourseSettingLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected VIPCourseSettingPresenter createPresenter() {
+        return new VIPCourseSettingPresenter();
+    }
+
+    @Override
+    public void onClick(View v) {
+
+    }
+}

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


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


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


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


+ 55 - 0
teacher/src/main/res/layout/ac_vip_course_setting_layout.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <FrameLayout
+        android:layout_marginEnd="14dp"
+        android:layout_marginStart="14dp"
+        android:id="@+id/fl_setting"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:layout_marginTop="12dp"
+        android:background="@drawable/shape_ffffff_6dp_border_e3efed_1dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:drawableStart="@drawable/icon_create_vip_course_options"
+            android:drawablePadding="4dp"
+            android:text="添加课程方案"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_15" />
+    </FrameLayout>
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/fl_setting"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:srlEnableLoadMore="false">
+
+
+        <androidx.recyclerview.widget.RecyclerView
+            app:layout_constraintBottom_toBottomOf="parent"
+            android:id="@+id/recyclerView"
+            app:layout_constraintTop_toBottomOf="@+id/fl_setting"
+            app:layout_constraintLeft_toLeftOf="parent"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="12dp"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 2
teacher/src/main/res/layout/activity_home_page_new_layout.xml

@@ -424,7 +424,6 @@
             android:layout_height="wrap_content"
             android:paddingStart="14dp"
             android:paddingEnd="14dp"
-            android:background="@color/color_f8f9fc"
             app:layout_constraintLeft_toLeftOf="parent"
             app:tabBackground="@color/transparent"
             app:tabGravity="fill"
@@ -441,7 +440,6 @@
     </com.google.android.material.appbar.AppBarLayout>
 
     <androidx.viewpager2.widget.ViewPager2
-        android:background="@color/color_f8f9fc"
         android:id="@+id/view_pager"
         android:layout_width="match_parent"
         android:layout_height="match_parent"

+ 3 - 3
teacher/src/main/res/layout/item_hp_vip_course_list_layout.xml

@@ -44,21 +44,21 @@
         tools:text="¥"
         android:text="¥"
         android:textColor="@color/color_ff6827"
-        android:textSize="@dimen/sp_12"
+        android:textSize="@dimen/sp_14"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         tools:ignore="MissingConstraints" />
 
     <TextView
         android:paddingStart="3dp"
-        android:layout_marginTop="6dp"
+        android:layout_marginTop="2dp"
         android:id="@+id/tv_price"
         app:layout_constraintBottom_toBottomOf="@+id/iv_icon"
         app:layout_constraintTop_toBottomOf="@+id/tv_title"
         app:layout_constraintLeft_toRightOf="@+id/tv_price_unit"
         tools:text="280"
         android:textColor="@color/color_ff6827"
-        android:textSize="@dimen/sp_14"
+        android:textSize="@dimen/sp_20"
         android:includeFontPadding="false"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"

+ 1 - 1
teacher/src/main/res/values/styles.xml

@@ -5,7 +5,7 @@
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
-        <item name="android:windowBackground">@color/color_f8f8f8</item>
+        <item name="android:windowBackground">@color/color_f8f9fc</item>
     </style>
 
     <style name="SplashTheme" parent="AppTheme">