Table of Contents

Class VpnHoodMauiMainActivity

Namespace
VpnHood.AppUi.Hosting.Maui
Assembly
VpnHood.AppUi.Hosting.Maui.dll

Represents a MAUI UI's main activity on Android: a head derives from it and makes the app's main activity handler.

public abstract class VpnHoodMauiMainActivity : MauiActivityEvent, IComponentCallbacks2, IComponentCallbacks, KeyEvent.ICallback, LayoutInflater.IFactory2, LayoutInflater.IFactory, View.IOnCreateContextMenuListener, Window.ICallback, KeyEventDispatcher.IComponent, IFullyDrawnReporterOwner, IOnBackPressedDispatcherOwner, IContextAware, IActivityResultCaller, IActivityResultRegistryOwner, IOnMultiWindowModeChangedProvider, IOnNewIntentProvider, IPictureInPictureProvider, IOnPictureInPictureModeChangedProvider, IOnPictureInPictureUiStateChangedProvider, IOnUserLeaveHintProvider, IOnConfigurationChangedProvider, IOnTrimMemoryProvider, IMenuHost, IHasDefaultViewModelProviderFactory, IViewModelStoreOwner, INavigationEventDispatcherOwner, ISavedStateRegistryOwner, ILifecycleOwner, ActivityCompat.IOnRequestPermissionsResultCallback, ActivityCompat.IRequestPermissionsRequestCodeValidator, ActionBarDrawerToggle.IDelegateProvider, IAppCompatCallback, TaskStackBuilder.ISupportParentable, IJavaObject, IJavaPeerable, IDisposable, IActivityEvent
Inheritance
VpnHoodMauiMainActivity
Implements
Inherited Members

Methods

CreateMainActivityHandler()

Creates the handler that does the activity's work for the app; it must be made for this activity, as it follows the activity's events, through which it lives on: the returned handler is not stored.

protected abstract AndroidAppMainActivityHandler CreateMainActivityHandler()

Returns

AndroidAppMainActivityHandler

The handler.

OnCreate(Bundle?)

Called when the activity is starting.

protected override void OnCreate(Bundle? savedInstanceState)

Parameters

savedInstanceState Bundle

If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in #onSaveInstanceState. <b>Note: Otherwise it is null.</b>

Remarks

Called when the activity is starting. This is where most initialization should go: calling setContentView(int) to inflate the activity's UI, using findViewById(int) to programmatically interact with widgets in the UI, calling managedQuery(android.net.Uri,String[],String,String[],String) to retrieve cursors for data being displayed, etc. You can call finish() from within this function, in which case onDestroy() will be immediately called after onCreate(Bundle) without any of the rest of the activity lifecycle (onStart(), onResume(), onPause(), etc.) executing. Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.

See also:

Android reference for

    <pre><code class="lang-csharp">android.app.Activity.onCreate</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.