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
savedInstanceStateBundleIf 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:
Portions of this page are modifications based on work created and shared by the