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


Java RecyclerViewSwipeManager.DRAWABLE_SWIPE_LEFT_BACKGROUND属性代码示例

本文整理汇总了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);
}
 
开发者ID:hanks-zyh,项目名称:RecylerView,代码行数:17,代码来源:MyDraggableSwipeableItemAdapter.java

示例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);
}
 
开发者ID:hanks-zyh,项目名称:RecylerView,代码行数:17,代码来源:MyAdapter.java

示例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);
}
 
开发者ID:hanks-zyh,项目名称:Conquer,代码行数:16,代码来源:MyTaskAdapter.java

示例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


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