Android.App.ActivityAttribute.MainLauncher Property
Whether or not the activity should be the main launcher for an application.

Syntax

public bool MainLauncher { get; set; }

Value

A bool specifying whether or not the activity should be the main launcher for the application.

Remarks

If MainLauncher is true, this is equivalent to placing an Android.App.IntentFilterAttribute custom attribute on the type, specifying the Android.Content.Intent.ActionMain action and the Android.Content.Intent.CategoryLauncher category:

C# Example

[Activity (MainLauncher=true)]
class MyActivity : Activity {}

// ...is equivalent to...

[Activity]
[IntentFilter (new[]{Android.Content.Intent.ActionMain},
        Categories=new[]{Android.Content.Intent.CategoryLauncher})]
class MyActivity : Activity {}

which, in turn, generates the following XML fragment:

XML Example

<activity 
            android:label="MyActivity" 
            android:name="demo.MyActivity">
    <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