|
@@ -81,7 +81,7 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
private int degreeFlag = 0;//老师学历认证
|
|
private int degreeFlag = 0;//老师学历认证
|
|
private String entryStatus = "";//达人认证状态
|
|
private String entryStatus = "";//达人认证状态
|
|
private SmartRefreshLayout refreshLayout;
|
|
private SmartRefreshLayout refreshLayout;
|
|
- private HomeGoodMusicSheetAdapter mGoodMusicSheetAdapter;
|
|
|
|
|
|
+// private HomeGoodMusicSheetAdapter mGoodMusicSheetAdapter;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
protected void initView(View rootView) {
|
|
protected void initView(View rootView) {
|
|
@@ -100,13 +100,6 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
mViewBinding.rvHotAlbum.addItemDecoration(hotAlbumItemDecoration);
|
|
mViewBinding.rvHotAlbum.addItemDecoration(hotAlbumItemDecoration);
|
|
mViewBinding.rvHotAlbum.setAdapter(mAlbumAdapter);
|
|
mViewBinding.rvHotAlbum.setAdapter(mAlbumAdapter);
|
|
|
|
|
|
- mGoodMusicSheetAdapter = new HomeGoodMusicSheetAdapter();
|
|
|
|
- LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
|
|
|
- layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
|
|
|
- HomeHotMusicSheetItemDecoration itemDecoration2 = new HomeHotMusicSheetItemDecoration(0, SizeUtils.dp2px(12), 0, SizeUtils.dp2px(12), 0);
|
|
|
|
- mViewBinding.rvGoodTrack.addItemDecoration(itemDecoration2);
|
|
|
|
- mViewBinding.rvGoodTrack.setLayoutManager(layoutManager);
|
|
|
|
- mViewBinding.rvGoodTrack.setAdapter(mGoodMusicSheetAdapter);
|
|
|
|
|
|
|
|
LinearLayoutManager musicSheetManager = new LinearLayoutManager(getContext());
|
|
LinearLayoutManager musicSheetManager = new LinearLayoutManager(getContext());
|
|
musicSheetManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
|
musicSheetManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
|
@@ -151,13 +144,10 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
mViewBinding.bgAnnouncement2.setOnClickListener(this);
|
|
mViewBinding.bgAnnouncement2.setOnClickListener(this);
|
|
mViewBinding.tvHotAlbumMore.setOnClickListener(this);
|
|
mViewBinding.tvHotAlbumMore.setOnClickListener(this);
|
|
mViewBinding.tvHotTrackMore.setOnClickListener(this);
|
|
mViewBinding.tvHotTrackMore.setOnClickListener(this);
|
|
- mViewBinding.tvGoodTrackMore.setOnClickListener(this);
|
|
|
|
mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
|
|
mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
|
|
mViewBinding.refreshLayout.finishRefresh();
|
|
mViewBinding.refreshLayout.finishRefresh();
|
|
presenter.getHotAlbumList();
|
|
presenter.getHotAlbumList();
|
|
presenter.getHotMusicSheetList();
|
|
presenter.getHotMusicSheetList();
|
|
- //精品曲目
|
|
|
|
- presenter.getGoodMusicSheetList();
|
|
|
|
presenter.queryCountOfUnread();
|
|
presenter.queryCountOfUnread();
|
|
presenter.queryLiveAndVideo();
|
|
presenter.queryLiveAndVideo();
|
|
presenter.appHome();
|
|
presenter.appHome();
|
|
@@ -205,8 +195,6 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
presenter.getHotAlbumList();
|
|
presenter.getHotAlbumList();
|
|
//热门曲目
|
|
//热门曲目
|
|
presenter.getHotMusicSheetList();
|
|
presenter.getHotMusicSheetList();
|
|
- //精品曲目
|
|
|
|
- presenter.getGoodMusicSheetList();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -441,38 +429,6 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public void getGoodMusicSheetListSuccess(HomeHotMusicSheetBean homeHotMusicSheetBean) {
|
|
|
|
- if (isDetached() || homeHotMusicSheetBean == null) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- ArrayList<HomeHotMusicSheetItemBean> itemBeans = new ArrayList<>();
|
|
|
|
- List<HomeHotMusicSheetBean.RowsBean> rows = homeHotMusicSheetBean.rows;
|
|
|
|
- if (rows != null && rows.size() > 0) {
|
|
|
|
- mViewBinding.clGoodTrack.setVisibility(View.VISIBLE);
|
|
|
|
- int pageCount = 0;
|
|
|
|
- int pageResult = rows.size() % MAX_GOOD_MUSIC_LIST_PAGE;
|
|
|
|
- if (pageResult == 0) {
|
|
|
|
- pageCount = rows.size() / MAX_GOOD_MUSIC_LIST_PAGE;
|
|
|
|
- } else {
|
|
|
|
- pageCount = (rows.size() / MAX_GOOD_MUSIC_LIST_PAGE) + 1;
|
|
|
|
- }
|
|
|
|
- for (int i = 0; i < pageCount; i++) {
|
|
|
|
- HomeHotMusicSheetItemBean hotMusicSheetItemBean = new HomeHotMusicSheetItemBean();
|
|
|
|
- for (int k = i * MAX_GOOD_MUSIC_LIST_PAGE; k < rows.size() && k < (i + 1) * MAX_GOOD_MUSIC_LIST_PAGE; k++) {
|
|
|
|
- hotMusicSheetItemBean.sheetBeans.add(rows.get(k));
|
|
|
|
- }
|
|
|
|
- itemBeans.add(hotMusicSheetItemBean);
|
|
|
|
- }
|
|
|
|
- if (mGoodMusicSheetAdapter != null) {
|
|
|
|
- mGoodMusicSheetAdapter.setNewInstance(itemBeans);
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- mViewBinding.clGoodTrack.setVisibility(View.GONE);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
public void getTeacherInfoSuccess(TeacherUserInfo teacherUserInfo) {
|
|
public void getTeacherInfoSuccess(TeacherUserInfo teacherUserInfo) {
|
|
if (teacherUserInfo == null) {
|
|
if (teacherUserInfo == null) {
|
|
return;
|
|
return;
|
|
@@ -639,11 +595,6 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
WebStartHelper.startHotMusicSheetList();
|
|
WebStartHelper.startHotMusicSheetList();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(id == R.id.tv_good_track_more){
|
|
|
|
- //精品曲目更多
|
|
|
|
- WebStartHelper.startGoodMusicSheetList();
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
if (id == R.id.view_badge) {
|
|
if (id == R.id.view_badge) {
|
|
showBadgeDialog();
|
|
showBadgeDialog();
|
|
return;
|
|
return;
|