|
@@ -48,6 +48,7 @@ import com.cooleshow.student.contract.HomeContract;
|
|
|
import com.cooleshow.student.databinding.FragmentNewHomeLayoutBinding;
|
|
|
import com.cooleshow.student.presenter.main.HomePresenter;
|
|
|
import com.cooleshow.student.widgets.AppBarLayoutStateChangeListener;
|
|
|
+import com.cooleshow.student.widgets.DialogUtils;
|
|
|
import com.cooleshow.student.widgets.HomeHotAlbumDecoration;
|
|
|
import com.cooleshow.student.widgets.HomeHotMusicSheetItemDecoration;
|
|
|
import com.google.android.material.appbar.AppBarLayout;
|
|
@@ -96,6 +97,7 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
|
private HotNewsFragment mHotNewsFragment;
|
|
|
private ValueAnimator bottomTabValueAnimator;
|
|
|
private boolean isCollapsed = false;//控制底部tab
|
|
|
+ private boolean isShowFlashPage = false;
|
|
|
|
|
|
private ViewPager2.OnPageChangeCallback onPageChangeCallback = new ViewPager2.OnPageChangeCallback() {
|
|
|
@Override
|
|
@@ -405,6 +407,18 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
|
bindBanner(appHomeBean.banner);
|
|
|
//后台配置menu
|
|
|
initMenu(appHomeBean.appMenu);
|
|
|
+ showFlashDialog(appHomeBean.flashPage);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void showFlashDialog(List<AppHomeBean.ItemBean> flashPage) {
|
|
|
+ if (null == flashPage || flashPage.size() == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (isShowFlashPage) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ DialogUtils.showHomeDialog(getContext(), flashPage.get(0));
|
|
|
+ isShowFlashPage = true;
|
|
|
}
|
|
|
|
|
|
/**
|