Browse Source

修改学生端页面样式

Pq 8 months ago
parent
commit
3985148424

+ 2 - 1
student/src/main/AndroidManifest.xml

@@ -154,7 +154,8 @@
         <activity
             android:name=".ui.course.MineCourseActivity"
             android:configChanges="orientation|screenSize|keyboardHidden|fontScale|smallestScreenSize|screenLayout|uiMode"
-            android:screenOrientation="portrait" />
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan"/>
         <activity
             android:name=".ui.work.HomeWorkActivity"
             android:configChanges="orientation|screenSize|keyboardHidden|fontScale|smallestScreenSize|screenLayout|uiMode"

+ 1 - 1
student/src/main/java/com/cooleshow/student/adapter/HomeRecommendTalentAdapter.java

@@ -33,7 +33,7 @@ public class HomeRecommendTalentAdapter extends BaseQuickAdapter<RecommendTalent
         //昵称
         holder.setText(R.id.tv_name, data.username);
         //毕业院校
-        holder.setText(R.id.tv_tip, TextUtils.isEmpty(data.graduateSchool) ? "认证老师" : data.graduateSchool);
+        holder.setText(R.id.tv_tip, TextUtils.isEmpty(data.fansNum) ? "--人已关注" : data.fansNum+"人已关注");
         //是否直播中
         View tv_live_tip = holder.getView(R.id.tv_live_tip);
         LottieAnimationView view_live_anim = holder.getView(R.id.view_live_anim);

+ 5 - 1
student/src/main/java/com/cooleshow/student/adapter/NewHomeVideoCourseAdapter.java

@@ -34,11 +34,15 @@ public class NewHomeVideoCourseAdapter extends BaseQuickAdapter<HomeLiveAndVideo
         ImageView iv_cover = helper.getView(R.id.iv_cover);
         GlideUtils.INSTANCE.loadTopRoundImage(getContext(), item.lessonCoverUrl, iv_cover, 10, com.cooleshow.base.R.drawable.bg_video_placeholder);
 
+
+        ImageView iv_avatar = helper.getView(R.id.iv_avatar);
+        GlideUtils.INSTANCE.loadImage(getContext(),item.avatar,iv_avatar,R.drawable.icon_teacher_default_head);
+
         helper.setText(R.id.subject_name, item.subjectName);
         TextView tv_title = helper.getView(R.id.tv_title);
         tv_title.setText(item.videoGroupName);
         TextView tv_teacher_name = helper.getView(R.id.tv_name);
         tv_teacher_name.setText(item.teacherName);
-        helper.setText(R.id.tv_tip, item.buyCount + "人学");
+        helper.setText(R.id.tv_tip, item.buyCount + "人学");
     }
 }

+ 1 - 1
student/src/main/java/com/cooleshow/student/adapter/PianoCourseGroupCourseListAdapter.java

@@ -36,7 +36,7 @@ public class PianoCourseGroupCourseListAdapter extends BaseQuickAdapter<VIPCours
 
         ImageView iv_attendance_status = holder.getView(R.id.iv_attendance_status);
 
-        holder.setText(R.id.tv_name, getStudentNames(data.getCourseStudentVos()));
+        holder.setText(R.id.tv_name, data.getUserName());
 
         holder.setText(R.id.tv_course_name, data.getSubjectName());
 

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

@@ -93,7 +93,6 @@ public class HomeLiveAndVideoBean {
         public String avatar;
         public long courseGroupId;
         public String courseGroupName;
-        public String courseName;
         public long courseId;
         public String courseStartTime;
         public String courseEndTime;

+ 1 - 0
student/src/main/java/com/cooleshow/student/bean/RecommendTalentListBean.java

@@ -82,4 +82,5 @@ public class RecommendTalentListBean {
     public String videoDate;
     public String workUnit;
     public boolean watch;
+    public String fansNum;
 }

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

@@ -131,8 +131,6 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
         mViewBinding.flCourseEnter.setOnClickListener(this);
         mViewBinding.tvRecommendTeacherMore.setOnClickListener(this);
         mViewBinding.tvVideoCourseMore.setOnClickListener(this);
-        mViewBinding.viewTalentStyleClick.setOnClickListener(this);
-        mViewBinding.viewHotNewsClick.setOnClickListener(this);
     }
 
     @Override
@@ -298,12 +296,10 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
                         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);
                         }
@@ -754,35 +750,6 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
      */
     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();
     }
 
     /**

+ 4 - 98
student/src/main/res/layout/fg_new_home_v2_layout.xml

@@ -105,7 +105,6 @@
                     android:id="@+id/collapsing_toolbar_layout"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="22dp"
                     android:paddingBottom="0dp"
                     app:layout_scrollFlags="scroll"
                     app:scrimAnimationDuration="50"
@@ -491,7 +490,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:layout_marginTop="@dimen/dp_20"
-                            android:visibility="visible"
+                            android:visibility="gone"
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintTop_toBottomOf="@+id/cs_recommend_talent">
 
@@ -551,9 +550,11 @@
                         </androidx.constraintlayout.widget.ConstraintLayout>
 
                         <LinearLayout
+                            android:gravity="center_vertical"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:layout_marginTop="20dp"
+                            android:orientation="horizontal"
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintTop_toBottomOf="@+id/cl_video_course">
 
@@ -578,104 +579,9 @@
                                 android:textSize="@dimen/sp_17"
                                 android:textStyle="bold"
                                 app:layout_constraintLeft_toRightOf="@+id/tv_news_line"
-                                app:layout_constraintTop_toTopOf="parent" />
+                                app:layout_constraintTop_toTopOf="@+id/tv_news_line" />
                         </LinearLayout>
                     </androidx.constraintlayout.widget.ConstraintLayout>
-
-                    <androidx.constraintlayout.widget.ConstraintLayout
-                        android:id="@+id/cs_bottom_tab"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:paddingTop="8dp"
-                        android:visibility="gone"
-                        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"
-                            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" />
-
-
-                        <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>
 

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

@@ -15,7 +15,7 @@
         android:layout_marginTop="20dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent"
-        app:qmui_corner_radius="@dimen/dp_5" />
+        app:qmui_corner_radius="@dimen/dp_6" />
 
     <TextView
         android:id="@+id/tv_content"

+ 1 - 0
student/src/main/res/layout/item_home_recommend_talent_layot.xml

@@ -94,6 +94,7 @@
 
 
     <TextView
+        android:visibility="gone"
         android:id="@+id/tv_focus"
         android:layout_width="58dp"
         android:layout_height="24dp"

+ 27 - 25
student/src/main/res/layout/item_home_video_list_layout.xml

@@ -35,58 +35,60 @@
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="11dp"
-        android:layout_marginTop="7dp"
+        android:layout_marginTop="6dp"
         android:layout_marginEnd="11dp"
         android:ellipsize="end"
         android:includeFontPadding="false"
         android:maxLines="1"
-        android:textColor="@color/color_333333"
+        android:textColor="@color/color_131415"
         android:textSize="@dimen/sp_14"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/iv_cover"
         tools:text="长笛入门教学" />
 
-
+        
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/iv_avatar"
+        android:layout_marginTop="6dp"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        android:layout_width="20dp"
+        android:layout_height="20dp"/>
+    
     <TextView
         android:id="@+id/tv_name"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="11dp"
-        android:layout_marginTop="6dp"
+        android:paddingStart="3dp"
         android:layout_marginEnd="5dp"
         android:ellipsize="end"
         android:includeFontPadding="false"
         android:maxLines="1"
         android:textColor="@color/color_999999"
         android:textSize="@dimen/sp_12"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toLeftOf="@+id/view_point"
-        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        app:layout_constraintRight_toLeftOf="@+id/tv_tip"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintTop_toTopOf="@+id/iv_avatar"
         tools:text="长笛入门教学" />
 
     <TextView
         android:id="@+id/tv_tip"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="6dp"
-        android:layout_marginEnd="12dp"
-        android:ellipsize="end"
-        android:includeFontPadding="false"
-        android:maxLines="1"
-        android:textColor="@color/color_ff8901"
+        android:background="@drawable/shape_12ff802c_2dp"
+        android:textColor="@color/color_ff6827"
         android:textSize="@dimen/sp_12"
+        android:paddingStart="4dp"
+        android:paddingEnd="4dp"
+        android:layout_marginEnd="14dp"
+        android:paddingTop="3dp"
+        android:paddingBottom="3dp"
+        android:includeFontPadding="false"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/tv_title"
-        tools:text="1422人在学" />
+        tools:text="6人学习" />
 
-    <View
-        android:id="@+id/view_point"
-        android:layout_width="4dp"
-        android:layout_height="4dp"
-        android:layout_marginEnd="5dp"
-        android:layout_marginBottom="5dp"
-        android:background="@drawable/shape_ff8901_4dp"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_tip"
-        app:layout_constraintRight_toLeftOf="@+id/tv_tip" />
 </androidx.constraintlayout.widget.ConstraintLayout>