Android.App.MetaDataAttribute Class
Generates the //meta-data element within AndroidManifest.xml.

See Also: MetaDataAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
public sealed class MetaDataAttribute : Attribute

Remarks

The //meta-data element is used to provide arbitrary data about a component. The Android.App.MetaDataAttribute custom attribute is used by monodroid.exe when generating AndroidManifest.xml to to declaratively generate the //meta-data elements.

The following type declaration:

C# Example

[Activity]
[MetaData ("foo", Value="bar")]
public class MyActivity : Activity
{
}

will generate the following XML fragment within AndroidManifest.xml:

xml Example

<activity android:name="demo.MyActivity" android:label="MyActivity">
    <meta-data android:name="foo" android:value="bar" />
</activity>

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0