SourcePickerView
A view to display available media sources allowing login and browsing. If no sources are available TtEmptyStateView is shown.
Note: setMediaFrontendContext must be called for this view to start showing content.
Note: This view gets view-tree local ViewModelStoreOwner using findViewTreeViewModelStoreOwner.
Note: This view should be placed in TtToastContainer to show toasts correctly.
Use ignoredMediaBrowserPackageListConfigKey
configuration option to filter media sources that do not need to be shown.
Use MediaAttributesR.attr.ttivi_mediasourcepickerlist_style to set custom style to the inner RecyclerView which is responsible for showing the list of media sources. R.style.TtiviMediaSourcePickerList
is used by default, consider using it as a base style for customization.
Use MediaAttributesR.attr.ttivi_media_sourcepicker_item_spacing to set custom spacing between source items and CommonAttributesR.attr.ttivi_apptileview_size to set custom size of the sources TtiviAppTileView.
Parameters
The display context.
The attribute set provided in the layout XML file.
The default style attribute set. The default value is MediaAttributesR.attr.ttivi_mediasourcepicker_style.
The identifier of a style resource that supplies default values for the view. The default value is 0
.
Constructors
Functions
Set mediaFrontendContext - an entry point to communicate with the rest of media frontend. lifecycleOwner is used to observe data and toasts.