setWidgetLayoutResource

open fun setWidgetLayoutResource(widgetLayoutResId: Int)(source)

Sets the layout for the controllable widget portion of this preference. This is inflated into the main layout. For example, a CheckBoxPreference would specify a custom layout (consisting of just the CheckBox) here, instead of creating its own main layout.

It is an error to change the layout after adding the preference to a PreferenceGroup.

Parameters

widgetLayoutResId

The layout resource ID to be inflated into the main layout

See also