|
@@ -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);
|
|
|
}
|