Android.App.ActivityAttribute Class
Generates a /manifest/application/activity element within AndroidManifest.xml.

See Also: ActivityAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public sealed class ActivityAttribute : Attribute

Remarks

The //activity element is used to declare an activity that implements part of the application's visual user interface. The Android.App.ActivityAttribute custom attribute is used by monodroid.exe when generating AndroidManifest.xml to to declaratively generate //activity elements.

The type this attribute is placed on must be a (possibly indirect) subclass of Android.App.Activity.

The following type declaration

C# Example

[Activity (Name="mono.samples.HelloApp", 
        Label="Hello! Wie gehts!", 
        MainLauncher=true,
        ConfigurationChanges=ConfigChanges.Mcc|ConfigChanges.Mnc,
        LaunchMode=LaunchMode.Multiple,
        ScreenOrientation=ScreenOrientation.Unspecified,
        WindowSoftInputMode=SoftInput.StateUnspecified|SoftInput.AdjustUnspecified)]
class MyActivity : Activity {
}

results in the following XML fragment

XML Example

<activity android:configChanges="mcc|mnc"
            android:label="Hello! Wie gehts!" 
            android:launchMode="standard" 
            android:name="mono.samples.HelloApp" 
            android:screenOrientation="unspecified" 
            android:windowSoftInputMode="stateUnspecified|adjustUnspecified">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

Requirements

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