public class

ItemShadowDecorator

extends RecyclerView.ItemDecoration
java.lang.Object
   ↳ android.support.v7.widget.RecyclerView.ItemDecoration
     ↳ com.h6ah4i.android.widget.advrecyclerview.decoration.ItemShadowDecorator

Class Overview

Item decoration which draws drop shadow of each item views.

Summary

Public Constructors
ItemShadowDecorator(NinePatchDrawable shadow)
Constructor.
ItemShadowDecorator(NinePatchDrawable shadow, boolean castShadowForTransparentBackgroundItem)
Constructor.
Public Methods
void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state)
[Expand]
Inherited Methods
From class android.support.v7.widget.RecyclerView.ItemDecoration
From class java.lang.Object

Public Constructors

public ItemShadowDecorator (NinePatchDrawable shadow)

Constructor.

Parameters
shadow 9-patch drawable used for drop shadow

public ItemShadowDecorator (NinePatchDrawable shadow, boolean castShadowForTransparentBackgroundItem)

Constructor.

Parameters
shadow 9-patch drawable used for drop shadow
castShadowForTransparentBackgroundItem Whether to cast shadows for transparent items

Public Methods

public void getItemOffsets (Rect outRect, View view, RecyclerView parent, RecyclerView.State state)

public void onDraw (Canvas c, RecyclerView parent, RecyclerView.State state)