Table of Contents

Class XuiActivity

Namespace
Xui.Runtime.Android.Actual
Assembly
Xui.Runtime.Android.dll
public class XuiActivity : Activity, IComponentCallbacks2, IComponentCallbacks, KeyEvent.ICallback, LayoutInflater.IFactory2, LayoutInflater.IFactory, View.IOnCreateContextMenuListener, Window.ICallback, IWindow, IServiceProvider, Choreographer.IFrameCallback, IJavaObject, IJavaPeerable, IDisposable
Inheritance
XuiActivity
Implements
Inherited Members
Extension Methods

Fields

Context

protected AndroidDrawingContext Context

Field Value

AndroidDrawingContext

root

protected XuiRoot? root

Field Value

XuiRoot

ui

protected XuiUI? ui

Field Value

XuiUI

Properties

Abstract

Gets the abstract window immediately upstream of this actual window. Together with Actual, this forms the bidirectional composed-window chain.

public IWindow? Abstract { get; }

Property Value

IWindow

Instance

public static XuiActivity? Instance { get; }

Property Value

XuiActivity

NextServiceProvider

The service provider reached after this actual window. Middleware uses this exclusively for its forward service chain; it must never use its abstract event receiver as a service fallback.

public IServiceProvider NextServiceProvider { get; }

Property Value

IServiceProvider

RequireKeyboard

Gets or sets whether the window currently requires keyboard input focus. Platforms may use this to show or hide on-screen keyboards.

public bool RequireKeyboard { get; set; }

Property Value

bool

Title

Gets or sets the window title, where supported by the platform (e.g., desktop).

public string Title { get; set; }

Property Value

string

Methods

DoFrame(long)

public void DoFrame(long frameTimeNanos)

Parameters

frameTimeNanos long

Invalidate()

Requests a redraw of the window surface. The platform should trigger a paint or render callback as soon as possible.

public void Invalidate()

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 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 without any of the rest of the activity lifecycle (#onStart, #onResume, #onPause, etc.) executing.

<em>Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.</em>

Java documentation for

android.app.Activity.onCreate(android.os.Bundle)
.

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.

OnTouchEvent(MotionEvent?)

Called when a touch screen event was not handled by any of the views inside of the activity.

public override bool OnTouchEvent(MotionEvent? e)

Parameters

e MotionEvent

The touch screen event being processed.

Returns

bool

Return true if you have consumed the event, false if you haven't.

Remarks

Called when a touch screen event was not handled by any of the views inside of the activity. This is most useful to process touch events that happen outside of your window bounds, where there is no view to receive it.

Java documentation for

android.app.Activity.onTouchEvent(android.view.MotionEvent)
.

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.

Show()

Displays the window to the user. This may include making it visible, entering the main loop, or attaching it to the application's view hierarchy, depending on the platform.

public void Show()