Android7.0中文API -- ActionMenuView

完整内容,请查看: http://www.zhdoc.net/android/reference/android/widget/ActionMenuView.html

ActionMenuView

public class ActionMenuView
extends LinearLayout implements MenuBuilder.ItemInvoker

java.lang.Object
   ↳android.view.View
    ↳android.view.ViewGroup
     ↳android.widget.LinearLayout
      ↳android.widget.ActionMenuView


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.
ActionMenuView呈现视图的一系列菜单选项。它提供了几个顶层选项作为操作按钮,同时将剩余选项放到一个溢出菜单(overflow menu)中的项目。此方法允许应用程序以特定的或重复的内容来呈现一组动作。

摘要


嵌套类

classActionMenuView.LayoutParams

 

interfaceActionMenuView.OnMenuItemClickListener

Interface responsible for receiving menu item click events if the items themselves do not have individual item click listeners. 
如果项本身没有单独的项点击监听器,则此接口负责接收菜单项的点击事件。 

继承XML属性

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View

继承常量

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View

继承字段

From class android.view.View

Public构造方法

ActionMenuView(Context context)
ActionMenuView(Context context, AttributeSet attrs)

Public方法

voiddismissPopupMenus()

Dismiss any popups associated with this menu view.
取消任何与此菜单视图相关的弹出窗口。

ActionMenuView.LayoutParamsgenerateLayoutParams(AttributeSet attrs)

Returns a new set of layout parameters based on the supplied attributes set.
基于提供的一组属性,返回一组新的布局参数。

MenugetMenu()

Returns the Menu object that this ActionMenuView is currently presenting.
返回此ActionMenuView当前呈现的菜单对象。

DrawablegetOverflowIcon()

Return the current drawable used as the overflow icon.
返回当前使用的溢出图标的drawable。

intgetPopupTheme()
booleanhideOverflowMenu()

Hide the overflow items from the associated menu.
隐藏关联菜单的溢出项。

booleanisOverflowMenuShowing()

Check whether the overflow menu is currently showing.
检查溢出菜单当前是否正在显示。

voidonConfigurationChanged(Configuration newConfig)

Called when the current configuration of the resources being used by the application have changed.
当应用程序正在使用的资源的当前配置已更改时调用。

voidonDetachedFromWindow()

This is called when the view is detached from a window.
当视图从窗口分离时, 将调用此方法。

voidsetOnMenuItemClickListener(ActionMenuView.OnMenuItemClickListener listener)
voidsetOverflowIcon(Drawable icon)

Set the icon to use for the overflow button.
设置用于溢出按钮的图标。

voidsetPopupTheme(int resId)

Specifies the theme to use when inflating popup menus.
设置theme,用于价值(inflate)弹出菜单。

booleanshowOverflowMenu()

Show the overflow items from the associated menu.
显示关联菜单的溢出项。

保护方法

booleancheckLayoutParams(ViewGroup.LayoutParams p)
ActionMenuView.LayoutParamsgenerateDefaultLayoutParams()

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.
返回一组布局参数, 当布局方位是VERTICAL时,参数中包括MATCH_PARENT的宽度和WRAP_CONTENT的高度。

ActionMenuView.LayoutParamsgenerateLayoutParams(ViewGroup.LayoutParams p)

Returns a safe set of layout parameters based on the supplied layout params.
基于提供的布局参数,返回一组安全的布局参数。

voidonLayout(boolean changed, int left, int top, int right, int bottom)

Called from layout when this view should assign a size and position to each of its children.
当此视图分配大小和位置给它的每个子项时,从布局中调用。

voidonMeasure(int widthMeasureSpec, int heightMeasureSpec)

Measure the view and its content to determine the measured width and the measured height.
测量视图,它的内容决定测量得到宽度和高度。

继承方法


完整内容,请查看: http://www.zhdoc.net/android/reference/android/widget/ActionMenuView.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值