public class

CustomRecyclerViewUtils

extends Object
java.lang.Object
   ↳ com.h6ah4i.android.widget.advrecyclerview.utils.CustomRecyclerViewUtils

Summary

Constants
int INVALID_SPAN_COUNT
int INVALID_SPAN_ID
int LAYOUT_TYPE_GRID_HORIZONTAL
int LAYOUT_TYPE_GRID_VERTICAL
int LAYOUT_TYPE_LINEAR_HORIZONTAL
int LAYOUT_TYPE_LINEAR_VERTICAL
int LAYOUT_TYPE_STAGGERED_GRID_HORIZONTAL
int LAYOUT_TYPE_STAGGERED_GRID_VERTICAL
int LAYOUT_TYPE_UNKNOWN
int ORIENTATION_HORIZONTAL
int ORIENTATION_UNKNOWN
int ORIENTATION_VERTICAL
Public Constructors
CustomRecyclerViewUtils()
Public Methods
static int extractOrientation(int layoutType)
static RecyclerView.ViewHolder findChildViewHolderUnderWithTranslation(RecyclerView rv, float x, float y)
static RecyclerView.ViewHolder findChildViewHolderUnderWithoutTranslation(RecyclerView rv, float x, float y)
static int findFirstCompletelyVisibleItemPosition(RecyclerView rv)
static int findFirstVisibleItemPosition(RecyclerView rv, boolean includesPadding)
static int findLastCompletelyVisibleItemPosition(RecyclerView rv)
static int findLastVisibleItemPosition(RecyclerView rv, boolean includesPadding)
static View findViewByPosition(RecyclerView.LayoutManager layoutManager, int position)
static Rect getDecorationOffsets(RecyclerView.LayoutManager layoutManager, View view, Rect outDecorations)
static Rect getLayoutMargins(View v, Rect outMargins)
static int getLayoutType(RecyclerView rv)
static int getLayoutType(RecyclerView.LayoutManager layoutManager)
static int getOrientation(RecyclerView rv)
static int getOrientation(RecyclerView.LayoutManager layoutManager)
static int getSpanCount(RecyclerView rv)
static int getSpanIndex(RecyclerView.ViewHolder holder)
static int getSpanSize(RecyclerView.ViewHolder holder)
static int getSynchronizedPosition(RecyclerView.ViewHolder holder)
static Rect getViewBounds(View v, Rect outBounds)
static boolean isFullSpan(RecyclerView.ViewHolder holder)
static boolean isGridLayout(int layoutType)
static boolean isLinearLayout(int layoutType)
static boolean isStaggeredGridLayout(int layoutType)
static int safeGetAdapterPosition(RecyclerView.ViewHolder holder)
static int safeGetLayoutPosition(RecyclerView.ViewHolder holder)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int INVALID_SPAN_COUNT

Constant Value: -1 (0xffffffff)

public static final int INVALID_SPAN_ID

Constant Value: -1 (0xffffffff)

public static final int LAYOUT_TYPE_GRID_HORIZONTAL

Constant Value: 2 (0x00000002)

public static final int LAYOUT_TYPE_GRID_VERTICAL

Constant Value: 3 (0x00000003)

public static final int LAYOUT_TYPE_LINEAR_HORIZONTAL

Constant Value: 0 (0x00000000)

public static final int LAYOUT_TYPE_LINEAR_VERTICAL

Constant Value: 1 (0x00000001)

public static final int LAYOUT_TYPE_STAGGERED_GRID_HORIZONTAL

Constant Value: 4 (0x00000004)

public static final int LAYOUT_TYPE_STAGGERED_GRID_VERTICAL

Constant Value: 5 (0x00000005)

public static final int LAYOUT_TYPE_UNKNOWN

Constant Value: -1 (0xffffffff)

public static final int ORIENTATION_HORIZONTAL

Constant Value: 0 (0x00000000)

public static final int ORIENTATION_UNKNOWN

Constant Value: -1 (0xffffffff)

public static final int ORIENTATION_VERTICAL

Constant Value: 1 (0x00000001)

Public Constructors

public CustomRecyclerViewUtils ()

Public Methods

public static int extractOrientation (int layoutType)

public static RecyclerView.ViewHolder findChildViewHolderUnderWithTranslation (RecyclerView rv, float x, float y)

public static RecyclerView.ViewHolder findChildViewHolderUnderWithoutTranslation (RecyclerView rv, float x, float y)

public static int findFirstCompletelyVisibleItemPosition (RecyclerView rv)

public static int findFirstVisibleItemPosition (RecyclerView rv, boolean includesPadding)

public static int findLastCompletelyVisibleItemPosition (RecyclerView rv)

public static int findLastVisibleItemPosition (RecyclerView rv, boolean includesPadding)

public static View findViewByPosition (RecyclerView.LayoutManager layoutManager, int position)

public static Rect getDecorationOffsets (RecyclerView.LayoutManager layoutManager, View view, Rect outDecorations)

public static Rect getLayoutMargins (View v, Rect outMargins)

public static int getLayoutType (RecyclerView rv)

public static int getLayoutType (RecyclerView.LayoutManager layoutManager)

public static int getOrientation (RecyclerView rv)

public static int getOrientation (RecyclerView.LayoutManager layoutManager)

public static int getSpanCount (RecyclerView rv)

public static int getSpanIndex (RecyclerView.ViewHolder holder)

public static int getSpanSize (RecyclerView.ViewHolder holder)

public static int getSynchronizedPosition (RecyclerView.ViewHolder holder)

public static Rect getViewBounds (View v, Rect outBounds)

public static boolean isFullSpan (RecyclerView.ViewHolder holder)

public static boolean isGridLayout (int layoutType)

public static boolean isLinearLayout (int layoutType)

public static boolean isStaggeredGridLayout (int layoutType)

public static int safeGetAdapterPosition (RecyclerView.ViewHolder holder)

public static int safeGetLayoutPosition (RecyclerView.ViewHolder holder)