本文整理汇总了Java中com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND属性的典型用法代码示例。如果您正苦于以下问题:Java RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND属性的具体用法?Java RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND怎么用?Java RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager
的用法示例。
在下文中一共展示了RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSetSwipeBackground
@Override
public void onSetSwipeBackground(MyViewHolder holder, int position, int type) {
int bgRes = 0;
switch (type) {
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_NEUTRAL_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_neutral;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_left;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_RIGHT_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_right;
break;
}
holder.itemView.setBackgroundResource(bgRes);
}
示例2: onSetSwipeBackground
@Override
public void onSetSwipeBackground(MyViewHolder holder, int position, int type) {
Log.d("zyh", "onSetSwipeBackground---," + position + "," + type);
int bgRes = 0;
switch (type) {
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_NEUTRAL_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_neutral;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_left;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_RIGHT_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_right;
break;
}
holder.itemView.setBackgroundResource(bgRes);
}
示例3: onSetSwipeBackground
@Override
public void onSetSwipeBackground(TaskViewHolder holder, int position, int type) {
int bgRes = 0;
switch (type) {
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_NEUTRAL_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_neutral;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_left; //左边滑动出现的布局,应该算是一个drawable
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_RIGHT_BACKGROUND:
bgRes = R.drawable.bg_swipe_item_right; //右边滑动出现的布局
break;
}
holder.itemView.setBackgroundResource(bgRes);
}
示例4: onSetGroupItemSwipeBackground
@Override
public void onSetGroupItemSwipeBackground(MyGroupViewHolder holder, int groupPosition, int type) {
int bgResId = 0;
switch (type) {
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_NEUTRAL_BACKGROUND:
bgResId = R.drawable.bg_swipe_item_neutral;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND:
bgResId = R.drawable.bg_swipe_group_item_left;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_RIGHT_BACKGROUND:
bgResId = R.drawable.bg_swipe_group_item_right;
break;
}
holder.itemView.setBackgroundResource(bgResId);
}
开发者ID:pczhu,项目名称:android-advancedrecyclerview-master,代码行数:17,代码来源:MyExpandableDraggableSwipeableItemAdapter.java
示例5: onSetChildItemSwipeBackground
@Override
public void onSetChildItemSwipeBackground(MyChildViewHolder holder, int groupPosition, int childPosition, int type) {
int bgResId = 0;
switch (type) {
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_NEUTRAL_BACKGROUND:
bgResId = R.drawable.bg_swipe_item_neutral;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND:
bgResId = R.drawable.bg_swipe_item_left;
break;
case RecyclerViewSwipeManager.DRAWABLE_SWIPE_RIGHT_BACKGROUND:
bgResId = R.drawable.bg_swipe_item_right;
break;
}
holder.itemView.setBackgroundResource(bgResId);
}
开发者ID:pczhu,项目名称:android-advancedrecyclerview-master,代码行数:17,代码来源:MyExpandableDraggableSwipeableItemAdapter.java