ActionMenuView


public class ActionMenuView extends LinearLayoutCompat


ActionMenuView is a presentation of a series of menu options as a View. It provides several top level options as action buttons while spilling remaining options over as items in an overflow menu. This allows applications to present packs of actions inline with specific or repeating content.

Summary

Nested types

Interface responsible for receiving menu item click events if the items themselves do not have individual item click listeners.

Public constructors

Public methods

void

Dismiss any popups associated with this menu view.

boolean
ActionMenuView.LayoutParams
Menu

Returns the Menu object that this ActionMenuView is currently presenting.

@Nullable Drawable

Return the current drawable used as the overflow icon.

int
boolean

Hide the overflow items from the associated menu.

boolean

Check whether the overflow menu is currently showing.

void
void
void
void

Set the icon to use for the overflow button.

void
setPopupTheme(@StyleRes int resId)

Specifies the theme to use when inflating popup menus.

boolean

Show the overflow items from the associated menu.

Protected methods

boolean
ActionMenuView.LayoutParams

Returns a set of layout parameters with a width of MATCH_PARENT and a height of WRAP_CONTENT when the layout's orientation is VERTICAL.

ActionMenuView.LayoutParams
void
onLayout(boolean changed, int left, int top, int right, int bottom)
void
onMeasure(int widthMeasureSpec, int heightMeasureSpec)

Inherited Constants

From androidx.appcompat.widget.LinearLayoutCompat
static final int
static final int

Show a divider at the beginning of the group.

static final int

Show a divider at the end of the group.

static final int

Show dividers between each item in the group.

static final int

Don't show any dividers.

static final int
From android.view.View
static final int
static final int
static final int
static final int
static final int
static final int
static final Property<ViewFloat>
static final int
static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE = "creditCardExpirationDate"
static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY = "creditCardExpirationDay"
static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth"
static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear"
static final String
static final String
AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE = "creditCardSecurityCode"
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int[]
static final int[]
static final int[]
static final int[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
GONE = 8
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
KEEP_SCREEN_ON = 67108864
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
NO_ID = -1
static final int
static final int
static final int
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final int[]
static final float
static final float
static final float
static final float
static final float
static final Property<ViewFloat>
static final Property<ViewFloat>
static final Property<ViewFloat>
static final Property<ViewFloat>
static final Property<ViewFloat>
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int[]
static final int[]
static final int
static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final Property<ViewFloat>
static final Property<ViewFloat>
static final Property<ViewFloat>
static final String
VIEW_LOG_TAG = "View"
static final int
static final int[]
static final Property<ViewFloat>
static final Property<ViewFloat>
static final Property<ViewFloat>
From android.view.ViewGroup
static final int
static final int
static final int
static final int
static final int
static final int
static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

Inherited methods

From androidx.appcompat.widget.LinearLayoutCompat
int
int
@Attribute(value = "android:baselineAlignedChildIndex")
getBaselineAlignedChildIndex()
Drawable
@Attribute(value = "androidx.appcompat:divider")
getDividerDrawable()
int
@Attribute(value = "androidx.appcompat:dividerPadding")
getDividerPadding()

Get the padding size used to inset dividers in pixels

@GravityInt int
@Attribute(value = "android:gravity")
getGravity()

Returns the current gravity.

int
@Attribute(value = "android:orientation", intMapping = [@Attribute.IntMap(name = "horizontal", value = 0), @Attribute.IntMap(name = "vertical", value = 1)])
getOrientation()

Returns the current orientation.

int
@Attribute(value = "androidx.appcompat:showDividers", intMapping = [@Attribute.IntMap(name = "none", value = 0), @Attribute.IntMap(name = "beginning", value = 1, mask = 1), @Attribute.IntMap(name = "middle", value = 2, mask = 2), @Attribute.IntMap(name = "end", value = 4, mask = 4)])
getShowDividers()
float
@Attribute(value = "android:weightSum")
getWeightSum()

Returns the desired weights sum.

boolean
@Attribute(value = "android:baselineAligned")
isBaselineAligned()

Indicates whether widgets contained within this layout are aligned on their baseline or not.

boolean
@Attribute(value = "androidx.appcompat:measureWithLargestChild")
isMeasureWithLargestChildEnabled()

When true, all children with a weight will be considered having the minimum size of the largest child.

void
void
void
void
setBaselineAligned(boolean baselineAligned)

Defines whether widgets contained in this layout are baseline-aligned or not.

void
void

Set a drawable to be used as a divider between items.

void
setDividerPadding(int padding)

Set padding displayed on both ends of dividers.

void
setGravity(@GravityInt int gravity)

Describes how the child views are positioned.

void
setHorizontalGravity(int horizontalGravity)
void

When set to true, all children with a weight will be considered having the minimum size of the largest child.

void
setOrientation(int orientation)

Should the layout be a column or a row.

void
setShowDividers(int showDividers)

Set how dividers should be shown between items in this layout

void
setVerticalGravity(int verticalGravity)
void
setWeightSum(float weightSum)

Defines the desired weights sum.

boolean
From android.view.View
void
void
void
ViewPropertyAnimator
void

This method is deprecated.

void
boolean
void
void

This method is deprecated.

void
boolean
boolean
boolean
boolean
boolean
canScrollHorizontally(int direction)
boolean
canScrollVertically(int direction)
final void
void
final void
boolean
void
void
void
static int
combineMeasuredStates(int curState, int newState)
int
int
int
void
WindowInsets
int
int
int
AccessibilityNodeInfo
void
void

This method is deprecated.

boolean
boolean
dispatchNestedFling(float velocityX, float velocityY, boolean consumed)
boolean
dispatchNestedPreFling(float velocityX, float velocityY)
boolean
dispatchNestedPrePerformAccessibilityAction(
    int action,
    Bundle arguments
)
boolean
dispatchNestedPreScroll(
    int dx,
    int dy,
    int[] consumed,
    int[] offsetInWindow
)
boolean
dispatchNestedScroll(
    int dxConsumed,
    int dyConsumed,
    int dxUnconsumed,
    int dyUnconsumed,
    int[] offsetInWindow
)
void