Sfoglia il codice sorgente

修改学生端首页精彩视频UI问题

Pq 2 anni fa
parent
commit
6edfc2f791

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

@@ -161,10 +161,10 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
         mViewBinding.recyclerviewRecommendTalent.addItemDecoration(commonItemDecoration);
         mViewBinding.recyclerviewRecommendTalent.setAdapter(mRecommendTalentAdapter);
 
-        GridLayoutManager videoCourseManager = new GridLayoutManager(getContext(), 2);
+        LinearLayoutManager videoCourseManager = new LinearLayoutManager(getContext(),LinearLayoutManager.HORIZONTAL,false);
         mViewBinding.rvVideoCourse.setLayoutManager(videoCourseManager);
         mHomeVideoCourseAdapter = new NewHomeVideoCourseAdapter();
-        CommonItemDecoration videoListItemDecoration = new CommonItemDecoration(SizeUtils.dp2px(12), SizeUtils.dp2px(5), 0, SizeUtils.dp2px(5), 0);
+        CommonItemDecoration videoListItemDecoration = new CommonItemDecoration(SizeUtils.dp2px(12), 0, 0, SizeUtils.dp2px(10), 0);
         mViewBinding.rvVideoCourse.addItemDecoration(videoListItemDecoration);
         mViewBinding.rvVideoCourse.setAdapter(mHomeVideoCourseAdapter);
 

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

@@ -643,8 +643,8 @@
                                 android:id="@+id/rv_video_course"
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_marginStart="9dp"
-                                android:layout_marginEnd="9dp"
+                                android:layout_marginStart="14dp"
+                                android:layout_marginEnd="14dp"
                                 android:overScrollMode="never"
                                 android:scrollbars="none"
                                 app:layout_constraintTop_toBottomOf="@+id/tv_video_course_title" />

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

@@ -2,7 +2,7 @@
 <androidx.constraintlayout.widget.ConstraintLayout 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_width="168dp"
     android:layout_height="wrap_content"
     android:background="@drawable/bg_white_10dp"
     android:paddingBottom="8dp">