Browse Source

修改学生端首页部分UI

Pq 2 years ago
parent
commit
d0d3b1f5b3

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

@@ -1,5 +1,6 @@
 package com.cooleshow.student.adapter;
 
+import android.text.TextUtils;
 import android.view.View;
 import android.widget.ImageView;
 
@@ -28,7 +29,7 @@ public class HomeRecommendTalentAdapter extends BaseQuickAdapter<RecommendTalent
         //昵称
         holder.setText(R.id.tv_name, data.username);
         //毕业院校
-        holder.setText(R.id.tv_tip, data.graduateSchool);
+        holder.setText(R.id.tv_tip, TextUtils.isEmpty(data.graduateSchool) ? "认证达人" : data.graduateSchool);
         //是否直播中
         View tv_live_tip = holder.getView(R.id.tv_live_tip);
         if (data.living) {

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

@@ -92,7 +92,7 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
     private HotNewsFragment mHotNewsFragment;
     private ValueAnimator bottomTabValueAnimator;
     private boolean isCollapsed = false;//控制底部tab
-    
+
     private ViewPager2.OnPageChangeCallback onPageChangeCallback = new ViewPager2.OnPageChangeCallback() {
         @Override
         public void onPageSelected(int position) {

+ 6 - 4
student/src/main/res/layout/fragment_home_menu.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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_93"
+    android:layout_height="@dimen/dp_67"
     android:orientation="horizontal"
     android:paddingLeft="@dimen/dp_10"
     android:paddingRight="@dimen/dp_10">
@@ -10,5 +10,7 @@
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/rv_menu"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-</LinearLayout>
+        android:layout_height="match_parent"
+        android:overScrollMode="never"
+        android:scrollbars="none" />
+</FrameLayout>

+ 2 - 2
student/src/main/res/layout/fragment_new_home_layout.xml

@@ -238,10 +238,10 @@
 
                         <androidx.viewpager.widget.ViewPager
                             android:id="@+id/viewpager_menu"
+                            android:minHeight="67dp"
                             android:layout_width="match_parent"
-                            android:layout_height="@dimen/dp_93"
+                            android:layout_height="67dp"
                             android:layout_marginTop="@dimen/dp_8"
-                            android:layout_marginBottom="@dimen/dp_2"
                             app:layout_constraintLeft_toLeftOf="parent"
                             app:layout_constraintTop_toBottomOf="@+id/bg_announcement" />
 

+ 6 - 3
student/src/main/res/layout/item_home_recommend_talent_layot.xml

@@ -3,7 +3,8 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="110dp"
-    android:layout_height="146dp"
+    android:layout_height="wrap_content"
+    android:paddingBottom="16dp"
     android:background="@drawable/shape_10dp_white">
 
     <de.hdodenhof.circleimageview.CircleImageView
@@ -47,7 +48,7 @@
         android:id="@+id/tv_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="14dp"
+        android:layout_marginTop="13dp"
         android:ellipsize="end"
         android:includeFontPadding="false"
         android:maxLines="1"
@@ -71,8 +72,10 @@
         android:maxLines="1"
         android:textColor="@color/color_999999"
         android:textSize="@dimen/sp_12"
+        android:paddingStart="5dp"
+        android:paddingEnd="5dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/tv_name"
-        tools:text="中国音乐学院" />
+        tools:text="中国音乐学院中国音乐学院" />
 </androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -7,13 +7,13 @@
 
     <ImageView
         android:id="@+id/im_pic"
-        android:layout_width="@dimen/dp_51"
-        android:layout_height="@dimen/dp_51" />
+        android:layout_width="@dimen/dp_50"
+        android:layout_height="@dimen/dp_50" />
 
     <TextView
         android:id="@+id/tv_title"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="17dp"
         android:textColor="@color/color_333333"
         android:textSize="@dimen/sp_12" />
 </LinearLayout>