Android Guides | Samples

Android.Views.MenuInflater Class

This class is used to instantiate menu XML files into Menu objects.

See Also: MenuInflater

Syntax

[Android.Runtime.Register("android/view/MenuInflater", DoNotGenerateAcw=true)]
public class MenuInflater : Object

Remarks

This class is used to instantiate menu XML files into Menu objects.

For performance reasons, menu inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use MenuInflater with an XmlPullParser over a plain XML file at runtime; it only works with an XmlPullParser returned from a compiled resource (R. something file.)

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Views.MenuInflater are listed below.

See Also: Object

Public Constructors

Constructs a menu inflater.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Inflate(Int32, IMenu)
Inflate a menu hierarchy from the specified XML resource.