本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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