當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。