admin
2021-03-09 6aed6290ad05fe2aa125bb8e804e2e8c2f13a613
library-BaiduCPU/src/main/java/com/yeshi/ec/library_baiducpu/fragment/BaiDuCPUContentFragment.java
@@ -58,14 +58,21 @@
    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, BaiduCPUContentAdapter.IBaiDuCPUItemClickListener baiDuCPUItemClickListener) {
        BaiDuCPUContentFragment fragment = new BaiDuCPUContentFragment();
        Bundle bundle = new Bundle();
        bundle.putSerializable("item", spinnerItem);
        bundle.putInt("viewType", viewType);
        bundle.putBoolean("showAd", showAd);
        fragment.setArguments(bundle);
        fragment.setBaiDuCPUItemClickListener(baiDuCPUItemClickListener);
        return fragment;
    }
@@ -179,7 +186,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) {