Each activity module include a predefined Activity object. Activity is the main component of your application. Activities have three special life cycle related event: Activity_Create, Activity_Resume and Activity_Pause. See this tutorial for more information about activities and processes life cycle: Life cycle tutorial.
You can add and remove views to this activity with AddView and RemoveViewAt methods. You can also load a layout file with LoadLayout. The Touch event can be used to handle user touches. The first parameter of this event is the Action parameter. The parameter values can be ACTION_DOWN, ACTION_MOVE or ACTION_UP. Use this value to find the user current action. The KeyPress and KeyUp events occur when the user presses or releases a key, assuming that no other view has consumed this event (like EditText). When handling the KeyPress or KeyUp event you should return a boolean value which tells whether the event was consumed. For example if the user pressed on the Back key and you return True then the OS will not close your activity. SubActivity_KeyPress (KeyCodeAsInt) AsBoolean IfKeycode = KeyCodes.KEYCODE_BACKThen ReturnTrue Else ReturnFalse EndIf EndSub You can add menu items to the activity with AddMenuItem method. Note that this method should only be called inside Activity_Create event. Starting from Android 4.3 it is not possible to show a modal dialog inside the KeyPress or KeyUp events, with one exception which is in the case of the Back key. If you need to show a modal dialog for other keys then you should call a sub with CallSubDelayed and show the modal dialog in that sub.
Events:
Touch (Action As Int, X As Float, Y As Float) KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event KeyUp (KeyCode As Int) As Boolean WindowFocusChanged (Focused As Boolean) ActionBarHomeClick PermissionResult (Permission As String, Result As Boolean) Click LongClick
Adds a menu item to the activity. Title - Menu item title. EventName - The prefix name of the sub that will handle the click event. This method should only be called inside sub Activity_Create. Note that the 'Sender' value inside the click event equals to the clicked menu item text. Example: Activity.AddMenuItem("Open File", "OpenFile")
...
SubOpenFile_Click ...
EndSub
Adds a menu item to the activity. Title - Menu item title. EventName - The prefix name of the sub that will handle the click event. Bitmap - Bitmap to draw as the item background. Only the first five (or six if there are six total) menu items display icons. This method should only be called inside sub Activity_Create. Note that the 'Sender' value inside the click event equals to the clicked menu item text. Example: Activity.AddMenuItem2("Open File", "OpenFile", LoadBitmap(File.DirAssets, "SomeImage.png"))
...
SubOpenFile_Click ...
EndSub
Similar to AddMenuItem2. If AddToActionBar is true then the item will be displayed in the action bar (on Android 3.0+ devices) if there is enough room. If there is not enough room then the item will be displayed together with the other menu items.
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
DisableAccessibility (DisableAsBoolean)
This method was added as a workaround for the following Android bug. By setting the Disable property to True the child views (of all Activities) will not be added to the accessibility enabled list.
Finish
Closes this activity.
GetAllViewsRecursiveAsIterableList
Returns an iterator that iterates over all the child views including views that were added to other child views. Example: ForEachvAsViewInActivity.GetAllViewsRecursive ...
Next
GetStartingIntentAsIntent
(Advanced) Gets the intent object that started this Activity. This can be used together with SetActivityResult to return results to 3rd party applications.
GetView (IndexAsInt) AsView
Gets the view that is stored in the specified index.
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
LoadLayout (LayoutFileAsString) AsLayoutValues
Loads a layout file (.bal). Returns the LayoutValues of the actual layout variant that was loaded.
NumberOfViewsAsInt [read only]
Returns the number of child views.
OpenMenu
Programmatically opens the menu.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveAllViews
Removes all child views.
RemoveViewAt (IndexAsInt)
Removes the view that is stored in the specified index.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
This method is deprecated. It ignores the anchoring features and it will fail in Rapid Debug mode. You should instead remove the views and load the layout again.
SetActivityResult (ResultAsInt, DataAsIntent)
(Advanced) Sets the result that the calling Activity will get after calling StartActivityForResult.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
TitleAsCharSequence
TitleColorAsInt
Gets or sets the title color. This property is only supported by Android 2.x devices. It will not do anything on newer devices.
An enhanced version of EditText which shows the user a drop down list with all items matching the currently entered characters. Items matching are items starting with the current input or items that include a word that starts with the current input (words must be separated with spaces). Call SetItems with the list of possible items.
ItemClick event is raised when the user clicks on an item from the list. Example: SubProcess_Globals
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
DismissDropDown
Forces the drop down list to disappear.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
ForceDoneButtonAsBoolean [write only]
By default the OS sets the virtual keyboard action key to display Done or Next according to the specific layout. You can force it to display Done by setting this value to True. Example: EditText1.ForceDoneButton = True
GravityAsInt
HeightAsInt
Gets or sets the view's height.
HintAsString
Gets or sets the text that will appear when the EditText is empty. Example: EditText1.Hint = "Enter username"
HintColorAsInt
Gets or sets the hint text color. Example: EditText1.HintColor = Colors.Gray
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
INPUT_TYPE_DECIMAL_NUMBERSAsInt
Numeric keyboard will be displayed. Numbers, decimal point and minus sign are accepted.
INPUT_TYPE_NONEAsInt
No keyboard will be displayed.
INPUT_TYPE_NUMBERSAsInt
Numeric keyboard will be displayed. Only numbers are accepted.
INPUT_TYPE_PHONEAsInt
Keyboard will be displayed in phone mode.
INPUT_TYPE_TEXTAsInt
Default text mode.
InputTypeAsInt
Gets or sets the input type flag. This flag is used to determine the settings of the virtual keyboard. Note that changing the input type will set the EditText to be in single line mode. Example: EditText1.InputType = EditText1.INPUT_TYPE_NUMBERS
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
PasswordModeAsBoolean [write only]
Sets whether the EditText should be in password mode and hide the actual characters.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SelectAll
Selects the entire text.
SelectionLengthAsInt [read only]
Gets the selection length.
SelectionStartAsInt
Gets or sets the selection start position (or the cursor position). Returns -1 if there is no selection or cursor.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
SetItems (ItemsAsList)
Sets the list of possible items. The items visual style will be the same as the style of the main text.
Sets the list of possible items and specifies their style. Example: DimactAsAutoCompleteEditText act.Initialize("act")
Activity.AddView(act, 10dip, 10dip, 200dip, 80dip)
act.SetItems2(ArrayAsString("aab", "abc"), act.Typeface, Gravity.LEFT, 12, Colors.Green)
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
ShowDropDown
Forces the drop down list to appear.
SingleLineAsBoolean [write only]
Sets whether the EditText should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
TextAsString
TextColorAsInt
TextSizeAsFloat
Get or sets the view's text size.
TopAsInt
Gets or sets the view's top position.
TypefaceAsandroid.graphics.Typeface
VisibleAsBoolean
WidthAsInt
Gets or sets the view's width.
WrapAsBoolean [write only]
Sets whether the text content will wrap within the EditText bounds. Relevant when the EditText is in multiline mode. Example: EditText1.Wrap = False
A Button view. If you change the button's background you will usually want to use StateListDrawable which allows you to set the "default" drawable and the "pressed" drawable. Note that the Up and Down events are still implemented but should not be used as they will not work properly on all devices. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
GravityAsInt
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineAsBoolean [write only]
Sets whether the text field should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A CheckBox view. Unlike RadioButtons each CheckBox can be checked independently. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
CheckedAsBoolean
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
GravityAsInt
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineAsBoolean [write only]
Sets whether the text field should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
EditText view is a view that allows the user to write free text (similar to WinForms TextBox). The EditText has two modes; SingleLine and MultiLine. You can set it to be multiline by calling EditText1.SingleLine = False On most devices the soft keyboard will show automatically when the user presses on the EditText. You can change the InputType property and change the type of keyboard that appears. For example: EditText1.InputType = EditText1.INPUT_TYPE_NUMBERS will cause the numeric keyboard to appear when the user presses on the EditText. Note that it will also cause the EditText to only accept numbers.
The TextChanged event fires whenever the text changes and it includes the old and new strings. The EnterPressed event fires when the user presses on the enter key or action key (Done or Next). The FocusChanged event fires when the view is focused or loses focus. HasFocus parameter value will be set accordingly. Note that most views are not focusable. For example, pressing on a Button will not change the focus state of an EditText. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Events:
TextChanged (Old As String, New As String) EnterPressed FocusChanged (HasFocus As Boolean)
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
ForceDoneButtonAsBoolean [write only]
By default the OS sets the virtual keyboard action key to display Done or Next according to the specific layout. You can force it to display Done by setting this value to True. Example: EditText1.ForceDoneButton = True
GravityAsInt
HeightAsInt
Gets or sets the view's height.
HintAsString
Gets or sets the text that will appear when the EditText is empty. Example: EditText1.Hint = "Enter username"
HintColorAsInt
Gets or sets the hint text color. Example: EditText1.HintColor = Colors.Gray
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
INPUT_TYPE_DECIMAL_NUMBERSAsInt
Numeric keyboard will be displayed. Numbers, decimal point and minus sign are accepted.
INPUT_TYPE_NONEAsInt
No keyboard will be displayed.
INPUT_TYPE_NUMBERSAsInt
Numeric keyboard will be displayed. Only numbers are accepted.
INPUT_TYPE_PHONEAsInt
Keyboard will be displayed in phone mode.
INPUT_TYPE_TEXTAsInt
Default text mode.
InputTypeAsInt
Gets or sets the input type flag. This flag is used to determine the settings of the virtual keyboard. Note that changing the input type will set the EditText to be in single line mode. Example: EditText1.InputType = EditText1.INPUT_TYPE_NUMBERS
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
PasswordModeAsBoolean [write only]
Sets whether the EditText should be in password mode and hide the actual characters.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SelectAll
Selects the entire text.
SelectionLengthAsInt [read only]
Gets the selection length.
SelectionStartAsInt
Gets or sets the selection start position (or the cursor position). Returns -1 if there is no selection or cursor.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineAsBoolean [write only]
Sets whether the EditText should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
TextAsString
TextColorAsInt
TextSizeAsFloat
Get or sets the view's text size.
TopAsInt
Gets or sets the view's top position.
TypefaceAsandroid.graphics.Typeface
VisibleAsBoolean
WidthAsInt
Gets or sets the view's width.
WrapAsBoolean [write only]
Sets whether the text content will wrap within the EditText bounds. Relevant when the EditText is in multiline mode. Example: EditText1.Wrap = False
HorizontalScrollView is a view that contains other views and allows the user to horizontally scroll those views. The HorizontalScrollView is similar to ScrollView which scrolls vertically. See the ScrollView tutorial for more information. The HorizontalScrollView has an inner panel which actually contains the child views. You can add views by calling: HorizontalScrollView1.Panel.AddView(...) Note that it is not possible to nest scrolling views. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
FullScroll (RightAsBoolean)
Scrolls the view to the right or left.
HeightAsInt
Gets or sets the view's height.
Initialize (WidthAsInt, EventNameAsString)
Initializes the object. Width - The width of the inner panel. EventName - Sets the sub that will handle the event.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
PanelAsPanel [read only]
Returns the panel which you can use to add views to. Example: HorizontalScrollView1.Panel.AddView(...)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
ScrollPositionAsInt
Gets or sets the scroll position.
ScrollToNow (ScrollAsInt)
Immediately scrolls the HorizontalScrollView (with no animations).
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A view that shows an image. You can assign a bitmap using the Bitmap property. The Gravity property changes the way the image appears. The two most relevant values are Gravity.FILL (which will cause the image to fill the entire view) and Gravity.CENTER (which will draw the image in the view's center). This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Gets or sets the bitmap assigned to the ImageView. Example: ImageView1.Bitmap = LoadBitmap(File.DirAssets, "someimage.jpg")
BringToFront
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
GravityAsInt
Gets or sets the gravity assigned to the bitmap. Example: ImageView1.Gravity = Gravity.Fill
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is not changed. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
GravityAsInt
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineAsBoolean [write only]
Sets whether the text field should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
ListView is a very useful view that can handle large and small lists. The ListView raises two events. ItemClick is raised when an item is clicked and ItemLongClick is raised when an item is clicked and held. See the ListView tutorial for more information. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Events:
ItemClick (Position As Int, Value As Object) ItemLongClick (Position As Int, Value As Object)
Adds a single line item. The specified return value will be returned when calling GetItem or in the ItemClick event. Example: ListView1.AddSingleLine2("Sunday", 1)
Adds a two lines and a bitmap item. The specified return value will be returned when calling GetItem or in the ItemClick event.
BackgroundAsandroid.graphics.drawable.Drawable
Gets or sets the background drawable.
BringToFront
Changes the Z order of this view and brings it to the front.
Clear
Clears all items from the list.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
FastScrollEnabledAsBoolean
Gets or sets whether the fast scroll icon will appear when the user scrolls the list. The default is false.
GetItem (IndexAsInt) AsObject
Returns the value of the item at the specified position. Returns the "return value" if it was set and if not returns the text of the first line.
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveAt (IndexAsInt)
Removes the item at the specified position.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
ScrollingBackgroundColorAsInt [write only]
Sets the background color that will be used while scrolling the list. This is an optimization done to make the scrolling smoother. Set to Colors.Transparent if the background behind the list is not solid color. The default is black.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
SetSelection (PositionAsInt)
Sets the currently selected item. Calling this method will make this item visible. If the user is interacting with the list with the keyboard or the wheel button the item will also be visibly selected. Example:ListView1.SetSelection(10)
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineLayoutAsSingleLineLayout [read only]
Returns the layout that is used to show single line items. You can change the layout values to change the appearance of such items. Example: DimLabel1AsLabel Label1 = ListView1.SingleLineLayout.Label Label1.TextSize = 20 Label1.TextColor = Colors.Green
SizeAsInt [read only]
Returns the number of items stored in the list.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
Returns the layout that is used to show two lines and bitmap items. You can change the layout values to change the appearance of such items. For example if you want to remove the second label (in all items with this layout): ListView1.TwoLinesAndBitmap.SecondLabel.Visible = False
TwoLinesLayoutAsTwoLinesLayout [read only]
Returns the layout that is used to show two lines items. You can change the layout values to change the appearance of such items. Example: DimLabel1AsLabel Label1 = ListView1.TwoLinesLayout.SecondLabel Label1.TextSize = 20 Label1.TextColor = Colors.Green
A Panel is a view that holds other child views. You can add child views programmatically or by loading a layout file. The Panel raises the Touch event. The first parameter of this event is the Action which is one of the Activity action constants. Return True from the Touch event sub to consume the event (otherwise other views behind the Panel will receive the event). This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Events:
Touch (Action As Int, X As Float, Y As Float) Click LongClick
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
ElevationAsFloat
EnabledAsBoolean
GetAllViewsRecursiveAsIterableList
Returns an iterator that iterates over all the child views including views that were added to other child views. Example: ForEachvAsViewInPanel1.GetAllViewsRecursive ...
Next
GetView (IndexAsInt) AsView
Gets the view that is stored in the specified index.
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
LoadLayout (LayoutFileAsString) AsLayoutValues
Loads a layout file to this panel. Returns the value of the chosen layout variant.
NumberOfViewsAsInt [read only]
Returns the number of child views.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveAllViews
Removes all child views.
RemoveView
Removes this view from its parent.
RemoveViewAt (IndexAsInt)
Removes the view that is stored in the specified index.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A progress bar view. The Progress property sets the progress value which is between 0 to 100. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
HeightAsInt
Gets or sets the view's height.
IndeterminateAsBoolean
Gets or sets whether the progress bar is in indeterminate mode (cyclic animation).
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
ProgressAsInt
Gets or sets the progress value.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A RadioButton view. Only one RadioButton in a group can be checked. When a different RadioButton is checked all others will automatically be unchecked. Grouping is done by adding RadioButtons to the same activity or panel. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
CheckedAsBoolean
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
GravityAsInt
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineAsBoolean [write only]
Sets whether the text field should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
ScrollView is a view that contains other views and allows the user to vertically scroll those views. See the ScrollView tutorial for more information. The ScrollView has an inner panel which actually contains the child views. You can add views by calling: ScrollView1.Panel.AddView(...) Note that it is not possible to nest scrolling views. For example a multiline EditText cannot be located inside a ScrollView. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
FullScroll (BottomAsBoolean)
Scrolls the scroll view to the top or bottom.
HeightAsInt
Gets or sets the view's height.
Initialize (HeightAsInt)
Initializes the ScrollView and sets its inner panel height to the given height. You can later change this height by calling ScrollView.Panel.Height. DimScrollView1AsScrollView ScrollView1.Initialize(1000dip)
Initialize2 (HeightAsInt, EventNameAsString)
Similar to Initialize. Sets the Sub that will handle the ScrollChanged event.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
PanelAsPanel [read only]
Returns the panel which you can use to add views to. Example: ScrollView1.Panel.AddView(...)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
ScrollPositionAsInt
Gets or sets the scroll position.
ScrollToNow (ScrollAsInt)
Immediately scrolls the ScrollView (with no animations).
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A view that allows the user to set a value by dragging a slider. Similar to WinForms TrackBar. The ValueChanged event is raised whenever the value is changed. The UserChanged parameter can be used to distinguish between changes done by the user and changes done programmatically. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Events:
ValueChanged (Value As Int, UserChanged As Boolean)
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
MaxAsInt
Gets or sets the maximum allowed value.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A folded list that opens when the user clicks on it and allows the user to choose an item. Similar to WinForms ComboBox. The ItemClick event is raised each time a user presses on an item (even if it is the already selected item). This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
Clear
Clears all items.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
DropdownBackgroundColorAsInt
Gets or sets the dropdown items background color. The color should be set before adding items. Setting the color to transparent will make the spinner use the default background color.
DropdownTextColorAsInt
Gets or sets the dropdown text color. The color should be set before adding items. Setting the color to transparent will make the spinner use the default text color.
EnabledAsBoolean
GetItem (IndexAsInt) AsString
Returns the item at the specified index.
HeightAsInt
Gets or sets the view's height.
IndexOf (valueAsString) AsInt
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
PromptAsString
Gets or sets the title that will be displayed when the spinner is opened.
RemoveAt (IndexAsInt)
Removes the item at the specified index.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SelectedIndexAsInt
Gets or sets the index of the selected item. Returns -1 if no item is selected.
SelectedItemAsString [read only]
Returns the value of the selected item.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SizeAsInt [read only]
Returns the number of items.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
TextColorAsInt
Gets or sets the text color. The color should be set before adding items. Setting the color to transparent will make the spinner use the default text color.
TextSizeAsFloat
Gets or sets the text size. The size should be set before adding items.
TabHost is a view that contains multiple tab pages. Each tab page contains other child views. See the TabHost tutorial for more information. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Adds a tab page. The tab title includes an icon. Title - The page title. DefaultBitmap - The icon that will be drawn when the page is not selected. SelectedBitmap - The icon that will be drawn when the page is selected. LayoutFile - A layout file describing the page layout. Example: Dimbmp1, bmp2AsBitmap bmp1 = LoadBitmap(File.DirAssets, "ic.png")
bmp2 = LoadBitmap(File.DirAssets, "ic_selected.png")
TabHost1.AddTabWithIcon("Page 1", bmp1, bmp2,"tabpage1.bal")
Adds a tab page. The tab title includes an icon. Title - The page title. DefaultBitmap - The icon that will be drawn when the page is not selected. SelectedBitmap - The icon that will be drawn when the page is selected. View - The page content. Usually the view should be a panel containing other views.
BackgroundAsandroid.graphics.drawable.Drawable
Gets or sets the background drawable.
BringToFront
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
CurrentTabAsInt
Gets or sets the current tab. Example: TabHost1.CurrentTab = (TabHost1.CurrentTab + 1) ModTabHost1.TabCount'switch to the next tab.
EnabledAsBoolean
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TabCountAsInt [read only]
Returns the number of tab pages.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
A ToggleButton view. This view which is similar to a button has two modes: ON and OFF. When the user presses on it, it will change its mode. You can set the text with the TextOn and TextOff properties. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
CheckedAsBoolean
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EllipsizeAsString
Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end.
EnabledAsBoolean
GravityAsInt
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
SingleLineAsBoolean [write only]
Sets whether the text field should be in single line mode or multiline mode.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
TextColorAsInt
TextOffAsString
Gets or sets the text that will appear in the OFF mode.
TextOnAsString
Gets or sets the text that will appear in the ON mode.
View is a special type of object. You cannot create new View objects. However all other view types can be assigned to a view variable. This allows you to access the shared properties of all views. For example this code hides all views of an activity: Fori = 0ToActivity.NumberOfViews - 1 DimvAsView v = Activity.GetView(i)
v.Visible = False Next This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Changes the Z order of this view and brings it to the front.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
HeightAsInt
Gets or sets the view's height.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
LeftAsInt
Gets or sets the view's left position.
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
The WebView view uses the internal WebKit engine to display Html pages. The page displayed can be an online page loaded with LoadUrl or a Html string loaded with LoadHtml. The PageFinished event is raised after the page loads. OverrideUrl is called before loading any Url. If this method returns True then the Url will not be loaded. You can use this event as a way to handle click events in your code. UserAndPasswordRequired event is raised when accessing a site that requires basic authentication. You should return an array of strings with the username as the first element and password as the second element. For example:ReturnArrayAsString("someuser", "password123") Returning Null will cancel the request. Sending incorrect credentials will cause this event to be raised again. This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Permissions:
android.permission.INTERNET
Events:
PageFinished (Url As String) OverrideUrl (Url As String) As Boolean UserAndPasswordRequired (Host As String, Realm As String) As String()
Changes the Z order of this view and brings it to the front.
CaptureBitmapAsBitmap
Returns the complete html page as a bitmap.
ColorAsInt [write only]
Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
EnabledAsBoolean
Forward
Goes forward to the next Url.
HeightAsInt
Gets or sets the view's height.
Initialize (EventNameAsString)
Initializes the view and sets the subs that will handle the events. Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.
Invalidate
Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidate2 (RectAsandroid.graphics.Rect)
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
IsInitializedAsBoolean
JavaScriptEnabledAsBoolean
Gets or sets whether JavaScript is enabled. JavaScript is enabled by default.
LeftAsInt
Gets or sets the view's left position.
LoadHtml (HtmlAsString)
Loads the given Html. Example: WebView1.LoadHtml("<html><body>Hello world!</body></html>") You can use "file:///android_asset" to access files added with the file manager: WebView1.LoadHtml("<html><body><img src='file:///android_asset/someimage.jpg'/></body></html>") Note that files added with the file manager should be accessed with a lower cased name.
LoadUrl (UrlAsString)
Loads the given Url. Example: WebView1.LoadUrl("http://www.google.com")
Padding() AsInt
Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = ArrayAsInt (30dip, 10dip, 10dip, 10dip)
ParentAsObject [read only]
Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent.
RemoveView
Removes this view from its parent.
RequestFocusAsBoolean
Tries to set the focus to this view. Returns True if the focus was set.
SendToBack
Changes the Z order of this view and sends it to the back.
Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity.
Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds.
Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state.
StopLoading
Stops the current load.
TagAsObject
Gets or sets the Tag value. This is a place holder which can used to store additional data.
TopAsInt
Gets or sets the view's top position.
UrlAsString [read only]
Returns the current Url.
VisibleAsBoolean
WidthAsInt
Gets or sets the view's width.
Zoom (InAsBoolean) AsBoolean
Zooms in or out according to the value of In. Returns true if zoom has changed.
ZoomEnabledAsBoolean
Gets or sets whether the internal zoom feature is enabled. The zoom feature is enabled by default.
Top