admin
2021-04-07 cbb88109494ffc7916f6639c20ce05c0cec941a9
library-BaiduCPU/src/main/java/com/yeshi/ec/library_baiducpu/fragment/BaiDuCPUContentFragment.java
@@ -58,14 +58,24 @@
    private boolean showAd;
    private BaiduCPUContentAdapter.IBaiDuCPUItemClickListener baiDuCPUItemClickListener;
    public static BaiDuCPUContentFragment newInstance(BaiDuCPUType spinnerItem, int viewType, boolean showAd) {
    public void setBaiDuCPUItemClickListener(BaiduCPUContentAdapter.IBaiDuCPUItemClickListener baiDuCPUItemClickListener) {
        this.baiDuCPUItemClickListener = baiDuCPUItemClickListener;
    }
    public static BaiDuCPUContentFragment newInstance(BaiDuCPUType spinnerItem, int viewType, boolean showAd, int refreshColor, BaiduCPUContentAdapter.IBaiDuCPUItemClickListener baiDuCPUItemClickListener) {
        BaiDuCPUContentFragment fragment = new BaiDuCPUContentFragment();
        Bundle bundle = new Bundle();
        bundle.putSerializable("item", spinnerItem);
        bundle.putInt("viewType", viewType);
        bundle.putBoolean("showAd", showAd);
        bundle.putInt("refreshColor", refreshColor);
        fragment.setArguments(bundle);
        fragment.setBaiDuCPUItemClickListener(baiDuCPUItemClickListener);
        return fragment;
    }
@@ -111,7 +121,7 @@
        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        footerView.setLayoutParams(params);
        footerView.setText("努力加载中...");
        footerView.setTextColor(Color.WHITE);
        footerView.setTextColor(Color.parseColor("#9FA5B3"));
        int padding = DimenUtils.dip2px(getContext(), 10);
        footerView.setPadding(padding, padding, padding, padding);
        footerView.setGravity(Gravity.CENTER);
@@ -170,6 +180,8 @@
            return;
        viewType = bundle.getInt("viewType");
        showAd = bundle.getBoolean("showAd", true);
        srl_news.setColorSchemeColors(bundle.getInt("refreshColor"));
        bundle.clear();
        mChannelId = item.getId();
@@ -179,7 +191,7 @@
         */
        mCpuManager.setLpFontSize(CpuLpFontSize.SMALL);
        mCpuManager.setLpDarkMode(true);
        adapter = new BaiduCPUContentAdapter(getContext(), viewType, nrAdList);
        adapter = new BaiduCPUContentAdapter(getContext(), viewType, nrAdList, baiDuCPUItemClickListener);
        rv_news.setAdapter(adapter);
        if (viewType == VIEW_TYPE_SMALLVIDEO) {