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


Java SwipeMenuRecyclerView.LoadMoreView方法代码示例

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


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

示例1: drawHorizontal

import com.yanzhenjie.recyclerview.swipe.SwipeMenuRecyclerView; //导入方法依赖的package包/类
public void drawHorizontal(Canvas c, RecyclerView parent) {
    c.save();
    int childCount = parent.getChildCount();
    for (int i = 0; i < childCount; i++) {
        final View child = parent.getChildAt(i);
        int childPosition = parent.getChildAdapterPosition(child);
        if (childPosition < 0) continue;
        if (mViewTypeList.contains(parent.getAdapter().getItemViewType(childPosition))) continue;
        if (child instanceof SwipeMenuRecyclerView.LoadMoreView) continue;
        final int left = child.getLeft();
        final int top = child.getBottom();
        final int right = child.getRight();
        final int bottom = top + mDividerHeight;
        mDivider.setBounds(left, top, right, bottom);
        mDivider.draw(c);
    }
    c.restore();
}
 
开发者ID:yanzhenjie,项目名称:SwipeRecyclerView,代码行数:19,代码来源:DefaultItemDecoration.java

示例2: drawVertical

import com.yanzhenjie.recyclerview.swipe.SwipeMenuRecyclerView; //导入方法依赖的package包/类
public void drawVertical(Canvas c, RecyclerView parent) {
    c.save();
    final int childCount = parent.getChildCount();
    for (int i = 0; i < childCount; i++) {
        final View child = parent.getChildAt(i);
        int childPosition = parent.getChildAdapterPosition(child);
        if (childPosition < 0) continue;
        if (mViewTypeList.contains(parent.getAdapter().getItemViewType(childPosition))) continue;
        if (child instanceof SwipeMenuRecyclerView.LoadMoreView) continue;
        final int left = child.getRight();
        final int top = child.getTop();
        final int right = left + mDividerWidth;
        final int bottom = child.getBottom();

        mDivider.setBounds(left, top, right, bottom);
        mDivider.draw(c);
    }
    c.restore();
}
 
开发者ID:yanzhenjie,项目名称:SwipeRecyclerView,代码行数:20,代码来源:DefaultItemDecoration.java


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