O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

DividerItemDecoration

open class DividerItemDecoration : RecyclerView.ItemDecoration
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.ItemDecoration
   ↳ androidx.recyclerview.widget.DividerItemDecoration

DividerItemDecoration is a RecyclerView.ItemDecoration that can be used as a divider between items of a LinearLayoutManager. It supports both HORIZONTAL and VERTICAL orientations.

mDividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
              mLayoutManager.getOrientation());
      recyclerView.addItemDecoration(mDividerItemDecoration);
  

Summary

Constants
static Int

static Int

Public constructors
<init>(context: Context!, orientation: Int)

Creates a divider RecyclerView.ItemDecoration that can be used with a LinearLayoutManager.

Public methods
open Drawable?

open Unit
getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State)

open Unit

open Unit
setDrawable(@NonNull drawable: Drawable)

Sets the Drawable for this divider.

open Unit
setOrientation(orientation: Int)

Sets the orientation for this divider.

Inherited functions

Constants

HORIZONTAL

static val HORIZONTAL: Int
Value: LinearLayout.HORIZONTAL

VERTICAL

static val VERTICAL: Int
Value: LinearLayout.VERTICAL

Public constructors

<init>

DividerItemDecoration(
    context: Context!,
    orientation: Int)

Creates a divider RecyclerView.ItemDecoration that can be used with a LinearLayoutManager.

Parameters
context C