ActionBar
open class ActionBar : RelativeLayout
kotlin.Any | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.RelativeLayout | |||
↳ | androidx.car.widget.ActionBar |
An actions panel with three distinctive zones:
- Main control: located in the bottom center it shows a highlighted icon and a circular progress bar.
- Secondary controls: these are displayed at the left and at the right of the main control.
- Overflow controls: these are displayed at the left and at the right of the secondary controls (if the space allows) and on the additional space if the panel is expanded.
Summary
Nested classes | |
---|---|
Constants | |
---|---|
static Int |
Slot reserved for the expand/collapse button |
static Int |
Slot used to host 'move left', 'rewind', 'previous' or similar secondary actions, usually at the left of the main action on the bottom row |
static Int |
Slot used for main actions |
static Int |
Slot used to host 'move right', 'fast-forward', 'next' or similar secondary actions, usually at the right of the main action on the bottom row |
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttrs: Int) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttrs: Int, defStyleRes: Int) |
Public methods | |
---|---|
open Unit |
Sets or clears the view to be displayed at a particular position. |
open Unit |
setExpandCollapseView(view: View) Sets the view to use for the expand/collapse action. |
open Unit |
Sets the views to include in each available slot of the action bar. |
Constants
SLOT_EXPAND_COLLAPSE
static val SLOT_EXPAND_COLLAPSE: Int
Slot reserved for the expand/collapse button
Value: 3
SLOT_LEFT
static val SLOT_LEFT: Int
Slot used to host 'move left', 'rewind', 'previous' or similar secondary actions, usually at the left of the main action on the bottom row
Value: 1
SLOT_MAIN
static val SLOT_MAIN: Int
Slot used for main actions ActionBar
, usually at the bottom center
Value: 0
SLOT_RIGHT
static val SLOT_RIGHT: Int
Slot used to host 'move right', 'fast-forward', 'next' or similar secondary actions, usually at the right of the main action on the bottom row
Value: 2
Public constructors
<init>
ActionBar(context: Context!)
<init>
ActionBar(context: Context!, attrs: AttributeSet!)
<init>
ActionBar(context: Context!, attrs: AttributeSet!, defStyleAttrs: Int)
<init>
ActionBar(context: Context!, attrs: AttributeSet!, defStyleAttrs: Int, defStyleRes: Int)
Public methods
setView
open fun setView(view: View?, slotPosition: Int): Unit
Sets or clears the view to be displayed at a particular position.
Parameters | |
---|---|
view |
View?: view to be displayed, or null to leave the position available. |
slotPosition |
View?: position to update |
setExpandCollapseView
open fun setExpandCollapseView(view: View): Unit
Sets the view to use for the expand/collapse action. If not provided, a default ImageButton will be used. The provided View
should be able be able to display changes in the "activated" state appropriately.
Parameters | |
---|---|
view |
View: View to use for the expand/collapse action. |
setViews
open fun setViews(views: Array<View!>?): Unit
Sets the views to include in each available slot of the action bar. Slots will be filled from start to end (i.e: left to right) and from bottom to top. If more views than available slots are provided, all extra views will be ignored.
Parameters | |
---|---|
views |
Array<View!>?: array of views to include in each available slot. |
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