MaterialDivider

open class MaterialDivider : View

A Material divider view.

The divider will display the correct default Material colors without the use of a style flag in a layout file. Make sure to set android:layout_height="wrap_content" to ensure that the correct thickness is set for the divider.

For more information, see the component developer guidance and design guidelines.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int)

Functions

Link copied to clipboard
open fun getDividerColor(): Int
Returns the divider color.
Link copied to clipboard
Returns the divider's end inset.
Link copied to clipboard
Returns the divider's start inset.
Link copied to clipboard
Returns the app:dividerThickness set on the divider.
Link copied to clipboard
open fun setDividerColor(@ColorInt color: Int)
Sets the color of the divider.
Link copied to clipboard
open fun setDividerColorResource(@ColorRes colorId: Int)
Sets the color of the divider.
Link copied to clipboard
open fun setDividerInsetEnd(@Px insetEnd: Int)
Sets the end inset of the divider.
Link copied to clipboard
open fun setDividerInsetEndResource(@DimenRes insetEndId: Int)
Sets the end inset of the divider.
Link copied to clipboard
open fun setDividerInsetStart(@Px insetStart: Int)
Sets the start inset of the divider.
Link copied to clipboard
open fun setDividerInsetStartResource(@DimenRes insetStartId: Int)
Sets the start inset of the divider.
Link copied to clipboard
open fun setDividerThickness(@Px thickness: Int)
Sets the thickness of the divider.
Link copied to clipboard
open fun setDividerThicknessResource(@DimenRes thicknessId: Int)
Sets the thickness of the divider.