您的位置:首页 > 移动开发 > Android开发

Android7.0中文API -- ActionMenuView

2017-06-06 15:36 726 查看

完整内容,请查看: 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)中的项目。此方法允许应用程序以特定的或重复的内容来呈现一组动作。

摘要

嵌套类

class
ActionMenuView.LayoutParams

 

interface
ActionMenuView.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方法

void
dismissPopupMenus()

Dismiss any popups associated with this menu view.

取消任何与此菜单视图相关的弹出窗口。

ActionMenuView.LayoutParams
generateLayoutParams(AttributeSet
attrs)

Returns a new set of layout parameters based on the supplied attributes set.

基于提供的一组属性,返回一组新的布局参数。

Menu
getMenu()

Returns the Menu object that this ActionMenuView is currently presenting.

返回此ActionMenuView当前呈现的菜单对象。

Drawable
getOverflowIcon()

Return the current drawable used as the overflow icon.

返回当前使用的溢出图标的drawable。

int
getPopupTheme()
boolean
hideOverflowMenu()

Hide the overflow items from the associated menu.

隐藏关联菜单的溢出项。

boolean
isOverflowMenuShowing()

Check whether the overflow menu is currently showing.

检查溢出菜单当前是否正在显示。

void
onConfigurationChanged(Configuration
newConfig)

Called when the current configuration of the resources being used by the application have changed.

当应用程序正在使用的资源的当前配置已更改时调用。

void
onDetachedFromWindow()

This is called when the view is detached from a window.

当视图从窗口分离时, 将调用此方法。

void
setOnMenuItemClickListener(ActionMenuView.OnMenuItemClickListener
listener)
void
setOverflowIcon(Drawable
icon)

Set the icon to use for the overflow button.

设置用于溢出按钮的图标。

void
setPopupTheme(int resId)

Specifies the theme to use when inflating popup menus.

设置theme,用于价值(inflate)弹出菜单。

boolean
showOverflowMenu()

Show the overflow items from the associated menu.

显示关联菜单的溢出项。

保护方法

boolean
checkLayoutParams(ViewGroup.LayoutParams
p)
ActionMenuView.LayoutParams
generateDefaultLayoutParams()

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.LayoutParams
generateLayoutParams(ViewGroup.LayoutParams
p)

Returns a safe set of layout parameters based on the supplied layout params.

基于提供的布局参数,返回一组安全的布局参数。

void
onLayout(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.

当此视图分配大小和位置给它的每个子项时,从布局中调用。

void
onMeasure(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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android7.0中文API