| | |
| | | import android.graphics.Color; |
| | | import android.graphics.Rect; |
| | | import android.os.Bundle; |
| | | import android.support.v4.widget.SwipeRefreshLayout; |
| | | import android.support.v7.widget.GridLayoutManager; |
| | | import android.support.v7.widget.LinearLayoutManager; |
| | | import android.support.v7.widget.RecyclerView; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | import android.util.Log; |
| | | import android.view.Gravity; |
| | | import android.view.View; |
| | |
| | | } |
| | | |
| | | |
| | | public static BaiDuCPUContentFragment newInstance(BaiDuCPUType spinnerItem, int viewType, boolean showAd, BaiduCPUContentAdapter.IBaiDuCPUItemClickListener 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; |
| | |
| | | return; |
| | | viewType = bundle.getInt("viewType"); |
| | | showAd = bundle.getBoolean("showAd", true); |
| | | srl_news.setColorSchemeColors(bundle.getInt("refreshColor")); |
| | | |
| | | bundle.clear(); |
| | | mChannelId = item.getId(); |
| | | |