浏览代码

安卓老师端新首页

Pq 3 年之前
父节点
当前提交
d9e2a08d1f

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

@@ -0,0 +1,34 @@
+package com.cooleshow.teacher.ui.main;
+
+import android.view.View;
+
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.Utils;
+import com.cooleshow.teacher.databinding.FragmentNewHomeLayoutBinding;
+import com.cooleshow.teacher.presenter.main.HomePresenter;
+
+/**
+ * Author by pq, Date on 2022/8/8.
+ */
+public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBinding, HomePresenter> {
+
+    @Override
+    protected void initView(View rootView) {
+        Utils.setHeadView(mViewBinding.viewStatusBar, requireContext(), 0);
+    }
+
+    @Override
+    protected void initData() {
+
+    }
+
+    @Override
+    protected FragmentNewHomeLayoutBinding getLayoutView() {
+        return FragmentNewHomeLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected HomePresenter createPresenter() {
+        return new HomePresenter();
+    }
+}

二进制
teacher/src/main/res/drawable-xhdpi/icon_scan_for_teacher.png


二进制
teacher/src/main/res/drawable-xxhdpi/icon_scan_for_teacher.png


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

@@ -6,7 +6,6 @@
     android:layout_height="match_parent">
 
     <androidx.constraintlayout.widget.ConstraintLayout
-
         android:layout_width="match_parent"
         android:layout_height="match_parent">
 
@@ -21,7 +20,6 @@
             app:layout_constraintLeft_toLeftOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
 
-
         <View
             android:id="@+id/view_status_bar"
             android:layout_width="match_parent"

+ 53 - 0
teacher/src/main/res/layout/fragment_new_home_layout.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:paddingStart="25dp">
+
+        <View
+            android:id="@+id/view_status_bar"
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_teacher_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:includeFontPadding="false"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_22"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_status_bar"
+            tools:text="您好,李老师" />
+
+        <ImageView
+            android:id="@+id/iv_vip"
+            android:layout_marginStart="6dp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/icon_vip_enable"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+            app:layout_constraintLeft_toRightOf="@+id/tv_teacher_name" />
+
+        <ImageView
+            android:visibility="gone"
+            android:id="@+id/iv_scan"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="5dp"
+            android:paddingStart="12dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="12dp"
+            android:paddingBottom="12dp"
+            android:src="@drawable/icon_scan_for_teacher" />
+
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.core.widget.NestedScrollView>