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


Java RecyclerViewSwipeManager.REACTION_CAN_SWIPE_BOTH属性代码示例

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


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

示例1: onGetSwipeReactionType

@Override
public int onGetSwipeReactionType(MyViewHolder holder, int position, int x, int y) {
    if (onCheckCanStartDrag(holder, position, x, y)) {
        return RecyclerViewSwipeManager.REACTION_CAN_NOT_SWIPE_BOTH;
    } else {
        return RecyclerViewSwipeManager.REACTION_CAN_SWIPE_BOTH;
    }
}
 
开发者ID:hanks-zyh,项目名称:RecylerView,代码行数:8,代码来源:MyDraggableSwipeableItemAdapter.java

示例2: onGetSwipeReactionType

@Override
public int onGetSwipeReactionType(MyViewHolder holder, int position, int x, int y) {
    if (onCheckCanStartDrag(holder, position, x, y)) {
        Log.d("zyh", "onCheckCanStartDrag," + position + "," + x + "," + y);
        return RecyclerViewSwipeManager.REACTION_CAN_NOT_SWIPE_BOTH;
    } else {
        Log.d("zyh", "onCheckCanStartDrag---," + position + "," + x + "," + y);
        return RecyclerViewSwipeManager.REACTION_CAN_SWIPE_BOTH;
    }
}
 
开发者ID:hanks-zyh,项目名称:RecylerView,代码行数:10,代码来源:MyAdapter.java

示例3: onGetSwipeReactionType

@Override
public int onGetSwipeReactionType(TaskViewHolder holder, int position, int x, int y) {
    if (onCheckCanStartDrag(holder, position, x, y)) {
        return RecyclerViewSwipeManager.REACTION_CAN_NOT_SWIPE_BOTH;
    } else {
        return RecyclerViewSwipeManager.REACTION_CAN_SWIPE_BOTH;
    }
}
 
开发者ID:hanks-zyh,项目名称:Conquer,代码行数:8,代码来源:MyTaskAdapter.java

示例4: ExampleSectionExpandableDataProvider

public ExampleSectionExpandableDataProvider() {
    final String groupItems = "|ABC|DEF|GHI|JKL|MNO|PQR|STU|VWX|YZ";
    final String childItems = "abc";

    mData = new LinkedList<>();

    int sectionCount = 1;

    for (int i = 0; i < groupItems.length(); i++) {
        //noinspection UnnecessaryLocalVariable
        final long groupId = i;
        final boolean isSection = (groupItems.charAt(i) == '|');
        final String groupText = isSection ? ("Section " + sectionCount) : Character.toString(groupItems.charAt(i));
        final int groupSwipeReaction = isSection ? RecyclerViewSwipeManager.REACTION_CAN_NOT_SWIPE_BOTH : RecyclerViewSwipeManager.REACTION_CAN_SWIPE_BOTH;
        final ConcreteGroupData group = new ConcreteGroupData(groupId, isSection, groupText, groupSwipeReaction);
        final List<ChildData> children = new ArrayList<>();

        if (isSection) {
            sectionCount += 1;
        } else {
            // add child items
            for (int j = 0; j < childItems.length(); j++) {
                final long childId = group.generateNewChildId();
                final String childText = Character.toString(childItems.charAt(j));
                final int childSwipeReaction = RecyclerViewSwipeManager.REACTION_CAN_SWIPE_BOTH;

                children.add(new ConcreteChildData(childId, childText, childSwipeReaction));
            }
        }

        mData.add(new Pair<GroupData, List<ChildData>>(group, children));
    }
}
 
开发者ID:pczhu,项目名称:android-advancedrecyclerview-master,代码行数:33,代码来源:ExampleSectionExpandableDataProvider.java


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