LeanbackPreferenceFragment
abstract classLeanbackPreferenceFragment: BaseLeanbackPreferenceFragment
kotlin.Any | ||||
↳ | android.app.Fragment | |||
↳ | androidx.preference.PreferenceFragment | |||
↳ | androidx.leanback.preference.BaseLeanbackPreferenceFragment | |||
↳ | androidx.leanback.preference.LeanbackPreferenceFragment |
This fragment provides a fully decorated leanback-style preference fragment, including a list background and header.
The following sample code shows a simple leanback preference fragment that is populated from a resource. The resource it loads is:
The fragment needs only to implement onCreatePreferences(Bundle, String)
to populate the list of preference objects:
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>() |
Public methods | |
---|---|
open View? |
onCreateView(inflater: LayoutInflater!, container: ViewGroup?, savedInstanceState: Bundle!) |
open Unit |
onViewCreated(view: View!, savedInstanceState: Bundle?) |
open Unit |
setTitle(title: CharSequence!) Set the title to be shown above the preference list |
Inherited functions | |
---|---|
Public constructors
<init>
LeanbackPreferenceFragment()
Public methods
onCreateView
open fun onCreateView(
inflater: LayoutInflater!,
container: ViewGroup?,
savedInstanceState: Bundle!
): View?