Преглед на файлове

修改老师端首页热门曲目样式UI

Pq преди 2 години
родител
ревизия
e43b82a790

+ 5 - 3
teacher/src/main/java/com/cooleshow/teacher/adapter/HomeHotMusicSheetAdapter.java

@@ -9,6 +9,7 @@ import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.HomeHotMusicSheetBean;
 import com.cooleshow.teacher.bean.HomeHotMusicSheetItemBean;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.teacher.ui.main.NewHomeFragment;
 import com.cooleshow.teacher.widgets.HomeHotMusicSheetItemView;
 
 import androidx.annotation.NonNull;
@@ -37,10 +38,11 @@ public class HomeHotMusicSheetAdapter extends BaseQuickAdapter<HomeHotMusicSheet
                 HomeHotMusicSheetBean.RowsBean homeHotMusicSheetBean = homeHotMusicSheetItemBean.sheetBeans.get(i);
                 HomeHotMusicSheetItemView hotMusicSheetItemView = new HomeHotMusicSheetItemView(getContext());
                 hotMusicSheetItemView.setData(homeHotMusicSheetBean);
-                if (i != homeHotMusicSheetItemBean.sheetBeans.size() - 1) {
-                    hotMusicSheetItemView.setDividingLineIsShow(true);
-                } else {
+                int result = i % (NewHomeFragment.MAX_HOT_MUSIC_LIST_PAGE - 1);
+                if (i == homeHotMusicSheetItemBean.sheetBeans.size() - 1 && result == 0) {
                     hotMusicSheetItemView.setDividingLineIsShow(false);
+                } else {
+                    hotMusicSheetItemView.setDividingLineIsShow(true);
                 }
                 ll_container.addView(hotMusicSheetItemView);
             }

+ 1 - 1
teacher/src/main/res/layout/item_home_hot_music_sheet_layout.xml

@@ -2,7 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/ll_container"
     android:layout_width="312dp"
-    android:layout_height="wrap_content"
+    android:layout_height="match_parent"
     android:background="@drawable/shape_8dp_white"
     android:orientation="vertical">