最后当然是 Fragment。
- public class CategoryFragment extends BaseFragment implements ICategoryView, OnRefreshListener, OnLoadMoreListener {
- public static final String CATEGORY_NAME = "com.nanchen.aiyagirl.module.category.CategoryFragment.CATEGORY_NAME";
- @BindView(R.id.recyclerView)
- RecyclerViewWithFooter mRecyclerView;
- @BindView(R.id.swipe_refresh_layout)
- SwipeRefreshLayout mSwipeRefreshLayout;
- private String categoryName;
- private CategoryRecyclerAdapter mAdapter;
- private ICategoryPresenter mICategoryPresenter;
- public static CategoryFragment newInstance(String mCategoryName) {
- CategoryFragment categoryFragment = new CategoryFragment();
- Bundle bundle = new Bundle();
- bundle.putString(CATEGORY_NAME, mCategoryName);
- categoryFragment.setArguments(bundle);
推荐阅读
在上一篇教程《pyspider 爬虫教程 (1):HTML 和 CSS 选择》中,我们应用 self.crawl API 抓取豆瓣片子的 HTML 内容,并应用 CSS 选择器解析了一些内容。不过,如今的网站经由过程应用 AJA>>>详细阅读
本文标题:浅淡MVP的实战演习,让代码结构更简单~
地址:http://www.17bianji.com/lsqh/35192.html
1/2 1