Most visited

Recently visited

ItemTouchUIUtil

public interface ItemTouchUIUtil

android.support.v7.widget.helper.ItemTouchUIUtil


用于处理不同API版本的项目转换的工具类 ItemTouchHelper

This class has methods that map to ItemTouchHelper.Callback's drawing methods. Default implementations in ItemTouchHelper.Callback call these methods with itemView and ItemTouchUIUtil makes necessary changes on the View depending on the API level. You can access the instance of ItemTouchUIUtil via getDefaultUIUtil() and call its methods with the children of ViewHolder that you want to apply default effects.

也可以看看:

Summary

Public methods

abstract void clearView(View view)

clearView(RecyclerView, RecyclerView.ViewHolder)的默认实现

abstract void onDraw(Canvas c, RecyclerView recyclerView, View view, float dX, float dY, int actionState, boolean isCurrentlyActive)

onChildDraw(Canvas, RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)的默认实现

abstract void onDrawOver(Canvas c, RecyclerView recyclerView, View view, float dX, float dY, int actionState, boolean isCurrentlyActive)

onChildDrawOver(Canvas, RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)的默认实现

abstract void onSelected(View view)

onSelectedChanged(RecyclerView.ViewHolder, int)的默认实现

Public methods

clearView

void clearView (View view)

clearView(RecyclerView, RecyclerView.ViewHolder)的默认实现

Parameters
view View

onDraw

void onDraw (Canvas c, 
                RecyclerView recyclerView, 
                View view, 
                float dX, 
                float dY, 
                int actionState, 
                boolean isCurrentlyActive)

onChildDraw(Canvas, RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)的默认实现

Parameters
c Canvas
recyclerView RecyclerView
view View
dX float
dY float
actionState int
isCurrentlyActive boolean

onDrawOver

void onDrawOver (Canvas c, 
                RecyclerView recyclerView, 
                View view, 
                float dX, 
                float dY, 
                int actionState, 
                boolean isCurrentlyActive)

onChildDrawOver(Canvas, RecyclerView, RecyclerView.ViewHolder, float, float, int, boolean)的默认实现

Parameters
c Canvas
recyclerView RecyclerView
view View
dX float
dY float
actionState int
isCurrentlyActive boolean

onSelected

void onSelected (View view)

onSelectedChanged(RecyclerView.ViewHolder, int)的默认实现

Parameters
view View

Hooray!