| | |
| | | |
| | | 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; |
| | | } |
| | | |
| | |
| | | */ |
| | | 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) { |