DeweyPreference

open class DeweyPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Preference

Dewey's base preference class, which inherits from Preference and customizes the title style, icon tint, and more suited for Dewey's design system.

Inheritors

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null)

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun onBindViewHolder(holder: PreferenceViewHolder)
Link copied to clipboard
fun setAccessibilityLiveRegion(liveRegionMode: Int)

Sets the accessibility live region property on the views related to this preference.

Link copied to clipboard
Link copied to clipboard

Sets the icon tint of the preference. The icon tint will affect the appearance of the icon.

fun setIconTint(@ColorRes iconTintRes: Int)
Link copied to clipboard

Sets the listener to be called when the summary is clicked. This is for sometimes when the summary contains a link. Null by default.

Link copied to clipboard
fun setShowBadge(showBadge: Boolean)

Sets the visibility of the badge. The badge is a small circle that can be shown on the top right corner of the icon of the preference.

fun setShowBadge(showBadge: Boolean, text: CharSequence)

Sets the visibility of the badge and the text to be shown on the badge. The badge is a small circle or chip that can be shown on the top right corner of the icon of the preference.

Link copied to clipboard
Link copied to clipboard

Sets the title style of the preference. The title style will affect the appearance of the title text and icon tint. The default title style is TitleStyle.TEXT.