|
|
@ -9,8 +9,14 @@ import com.bumptech.glide.Glide; |
|
|
import com.qhclh.ytzh.R; |
|
|
import com.qhclh.ytzh.R; |
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
import com.qhclh.ytzh.bean.FumudaiBean; |
|
|
import com.qhclh.ytzh.bean.FumudaiBean; |
|
|
|
|
|
import com.qhclh.ytzh.home.MainActivity; |
|
|
|
|
|
import com.qhclh.ytzh.index.HomepageEvent; |
|
|
import com.qhclh.ytzh.utils.RecyclerViewUtil; |
|
|
import com.qhclh.ytzh.utils.RecyclerViewUtil; |
|
|
|
|
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus; |
|
|
|
|
|
import org.greenrobot.eventbus.Subscribe; |
|
|
|
|
|
import org.greenrobot.eventbus.ThreadMode; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@ -36,6 +42,7 @@ public class FumudaiFragment extends BaseFragment { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void initView() { |
|
|
protected void initView() { |
|
|
|
|
|
EventBus.getDefault().register(this); |
|
|
Glide.with(getActivity()) |
|
|
Glide.with(getActivity()) |
|
|
.load("https://ss1.bdstatic.com/5aAHeD3nKgcUp2HgoI7O1ygwehsv/media/ch1000/png/2017shengdanbackground.png") |
|
|
.load("https://ss1.bdstatic.com/5aAHeD3nKgcUp2HgoI7O1ygwehsv/media/ch1000/png/2017shengdanbackground.png") |
|
|
.error(R.mipmap.ic_launcher_round) |
|
|
.error(R.mipmap.ic_launcher_round) |
|
|
@ -68,4 +75,40 @@ public class FumudaiFragment extends BaseFragment { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void onResume() { |
|
|
|
|
|
super.onResume(); |
|
|
|
|
|
if (MainActivity.homepageList.contains("005")){ |
|
|
|
|
|
rv_fuwudai.setVisibility(View.VISIBLE); |
|
|
|
|
|
}else { |
|
|
|
|
|
rv_fuwudai.setVisibility(View.GONE); |
|
|
|
|
|
} |
|
|
|
|
|
if (MainActivity.homepageList.contains("006")){ |
|
|
|
|
|
fumudai_banner.setVisibility(View.VISIBLE); |
|
|
|
|
|
}else { |
|
|
|
|
|
fumudai_banner.setVisibility(View.GONE); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN,sticky = true) |
|
|
|
|
|
public void onEvent(HomepageEvent event){ |
|
|
|
|
|
if (event.getHomepageList().contains("005")){ |
|
|
|
|
|
rv_fuwudai.setVisibility(View.VISIBLE); |
|
|
|
|
|
}else { |
|
|
|
|
|
rv_fuwudai.setVisibility(View.GONE); |
|
|
|
|
|
} |
|
|
|
|
|
if (event.getHomepageList().contains("006")){ |
|
|
|
|
|
fumudai_banner.setVisibility(View.VISIBLE); |
|
|
|
|
|
}else { |
|
|
|
|
|
fumudai_banner.setVisibility(View.GONE); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void onDestroy() { |
|
|
|
|
|
super.onDestroy(); |
|
|
|
|
|
EventBus.getDefault().unregister(this); |
|
|
|
|
|
} |
|
|
} |
|
|
} |