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


Java SupportDividerItemDecoration类代码示例

本文整理汇总了Java中com.justwayward.reader.view.SupportDividerItemDecoration的典型用法代码示例。如果您正苦于以下问题:Java SupportDividerItemDecoration类的具体用法?Java SupportDividerItemDecoration怎么用?Java SupportDividerItemDecoration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: configViews

import com.justwayward.reader.view.SupportDividerItemDecoration; //导入依赖的package包/类
@Override
public void configViews() {
    mIndicator.setTabItemTitles(mDatas);
    mViewPager.setAdapter(mAdapter);
    mIndicator.setViewPager(mViewPager, 0);

    rvTags.setHasFixedSize(true);
    rvTags.setLayoutManager(new LinearLayoutManager(this));
    rvTags.addItemDecoration(new SupportDividerItemDecoration(this, LinearLayoutManager.VERTICAL));
    mTagAdapter = new SubjectTagsAdapter(this, mTagList);
    mTagAdapter.setItemClickListener(this);
    rvTags.setAdapter(mTagAdapter);

    mPresenter.attachView(this);
    mPresenter.getBookListTags();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:SubjectBookListActivity.java

示例2: configViews

import com.justwayward.reader.view.SupportDividerItemDecoration; //导入依赖的package包/类
@Override
public void configViews() {
    mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.addItemDecoration(new SupportDividerItemDecoration(mContext, LinearLayoutManager.VERTICAL, true));

    mAdapter = new FindAdapter(mContext, mList, this);
    mRecyclerView.setAdapter(mAdapter);

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:FindFragment.java

示例3: showBestComments

import com.justwayward.reader.view.SupportDividerItemDecoration; //导入依赖的package包/类
@Override
public void showBestComments(CommentList list) {
    if (list.comments.isEmpty()) {
        gone(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    } else {
        mBestCommentList.addAll(list.comments);
        headerViewHolder.rvBestComments.setHasFixedSize(true);
        headerViewHolder.rvBestComments.setLayoutManager(new LinearLayoutManager(this));
        headerViewHolder.rvBestComments.addItemDecoration(new SupportDividerItemDecoration(mContext, LinearLayoutManager.VERTICAL, true));
        mBestCommentListAdapter = new BestCommentListAdapter(mContext, mBestCommentList);
        mBestCommentListAdapter.setOnItemClickListener(this);
        headerViewHolder.rvBestComments.setAdapter(mBestCommentListAdapter);
        visible(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:BookHelpDetailActivity.java

示例4: configViews

import com.justwayward.reader.view.SupportDividerItemDecoration; //导入依赖的package包/类
@Override
public void configViews() {
    refreshLayout.setOnRefreshListener(new RefreshListener());

    mRecyclerView.setHasFixedSize(true);
    linearLayoutManager = new LinearLayoutManager(this);
    mRecyclerView.setLayoutManager(linearLayoutManager);
    mRecyclerView.addItemDecoration(new SupportDividerItemDecoration(mContext, LinearLayoutManager.VERTICAL));
    mAdapter = new BooksByTagAdapter(mContext, mList, this);
    mRecyclerView.setAdapter(mAdapter);
    mRecyclerView.addOnScrollListener(new RefreshListener());

    mPresenter.attachView(this);
    mPresenter.getBooksByTag(tag, current + "", (current + 10) + "");
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:BooksByTagActivity.java

示例5: showBestComments

import com.justwayward.reader.view.SupportDividerItemDecoration; //导入依赖的package包/类
@Override
public void showBestComments(CommentList list) {
    if(list.comments.isEmpty()){
        gone(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    }else{
        mBestCommentList.addAll(list.comments);
        headerViewHolder.rvBestComments.setHasFixedSize(true);
        headerViewHolder.rvBestComments.setLayoutManager(new LinearLayoutManager(this));
        headerViewHolder.rvBestComments.addItemDecoration(new SupportDividerItemDecoration(mContext, LinearLayoutManager.VERTICAL, true));
        mBestCommentListAdapter = new BestCommentListAdapter(mContext, mBestCommentList);
        mBestCommentListAdapter.setOnItemClickListener(this);
        headerViewHolder.rvBestComments.setAdapter(mBestCommentListAdapter);
        visible(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:BookReviewDetailActivity.java


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