CarMenuCallbacks
public
abstract
class
CarMenuCallbacks
extends Object
java.lang.Object | |
↳ | android.car.app.menu.CarMenuCallbacks |
The callbacks that a car app needs to pass to a car ui provider for car menu interactions.
Summary
Public constructors | |
---|---|
CarMenuCallbacks()
|
Public methods | |
---|---|
abstract
RootMenu
|
getRootMenu(Bundle hints)
Called when the car menu wants to get the root. |
abstract
void
|
onCarMenuClosed()
Called when the car menu has been closed. |
abstract
void
|
onCarMenuClosing()
Called when the menu is closing. |
abstract
void
|
onCarMenuOpened()
Called when the car menu has been opened. |
abstract
void
|
onCarMenuOpening()
Called when the menu is opening. |
abstract
void
|
onItemClicked(String id)
Called when a car menu item with the specified id has been clicked. |
abstract
boolean
|
onItemLongClicked(String id)
Called when a car menu item with the specified id has been long clicked. |
abstract
boolean
|
onMenuClicked()
Called when the menu button is clicked. |
abstract
void
|
subscribe(String parentId, SubscriptionCallbacks callback)
Query for information about the menu items that are contained within the specified id and subscribes to receive updates when they change. |
abstract
void
|
unsubscribe(String parentId, SubscriptionCallbacks callbacks)
Unsubscribe for changes to the children of the specified id. |
Inherited methods | |
---|---|
Public constructors
CarMenuCallbacks
public CarMenuCallbacks ()
Public methods
getRootMenu
public abstract RootMenu getRootMenu (Bundle hints)
Called when the car menu wants to get the root.
Parameters | |
---|---|
hints |
Bundle : Hints that the Drawer can use to modify behavior. It can be null. |
Returns | |
---|---|
RootMenu |
The RootMenu which contains the root id and any hints
|
onCarMenuClosed
public abstract void onCarMenuClosed ()
Called when the car menu has been closed.
onCarMenuClosing
public abstract void onCarMenuClosing ()
Called when the menu is closing.
onCarMenuOpened
public abstract void onCarMenuOpened ()
Called when the car menu has been opened.
onCarMenuOpening
public abstract void onCarMenuOpening ()
Called when the menu is opening.
onItemClicked
public abstract void onItemClicked (String id)
Called when a car menu item with the specified id has been clicked.
Parameters | |
---|---|
id |
String |
onItemLongClicked
public abstract boolean onItemLongClicked (String id)
Called when a car menu item with the specified id has been long clicked.
Parameters | |
---|---|
id |
String |
Returns | |
---|---|
boolean |
onMenuClicked
public abstract boolean onMenuClicked ()
Called when the menu button is clicked.
Returns | |
---|---|
boolean |
subscribe
public abstract void subscribe (String parentId, SubscriptionCallbacks callback)
Query for information about the menu items that are contained within the specified id and subscribes to receive updates when they change.
Parameters | |
---|---|
parentId |
String : The id of the parent menu item whose list of children
will be subscribed. |
callback |
SubscriptionCallbacks : The callback to receive the list of children.
|
unsubscribe
public abstract void unsubscribe (String parentId, SubscriptionCallbacks callbacks)
Unsubscribe for changes to the children of the specified id.
Parameters | |
---|---|
parentId |
String : The id of the parent menu item whose list of children
will be unsubscribed.
|
callbacks |
SubscriptionCallbacks |