当前位置: 首页>>代码示例>>Java>>正文


Java MultiTypeAdapter.setItems方法代码示例

本文整理汇总了Java中me.drakeet.multitype.MultiTypeAdapter.setItems方法的典型用法代码示例。如果您正苦于以下问题:Java MultiTypeAdapter.setItems方法的具体用法?Java MultiTypeAdapter.setItems怎么用?Java MultiTypeAdapter.setItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在me.drakeet.multitype.MultiTypeAdapter的用法示例。


在下文中一共展示了MultiTypeAdapter.setItems方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView(final View view) {
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(HomeTopPager.class, new HomeTopPagerBinder());
    mAdapter.register(LongButton.class, new LongButtonBinder(getActivity()));
    mAdapter.register(Line.class, new GreyLineBinder());
    mAdapter.register(GreyArea.class, new GreyAreaBinder());
    mAdapter.register(Banner.class, new BannerBinder(getActivity()));
    mAdapter.register(TextHeader.class, new TextHeaderBinder(TextHeaderBinder.FLAG_HOME));
    mAdapter.register(HomeItem.class, new HomeItemBinder(getActivity()));
    mAdapter.register(HomeItemCollection.class, new HomeItemCollectionBinder(getActivity()));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:18,代码来源:HomeFragment.java

示例2: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView(View view) {
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(HomeItem.class, new HomeItemBinder(getActivity()));
    mAdapter.register(FoundCategoryDetailCollection.class, new FoundCategoryDetailCollectionBinder(getChildFragmentManager(), getActivity()));
    mAdapter.register(Line.class, new GreyLineBinder());
    mAdapter.register(GreyArea.class, new GreyAreaBinder());
    mAdapter.register(TextHeader.class, new TextHeaderBinder(TextHeaderBinder.FLAG_FOUND));
    mAdapter.register(EndArea.class, new EndAreaBinder(EndAreaBinder.FLAG_TEXT_COLOR_BLACK));
    mAdapter.register(AuthorCollectionItem.class, new AuthorCollectionItemBinder(getActivity()));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:17,代码来源:CategoryViewPagerFragment.java

示例3: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView() {
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Banner.class, new FoundBannerBinder());
    mAdapter.register(TextHeader.class, new TextHeaderBinder(TextHeaderBinder.FLAG_FOUND));
    mAdapter.register(HomeItem.class, new HomeItemBinder(getActivity()));
    mAdapter.register(GreyArea.class, new GreyAreaBinder());
    mAdapter.register(CollectionItem.class, new SquareCardCollectionBinder(getActivity()));
    mAdapter.register(Line.class, new GreyLineBinder());
    mAdapter.register(FoundCategorySubjectItem.class, new FoundCategorySubjectItemBinder(getChildFragmentManager(), getActivity()));
    mAdapter.register(FoundCategoryItem.class, new FoundCategoryItemBinder(getActivity()));
    mAdapter.register(EndArea.class, new EndAreaBinder(EndAreaBinder.FLAG_TEXT_COLOR_BLACK));
    mAdapter.register(LeftAlignTextHeader.class, new LeftAlignTextHeaderBinder());
    mAdapter.register(AuthorCard.class, new AuthorCardBinder(getActivity()));
    mAdapter.register(AuthorCollectionItem.class, new AuthorCollectionItemBinder(getActivity()));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:21,代码来源:FoundViewPagerFragment.java

示例4: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView(View view) {
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Line.class, new GreyLineBinder());
    mAdapter.register(GreyArea.class, new GreyAreaBinder());
    mAdapter.register(TextHeader.class, new TextHeaderBinder(TextHeaderBinder.FLAG_FOUND));
    mAdapter.register(EndArea.class, new EndAreaBinder(EndAreaBinder.FLAG_TEXT_COLOR_BLACK));
    mAdapter.register(FoundCategoryDetailCollection.class, new FoundCategoryDetailCollectionBinder(getChildFragmentManager(), getActivity()));
    mAdapter.register(AuthorCollectionItem.class, new AuthorCollectionItemBinder(getActivity()));
    mAdapter.register(MovieDetailRelateItem.class, new MovieDetailRelateItemBinder(getActivity(), MovieDetailRelateItemBinder.FLAG_BLACK_WORD_COLOR));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:17,代码来源:AuthorViewPagerFragment.java

示例5: initViews

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
@Override
protected void initViews(View view) {
    Toolbar toolbar = view.findViewById(R.id.toolbar_title);
    mRecyclerView = view.findViewById(R.id.recycler_view);
    mRefreshLayout = view.findViewById(R.id.refresh_layout);
    initToolBar(toolbar, true, mTitle);
    toolbar.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            mRecyclerView.smoothScrollToPosition(0);
        }
    });
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    mRecyclerView.setHasFixedSize(true);
    // 设置下拉刷新的按钮的颜色
    mRefreshLayout.setColorSchemeColors(mSettingHelper.getColor());
    mRefreshLayout.setOnRefreshListener(this);

    mAdapter = new MultiTypeAdapter();
    mAdapter.register(PostsListBean.class, new PostsListViewBinder());
    mAdapter.register(FooterBean.class, new FooterViewBinder());
    mAdapter.setItems(mOldItems);
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:iMeiji,项目名称:Daily,代码行数:25,代码来源:PostsListView.java

示例6: init

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void init() {
    mRecyclerView = (RecyclerView) findViewById(R.id.me_recycle_view);
    final LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    mRecyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
    mRecyclerView.setLayoutManager(layoutManager);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(SettingImgTvItem.class, new SettingImgTvItemViewBinder());
    mAdapter.register(AvatarItem.class,new AvatarItemViewBinder());
    mAdapter.register(TextViewItem.class, new TextItemViewBinder());

    list.add(new AvatarItem());
    for (int i = 0; i < 10; i++) {
        SettingImgTvItem item = new SettingImgTvItem();
        item.title = "item:" + (i+1);
        list.add(item);
    }

    TextViewItem item1 = new TextViewItem();
    item1.text = ResourceUtil.getString(R.string.about_copyright);
    list.add(item1);

    mAdapter.setItems(list);
    mAdapter.notifyDataSetChanged();
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:whiskeyfei,项目名称:SimpleNews.io,代码行数:26,代码来源:MeActivity.java

示例7: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView(){
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Banner.class, new BannerBinder(this));
    mAdapter.register(VideoItem.class, new VideoItemBinder(this));
    mAdapter.register(TextHeader.class, new TextHeaderBinder(TextHeaderBinder.FLAG_HOME));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:12,代码来源:DailyActivity.java

示例8: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView(View view) {
    mRecyclerView = (RecyclerView) view.findViewById(R.id.follow_recycler_view);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Line.class, new GreyLineBinder());
    mAdapter.register(AuthorCollectionItem.class, new AuthorCollectionItemBinder(getActivity()));
    mAdapter.register(FoundCategoryItem.class, new FoundCategoryItemBinder(getActivity()));
    mAdapter.register(GreyArea.class, new GreyAreaBinder());
    mAdapter.register(EndArea.class, new EndAreaBinder(EndAreaBinder.FLAG_TEXT_COLOR_BLACK));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:15,代码来源:FollowFragment.java

示例9: initRecyclerView

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecyclerView() {
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Category.class, new ReplyCategoryBinder());
    mAdapter.register(ReplyInfoItem.class, new ReplyInfoItemBinder());
    mAdapter.register(EndArea.class, new EndAreaBinder(EndAreaBinder.FLAG_TEXT_COLOR_WHITE));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:12,代码来源:ReplyFragment.java

示例10: initRecycler

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecycler(View view) {
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(AuthorCollectionItem.class, new AuthorCollectionItemBinder(getActivity()));
    mAdapter.register(VideoItem.class, new VideoItemBinder(getActivity()));
    mAdapter.register(EndArea.class, new EndAreaBinder(EndAreaBinder.FLAG_TEXT_COLOR_BLACK));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:13,代码来源:SearchFragment.java

示例11: initRecycler

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecycler(View view) {
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(VideoItem.class, new VideoItemBinder(getActivity()));

    mItems = new Items();
    mAdapter.setItems(mItems);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:11,代码来源:RankViewPagerFragment.java

示例12: initRecycler

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecycler() {
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Banner.class, new FoundCategoryRecyclerItemBinder(mActivity));


    mItems = new Items();
    mAdapter.setItems(mItems);
    LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
    layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:13,代码来源:FoundCategoryItemBinder.java

示例13: initRecycler

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecycler() {
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(CollectionItem.class, new HomeCollectionItemBinder(mActivity));
    mAdapter.register(Line.class, new VerticalLineBinder());

    mItems = new Items();
    mAdapter.setItems(mItems);
    LinearLayoutManager manager = new LinearLayoutManager(mActivity);
    manager.setOrientation(LinearLayoutManager.HORIZONTAL);
    recyclerView.setLayoutManager(manager);
    recyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:13,代码来源:HomeItemCollectionBinder.java

示例14: initRecycler

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
public void initRecycler() {
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Banner.class, new SquareCardBinder(mActivity));
    mAdapter.register(Line.class, new VerticalLineBinder());

    mItems = new Items();
    mAdapter.setItems(mItems);
    LinearLayoutManager manager = new LinearLayoutManager(mActivity);
    manager.setOrientation(LinearLayoutManager.HORIZONTAL);
    recyclerView.setLayoutManager(manager);
    recyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:13,代码来源:SquareCardCollectionBinder.java

示例15: initRecycler

import me.drakeet.multitype.MultiTypeAdapter; //导入方法依赖的package包/类
private void initRecycler() {
    mAdapter = new MultiTypeAdapter();
    mAdapter.register(Line.class, new VerticalLineBinder());
    mAdapter.register(CollectionItem.class, new HomeCollectionItemBinder(mActivity));

    mItems = new Items();
    mAdapter.setItems(mItems);
    LinearLayoutManager manager = new LinearLayoutManager(mActivity);
    manager.setOrientation(LinearLayoutManager.HORIZONTAL);
    recyclerView.setLayoutManager(manager);
    recyclerView.setAdapter(mAdapter);
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:13,代码来源:AuthorCollectionItemBinder.java


注:本文中的me.drakeet.multitype.MultiTypeAdapter.setItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。