Class

AndroidMobileUserControl


Description

Used to embed Android Views (android.view.View) created via declares into the Xojo control hierarchy.

Methods

Name

Parameters

Returns

Shared

ClearFocus

Handle

Ptr

Refresh

SetFocus

Events

Name

Parameters

Returns

Closing

CreateView

Ptr

Opening

Property descriptions


AndroidMobileUserControl.AccessibilityHint

AccessibilityHint As String

The accessibility hint is a longer description that is read aloud when VoiceOver is enabled.

Me.AccessibilityHint = "Click to calculate the value and display the next screen."

Important

This property is not currently supported for Android.


AndroidMobileUserControl.AccessibilityLabel

AccessibilityLabel As String

The accessibility label of of a control is a short name that is read aloud when VoiceOver is enabled.

Me.AccessibilityLabel = "Calculate the value."

AndroidMobileUserControl.Enabled

Enabled As Boolean

Indicates whether the control is enabled or disabled.

Disable the button:

Button1.Enabled = False

AndroidMobileUserControl.Height

Height As Integer

The height of the control.


AndroidMobileUserControl.Left

Left As Integer

The left position of the control.


AndroidMobileUserControl.LockBottom

LockBottom As Boolean

Determines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning layout.

This property can be set in the control's Inspector.


AndroidMobileUserControl.LockLeft

LockLeft As Boolean

Determines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning layout.

LockLeft and LockTop default to True when you add a new control to a layout. Existing controls will be altered only if LockRight and/or LockBottom are not set. LockLeft has no effect unless LockRight is True.

This property can be set in the control's Inspector.


AndroidMobileUserControl.LockRight

LockRight As Boolean

Determines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning layout.

This property can be set in the control's Inspector.


AndroidMobileUserControl.LockTop

LockTop As Boolean

Determines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning layout.

LockTop and LockLeft default to True when you add a control to a layout. Existing controls will be altered only if LockRight and/or LockBottom are not set. LockTop has no effect unless LockBottom is True.

This property can be set in the control's Inspector.


AndroidMobileUserControl.Name

Name As String

The name of the control.

This property is read-only.


AndroidMobileUserControl.Parent

Parent As MobileUIControl

The parent (sometimes called a "Super") class of the control.


AndroidMobileUserControl.Top

Top As Integer

The top position of the control.

This property is read-only.


AndroidMobileUserControl.Visible

Visible As Boolean

Indicates whether the control is visible.

Make a button invisible:

Button1.Visible = False

AndroidMobileUserControl.Width

Width As Integer

The width of the control.

Method descriptions


AndroidMobileUserControl.ClearFocus

ClearFocus

Removes the focus from the control.

TextField1.ClearFocus

AndroidMobileUserControl.Handle

Handle As Ptr

The handle to the underlying native OS control.


AndroidMobileUserControl.Refresh

Refresh

Marks the control so that it will be redrawn during the next event loop.

Call Refresh to force a Canvas to redraw itself:

Canvas1.Refresh

AndroidMobileUserControl.SetFocus

SetFocus

Sets the focus to the control.

TextField1.SetFocus

Event descriptions


AndroidMobileUserControl.Closing

Closing

Called when the control's layout is closing.


AndroidMobileUserControl.CreateView

CreateView As Ptr

Raised when the control needs you to create your Android View. Return the pointer to the Android View.

Google's Android documentation provides more information on the Android View.


AndroidMobileUserControl.Opening

Opening

Called when the control's layout is opening.

This is where you typically put initialization code.

This example in the Opening event of a Label sets its text to "Hello":

Me.Text = "Hello"

Compatibility

Project Types

Mobile

Operating Systems

Android

See also

MobileUIControl parent class