SeekbarListItem
open class SeekbarListItem : ListItem<SeekbarListItem.ViewHolder!>
kotlin.Any | ||
↳ | androidx.car.widget.ListItem<androidx.car.widget.SeekbarListItem.ViewHolder> | |
↳ | androidx.car.widget.SeekbarListItem |
Class to build a list item with SeekBar
.
An item supports primary action and supplemental action(s).
An item visually composes of 3 parts; each part may contain multiple views.
Primary Action
: represented by an icon of following types.- Primary Icon - icon size could be large or small.
- No Icon - no icon is shown.
- Empty Icon -
Seekbar
offsets start space as if there was an icon.
Seekbar
: with optionalText
.Supplemental Action
: presented by an icon of following types; aligned to the end of item.- Supplemental Icon.
- Supplemental Empty Icon -
Seekbar
offsets end space as if there was an icon.
SeekbarListItem
binds data to ViewHolder
based on components selected.
When conflicting methods are called (e.g. setting primary action to both primary icon and no icon), the last called method wins. minimum value
is set to 0.
Summary
Nested classes | |
---|---|
open |
Holds views of SeekbarListItem. |
Public constructors | |
---|---|
<init>(context: Context!, max: Int, progress: Int, listener: OnSeekBarChangeListener!, text: String!) use |
|
Public methods | |
---|---|
open Unit |
setSupplementalEmptyIcon(seekbarOffsetDividerWidth: Boolean) Sets |
open Unit |
setSupplementalIcon(iconResId: Int, showSupplementalIconDivider: Boolean) Sets |
open Unit |
setSupplementalIcon(iconResId: Int, showSupplementalIconDivider: Boolean, listener: OnClickListener?) Sets |
open Unit |
setSupplementalIcon(drawable: Drawable!, showSupplementalIconDivider: Boolean) Sets |
open Unit |
setSupplementalIcon(drawable: Drawable!, showSupplementalIconDivider: Boolean, listener: OnClickListener?) Sets |
open Unit |
setSecondaryProgress(secondaryProgress: Int) Sets secondary progress of seekbar. |
open Unit |
Sets text that sits on top of seekbar. |
open Unit |
Sets max value of seekbar. |
open Unit |
Sets |
open Unit |
setProgress(progress: Int) Sets progress of seekbar. |
open Unit |
setOnSeekBarChangeListener(listener: OnSeekBarChangeListener!) |
open Int |
Used by |
open Unit |
setPrimaryActionIcon(iconResId: Int) Sets |
open Unit |
setPrimaryActionIcon(drawable: Drawable!) Sets |
open static SeekbarListItem.ViewHolder! |
createViewHolder(itemView: View!) Creates a |
Protected methods | |
---|---|
open Unit |
Calculates the layout params for views in |
open Unit |
onBind(viewHolder: SeekbarListItem.ViewHolder!) Hides all views in |
Inherited functions | |
---|---|
Public constructors
<init>
SeekbarListItem(context: Context!, max: Int, progress: Int, listener: OnSeekBarChangeListener!, text: String!)
Deprecated: use #SeekbarListItem(Context)
and individual field setters instead.
Creates a SeekbarListItem.
Parameters | |
---|---|
context |
Context!: context |
max |
Context!: the upper range of the SeekBar. |
progress |
Context!: the current progress of the specified value. |
listener |
Context!: listener to receive notification of changes to progress level. |
text |
Context!: displays a text on top of the SeekBar. |
<init>
SeekbarListItem(context: Context!)
Public methods
setSupplementalEmptyIcon
open fun setSupplementalEmptyIcon(seekbarOffsetDividerWidth: Boolean): Unit
Sets Supplemental Action
to be empty icon. Seekbar
would have an end margin as if Supplemental Action
were set.
setSupplementalIcon
open fun setSupplementalIcon(iconResId: Int, showSupplementalIconDivider: Boolean): Unit
Sets Supplemental Action
to be represented by an Supplemental Icon
.
setSupplementalIcon
open fun setSupplementalIcon(iconResId: Int, showSupplementalIconDivider: Boolean, listener: OnClickListener?): Unit
Sets Supplemental Action
to be represented by an Supplemental Icon
.
setSupplementalIcon
open fun setSupplementalIcon(drawable: Drawable!, showSupplementalIconDivider: Boolean): Unit
Sets Supplemental Action
to be represented by an Supplemental Icon
.
setSupplementalIcon
open fun setSupplementalIcon(drawable: Drawable!, showSupplementalIconDivider: Boolean, listener: OnClickListener?): Unit
Sets Supplemental Action
to be represented by an Supplemental Icon
.
setSecondaryProgress
open fun setSecondaryProgress(secondaryProgress: Int): Unit
Sets secondary progress of seekbar.
setPrimaryActionEmptyIcon
open fun setPrimaryActionEmptyIcon(): Unit
Sets Primary Action
to be empty icon. Seekbar
would have a start margin as if Primary Action
were set as icon.
setOnSeekBarChangeListener
open fun setOnSeekBarChangeListener(listener: OnSeekBarChangeListener!): Unit
getViewType
open fun getViewType(): Int
Used by ListItemAdapter
to choose layout to inflate for view holder.
Return | |
---|---|
Int: type of this ListItem. |
setPrimaryActionIcon
open fun setPrimaryActionIcon(iconResId: Int): Unit
Sets Primary Action
to be represented by an icon.
Parameters | |
---|---|
iconResId |
Int: the resource identifier of the drawable. |
setPrimaryActionIcon
open fun setPrimaryActionIcon(drawable: Drawable!): Unit
Sets Primary Action
to be represented by an icon.
Parameters | |
---|---|
drawable |
Drawable!: the Drawable to set, or null to clear the content. |
createViewHolder
open static fun createViewHolder(itemView: View!): SeekbarListItem.ViewHolder!
Creates a SeekbarListItem.ViewHolder
.
Protected methods
resolveDirtyState
protected open fun resolveDirtyState(): Unit
Calculates the layout params for views in ViewHolder
.
onBind
protected open fun onBind(viewHolder: SeekbarListItem.ViewHolder!): Unit
Hides all views in ViewHolder
then applies ViewBinders to adjust view layout params.
Interfaces
Classes
- SubheaderListItem
- SubheaderListItem.ViewHolder
- ClickThroughToolbar
- TextListItem
- TextListItem.ViewHolder
- ListItem
- ListItem.ViewHolder
- PagedSnapHelper
- ColumnCardView
- PagedSmoothScroller
- SeekbarListItem
- SeekbarListItem.ViewHolder
- ActionBar
- PagedListView
- PagedListView.OnScrollListener
- ListItemAdapter
- ListItemAdapter.BackgroundStyle
- PagedScrollBarView
- AlphaJumpOverlayView
- AlphaJumpBucketer
- AlphaJumpBucketer.Bucket
- ListItemProvider
- ListItemProvider.ListProvider
Annotations