public class AbstractAppMenuPropertiesDelegate extends java.lang.Object implements AppMenuPropertiesDelegate
| 构造器和说明 |
|---|
AbstractAppMenuPropertiesDelegate() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getFooterResourceId() |
int |
getHeaderResourceId() |
void |
onFooterViewInflated(AppMenu appMenu,
View view)
A notification that the footer view has finished inflating.
|
void |
onHeaderViewInflated(AppMenu appMenu,
View view)
A notification that the header view has finished inflating.
|
void |
onMenuItemClicked(MenuItem item)
Handles menu click events.
|
void |
prepareMenu(Menu menu)
Allows the delegate to show and hide items before the App Menu is shown.
|
boolean |
shouldShowAppMenu() |
boolean |
shouldShowFooter(int maxMenuHeight)
Determines whether the footer should be shown based on the maximum available menu height.
|
boolean |
shouldShowHeader(int maxMenuHeight)
Determines whether the header should be shown based on the maximum available menu height.
|
public boolean shouldShowAppMenu()
shouldShowAppMenu 在接口中 AppMenuPropertiesDelegatepublic void prepareMenu(@NonNull
Menu menu)
AppMenuPropertiesDelegateprepareMenu 在接口中 AppMenuPropertiesDelegatemenu - Menu that will be used as the source for the App Menu pop up.public boolean shouldShowHeader(int maxMenuHeight)
AppMenuPropertiesDelegateshouldShowHeader 在接口中 AppMenuPropertiesDelegatemaxMenuHeight - The maximum available height for the menu to draw.public int getHeaderResourceId()
getHeaderResourceId 在接口中 AppMenuPropertiesDelegatepublic void onHeaderViewInflated(@NonNull
AppMenu appMenu,
@NonNull
View view)
AppMenuPropertiesDelegateonHeaderViewInflated 在接口中 AppMenuPropertiesDelegateappMenu - The menu the view is inside of.view - The view that was inflated.public boolean shouldShowFooter(int maxMenuHeight)
AppMenuPropertiesDelegateshouldShowFooter 在接口中 AppMenuPropertiesDelegatemaxMenuHeight - The maximum available height for the menu to draw.AppMenuPropertiesDelegate.getFooterResourceId(), should be shown.public int getFooterResourceId()
getFooterResourceId 在接口中 AppMenuPropertiesDelegatepublic void onFooterViewInflated(@NonNull
AppMenu appMenu,
@NonNull
View view)
AppMenuPropertiesDelegateonFooterViewInflated 在接口中 AppMenuPropertiesDelegateappMenu - The menu the view is inside of.view - The view that was inflated.public void onMenuItemClicked(@NonNull
MenuItem item)
AppMenuPropertiesDelegateonMenuItemClicked 在接口中 AppMenuPropertiesDelegateitem - The clicked menuItem