Android Programming Press on the image to return to the main documentation page.

Views (Core)

List of types:

ActionSheet
ActivityIndicator
BarButton
Button
ImageView
Label
NavigationController
Page
PageViewController
Panel
Picker
ProgressView
ScrollView
SegmentedControl
Slider
Stepper
Switch
TabBarController
TextField
TextView
WebView

ActionSheet

ActionSheet allows the user to select an item from a list of items.
On iPhone devices the list usually slides up from the bottom of the screen.
On iPad devices the list appears anchored to the ParentView.
The list can optionally show a "cancel" item and a "destructive" item. These items will show with a different color.

Events:

Click (Item As String)

Members:


  Dismiss

  Initialize (EventName As String, Title As String, CancelItem As String, DestructiveItem As String, OtherItems As List)

  IsInitialized As Boolean

  Show (ParentView As Object)

  Tag As Object

  Visible As Boolean [read only]

Members description:

Dismiss
Dismisses the sheet.
Initialize (EventName As String, Title As String, CancelItem As String, DestructiveItem As String, OtherItems As List)
Initializes the ActionSheet and sets the items.
EventName - Sets the sub that will handle the Click event.
Title - The sheet title. Note that Apple guidelines recommend not to use a title.
CancelItem - An item that will appear in black color.
DestructiveItem - An item that will appear in red color.
OtherItems - A List (or array) with all other items.
IsInitialized As Boolean
Tests whether this object was initialized.
Show (ParentView As Object)
Shows the ActionSheet. The sheet will be anchored to the ParentView (on iPad devices).
Example:
Dim sheet As ActionSheet
sheet.Initialize("sheet", "", "", "", Array("Cat", "Dog", "Monkey", "Rat"))
sheet.Show(Page1.RootPanel)
Wait For sheet_Click (Animal As String)
Log(Animal)
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Visible As Boolean [read only]
Returns true if the sheet is currently visible.

ActivityIndicator

A spinning indicator, similar to Android indeterminate progress bar.

Events:

Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Height As Float

  Initialize ()

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Style As Int

  STYLE_GRAY As Int [read only]

  STYLE_WHITE As Int [read only]

  STYLE_WHITE_LARGE As Int [read only]

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the indicator color.
Height As Float
Gets or sets the view's height.
Initialize ()
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Style As Int
Gets or sets the indicator style. One of the STYLE constants.
STYLE_GRAY As Int [read only]
STYLE_WHITE As Int [read only]
STYLE_WHITE_LARGE As Int [read only]
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

BarButton

BarButtons are assigned to Pages. These buttons appear when a Page is added to a NavigationConroller.
There are four types of bar buttons: custom, text, bitmap or system.
You can use the designer to create these buttons.
Note that the designer adds "flexible space" items between each two buttons automatically.
The Tag value is important as it is used to distinguish between the buttons in the Page_BarButtonClick event.

Events:

None

Members:


  Enabled As Boolean

  InitializeBitmap (Bitmap As Object, Tag As String)

  InitializeCustom (View As Object)

  InitializeSystem (Type As Int, Tag As String)

  InitializeText (Text As String, Tag As String)

  IsInitialized As Boolean

  ITEM_ACTION As Int [read only]

  ITEM_ADD As Int [read only]

  ITEM_BOOKMARKS As Int [read only]

  ITEM_CAMERA As Int [read only]

  ITEM_CANCEL As Int [read only]

  ITEM_COMPOSE As Int [read only]

  ITEM_DONE As Int [read only]

  ITEM_EDIT As Int [read only]

  ITEM_FASTFORWARD As Int [read only]

  ITEM_FLEXIBLE_SPACE As Int [read only]

  ITEM_ORGANIZE As Int [read only]

  ITEM_PAUSE As Int [read only]

  ITEM_PLAY As Int [read only]

  ITEM_REDO As Int [read only]

  ITEM_REFRESH As Int [read only]

  ITEM_REPLY As Int [read only]

  ITEM_REWIND As Int [read only]

  ITEM_SAVE As Int [read only]

  ITEM_SEARCH As Int [read only]

  ITEM_STOP As Int [read only]

  ITEM_TRASH As Int [read only]

  ITEM_UNDO As Int [read only]

  SetFont (Font As Font)

  Tag As Object

  TintColor As Int

Members description:

Enabled As Boolean
Gets or sets whether the button is enabled.
InitializeBitmap (Bitmap As Object, Tag As String)
Initializes a bitmap button.
InitializeCustom (View As Object)
Initializes a bar button made of a custom view.
InitializeSystem (Type As Int, Tag As String)
Initializes a system button with one of the ITEM constants.
InitializeText (Text As String, Tag As String)
Initializes a text button.
IsInitialized As Boolean
Tests whether this object was initialized.
ITEM_ACTION As Int [read only]
ITEM_ADD As Int [read only]
ITEM_BOOKMARKS As Int [read only]
ITEM_CAMERA As Int [read only]
ITEM_CANCEL As Int [read only]
ITEM_COMPOSE As Int [read only]
ITEM_DONE As Int [read only]
ITEM_EDIT As Int [read only]
ITEM_FASTFORWARD As Int [read only]
ITEM_FLEXIBLE_SPACE As Int [read only]
ITEM_ORGANIZE As Int [read only]
ITEM_PAUSE As Int [read only]
ITEM_PLAY As Int [read only]
ITEM_REDO As Int [read only]
ITEM_REFRESH As Int [read only]
ITEM_REPLY As Int [read only]
ITEM_REWIND As Int [read only]
ITEM_SAVE As Int [read only]
ITEM_SEARCH As Int [read only]
ITEM_STOP As Int [read only]
ITEM_TRASH As Int [read only]
ITEM_UNDO As Int [read only]
SetFont (Font As Font)
Sets the button font.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the button color.

Button

A Button view. There are two types of buttons: system buttons and custom buttons.
System buttons are created with one of the STYLE constants.
Custom buttons can be customized by accessing the CustomLabel property.

Events:

Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  CustomLabel As Label [read only]

  Enabled As Boolean

  Height As Float

  Initialize (EventName As String, Style1 As Object)

  InitializeCustom (EventName As String, TextColor As Int, PressedTextColor As Int)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  STYLE_CONTACT_ADD As Object [read only]

  STYLE_DETAIL_DISCLOSURE As Object [read only]

  STYLE_INFO As Object [read only]

  STYLE_SYSTEM As Object [read only]

  Tag As Object

  Text As String

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
CustomLabel As Label [read only]
Gets the inner label. You can use this property to customize custom buttons.
Enabled As Boolean
Gets or sets whether the view is enabled.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String, Style1 As Object)
Initializes a system button.
Example:
Dim b1 As Button
b1.Initialize("b1", b1.STYLE_SYSTEM)
InitializeCustom (EventName As String, TextColor As Int, PressedTextColor As Int)
Initializes a custom button. Sets the text default color and the pressed state color.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
STYLE_CONTACT_ADD As Object [read only]
STYLE_DETAIL_DISCLOSURE As Object [read only]
STYLE_INFO As Object [read only]
STYLE_SYSTEM As Object [read only]
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Text As String
Gets or sets the button's text.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

ImageView

A view that shows a bitmap.

Events:

Click
LongClick

Members:


  Alpha As Float

  Bitmap As Bitmap

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  ContentMode As Object

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  MODE_CENTER As Object [read only]

  MODE_FILL As Object [read only]

  MODE_FIT As Object [read only]

  MODE_TOPLEFT As Object [read only]

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
Bitmap As Bitmap
Gets or sets the bitmap.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
ContentMode As Object
Gets or sets the content mode (one of the MODE constants).
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
MODE_CENTER As Object [read only]
The bitmap will be centered.
MODE_FILL As Object [read only]
The bitmap will be stretched to fill the view.
MODE_FIT As Object [read only]
The bitmap will be resized to fill the view. The original aspect ratio will be kept.
MODE_TOPLEFT As Object [read only]
The bitmap will not be resized.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

Label

A view that shows readonly text.

Events:

Click
LongClick

Members:


  AdjustFontSizeToFit As Boolean

  ALIGNMENT_CENTER As Int [read only]

  ALIGNMENT_LEFT As Int [read only]

  ALIGNMENT_RIGHT As Int [read only]

  Alpha As Float

  AttributedText As AttributedString

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Font As Font

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Multiline As Boolean

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  Text As String

  TextAlignment As Int

  TextColor As Int

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

AdjustFontSizeToFit As Boolean
If true then the label will adjust the font size to make room for all the text.
ALIGNMENT_CENTER As Int [read only]
ALIGNMENT_LEFT As Int [read only]
ALIGNMENT_RIGHT As Int [read only]
Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
AttributedText As AttributedString
Gets or sets the attributed string. CSBuilder can be used to build the string.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Font As Font
Gets or sets the label font.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Multiline As Boolean
Gets or sets whether the label should show multiple lines.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Text As String
Gets or sets the label text.
TextAlignment As Int
Gets or sets the text alignment (one of the ALIGNMENT constants).
TextColor As Int
Gets or sets the text color.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

NavigationController

A controller that manages a set of pages in a stack.
This is the default controller. It can optionally show a navigation bar (at the top) and a toolbar (at the bottom).
The items in these bars are set by the current visible page.
When you call ShowPage the page is added to the top of the stack.
If the page is already in the stack then all the pages above it will be removed.

Events:

None

Members:


  Initialize (EventName As String)

  IsInitialized As Boolean

  NavigationBarVisible As Boolean

  RemoveCurrentPage

  RemoveCurrentPage2 (Animated As Boolean)

  SetNavigationBarVisibleAnimated (Visible As Boolean)

  SetPagesStack (Pages As List)

  ShowPage (Page As Object)

  ShowPage2 (Page As Object, Animated As Boolean)

  Tag As Object

  ToolBarVisible As Boolean

Members description:

Initialize (EventName As String)
IsInitialized As Boolean
Tests whether this object was initialized.
NavigationBarVisible As Boolean
Gets or sets whether the navigation bar is visible. Default value is true.
RemoveCurrentPage
Removes the current top page from the stack. The transition will be animated.
RemoveCurrentPage2 (Animated As Boolean)
Similar to RemoveCurrentPage.
Animated - Whether the transition will be animated or not.
SetNavigationBarVisibleAnimated (Visible As Boolean)
Similar to setting the NavigationBarVisible. Hides or shows the bar with animation.
SetPagesStack (Pages As List)
Clears the current stack and sets a new stack of pages. This can be useful when you restore the state of an app.
ShowPage (Page As Object)
Adds a page to the top of the stack. If the page is already in the stack then all pages above it will be removed.
The transition will be animated.
ShowPage2 (Page As Object, Animated As Boolean)
Similar to ShowPage.
Animated - Whether the transition will be animated or not.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
ToolBarVisible As Boolean
Gets or sets whether the tool bar (bottom bar) is visible. Default value is false.
Note that you should first show a page and only then add the toolbar.

Page

A page is a container that contains other views.
The main element of a page is the RootPanel. With this panel you can add or remove views.
Note that the "Event Name" of the RootPanel is the same as the Page's Event Name.
You can use a NavigationController or a TabController to manage multiple pages.

Events:

Appear
Disappear
BarButtonClick (Tag As String)
KeyboardStateChanged (Height As Float)

Members:


  HideBackButton As Boolean

  Initialize (EventName As String)

  IsInitialized As Boolean

  Prompt As String

  ResignFocus

  RootPanel As Panel [read only]

  TabBarItem As TabBarItem

  Tag As Object

  Title As String

  TitleView As View

  ToolbarButtons As List

  TopLeftButtons As List

  TopRightButtons As List

  Visible As Boolean [read only]

Members description:

HideBackButton As Boolean
If false then the back button will appear when this page is the top page and there are other pages in the back. Default value is false.
Initialize (EventName As String)
IsInitialized As Boolean
Tests whether this object was initialized.
Prompt As String
Gets or sets the page prompt. This text will appear under the title.
ResignFocus
Removes focus from all views on this page. This will hide the keyboard if it is visible.
RootPanel As Panel [read only]
Gets a reference to the main panel that holds the other views.
TabBarItem As TabBarItem
Gets or sets the TabBarItem that will appear when this page is added to a TabBarController.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Title As String
Gets or sets the page title. This title appears in the navigation bar when a NavigationController is used.
TitleView As View
Gets or sets the view that replaces the standard title. Only relevant when the page is inside a NavigationController.
ToolbarButtons As List
Gets or sets an array of BarButtons that will appear in the Toolbar (if it is visible).
Note that you should set a new list or array in order to update the buttons as the returned list is a copy of the internal list.
TopLeftButtons As List
Gets or sets an array of BarButtons that will appear near the top-left corner (if the navigation bar is visible).
Note that you should set a new list or array in order to update the buttons as the returned list is a copy of the internal list.
TopRightButtons As List
Gets or sets an array of BarButtons that will appear near the top-right corner (if the navigation bar is visible).
Note that you should set a new list or array in order to update the buttons as the returned list is a copy of the internal list.
Visible As Boolean [read only]
Returns true if this page is currently visible.

PageViewController

A controller that contains other pages and allows the user to switch pages by swiping right or left.
Set this controller by assigning App.KeyController.

Events:

None

Members:


  Initialize (EventName As String, Pages As List)

  IsInitialized As Boolean

  SetSelectedPage (PageIndex As Int)

  Tag As Object

Members description:

Initialize (EventName As String, Pages As List)
Initializes the controller and sets the child pages.
EventName - Sets the subs that will handle the events. Currently this parameter is not used.
Pages - A List (or Array) with the child pages.
IsInitialized As Boolean
Tests whether this object was initialized.
SetSelectedPage (PageIndex As Int)
Sets the current selected (visible) page.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.

Panel

Panel is a view that holds other views.

Events:

Touch(Action As Int, X As Float, Y As Float)
Resize (Width As Float, Height As Float)
Click
LongClick

Members:


  ACTION_DOWN As Int [read only]

  ACTION_MOVE As Int [read only]

  ACTION_UP As Int [read only]

  AddView (View As Object, Left As Float, Top As Float, Width As Float, Height As Float)

  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  GetAllViewsRecursive As Object

  GetView (Index As Int) As View

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  LoadLayout (LayoutFile As String) As LayoutValues

  NumberOfViews As Int [read only]

  Parent As View [read only]

  RemoveAllViews

  RemoveViewAt (Index As Int)

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

ACTION_DOWN As Int [read only]
ACTION_MOVE As Int [read only]
ACTION_UP As Int [read only]
AddView (View As Object, Left As Float, Top As Float, Width As Float, Height As Float)
Adds a view to the Panel.
Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
GetAllViewsRecursive As Object
Used with a For Each block to iterate over all views recursively.
GetView (Index As Int) As View
Gets the view at the specified index.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
LoadLayout (LayoutFile As String) As LayoutValues
Loads a layout file to the panel.
NumberOfViews As Int [read only]
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveAllViews
Removes all views from the panel.
RemoveViewAt (Index As Int)
Removes the view at the specified index.
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

Picker

A picker view based on a spinning wheel. A single view can show one or more columns (wheels).
Note that the height of this view cannot be changed.

Events:

ItemSelected (Column As Int, Row As Int)
Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  GetItems (Column As Int) As List

  GetSelectedItem (Column As Int) As Object

  GetSelectedRow (Column As Int) As Int

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SelectRow (Column As Int, Row As Int, Animated As Boolean)

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetColumnsWidths (Widths As List)

  SetItems (Column As Int, Items As List)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetRowsHeight (RowHeight As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
GetItems (Column As Int) As List
Returns a list with the items in the specified index.
GetSelectedItem (Column As Int) As Object
Returns the selected item in the specified column.
GetSelectedRow (Column As Int) As Int
Returns the selected row in the specified column.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
Initializes the picker and sets the subs that will handle the events.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SelectRow (Column As Int, Row As Int, Animated As Boolean)
Sets the selected item.
Column - Column index.
Row - Row index.
Animated - If True then the wheel will animate the change.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetColumnsWidths (Widths As List)
Sets the columns widths. For example if there are two columns:
Picker1.SetColumnsWidths(Array (100, 200))
SetItems (Column As Int, Items As List)
Sets the items of the given column.
Column - Column index. 0 is the first column.
Items - A List (or array) with the items. Each item should be a String or an AttributedString.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetRowsHeight (RowHeight As Int)
Sets the rows height. The default value is 30.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

ProgressView

A horizontal view that displays the progress of a task to the user.
The progress is a value between 0 to 1.

Events:

Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Height As Float

  Initialize ()

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Parent As View [read only]

  Progress As Float

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetProgressAnimated (Progress As Float)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Height As Float
Gets or sets the view's height.
Initialize ()
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
Progress As Float
Gets or sets the current progress (0 to 1).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetProgressAnimated (Progress As Float)
Sets the current progress with animation.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

ScrollView

ScrollView is a scrollable container. It can scroll horizontally and vertically (based on the inner-panel size).
ScrollView.Panel returns the inner-panel.
You should add views to this panel.
Note that ContentWidth and ContentHeight properties should be used when modifying the inner-panel size.

Events:

ScrollChanged (OffsetX As Int, OffsetY As Int)
Click
LongClick

Members:


  Alpha As Float

  Bounces As Boolean

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  ContentHeight As Int

  ContentWidth As Int

  Height As Float

  Initialize (EventName As String, Width As Int, Height As Int)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  PagingEnabled As Boolean

  Panel As Panel [read only]

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  ScrollEnabled As Boolean

  ScrollOffsetX As Int

  ScrollOffsetY As Int

  ScrollTo (OffsetX As Int, OffsetY As Int, Animated As Boolean)

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  ShowsHorizontalIndicator As Boolean

  ShowsVerticalIndicator As Boolean

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
Bounces As Boolean
Gets or sets whether a bounce effect is applied when the panel reaches one of the edges.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
ContentHeight As Int
Gets or sets the inner-panel height.
ContentWidth As Int
Gets or sets the inner-panel width.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String, Width As Int, Height As Int)
Initializes the ScrollView.
EventName - Sets the subs that will handle the events.
Width - The inner-panel width.
Height - The inner-panel height.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
PagingEnabled As Boolean
If true then the ScrollView will automatically scroll to the nearest "page" which is a multiple of the ScrollView size.
Panel As Panel [read only]
Returns the inner-panel.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
ScrollEnabled As Boolean
Gets or sets whether scrolling is enabled.
ScrollOffsetX As Int
Gets or sets the current horizontal offset.
ScrollOffsetY As Int
Gets or sets the current vertical offset.
ScrollTo (OffsetX As Int, OffsetY As Int, Animated As Boolean)
Scrolls to the given offsets.
Animated - Whether the scrolling should be animated.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
ShowsHorizontalIndicator As Boolean
Gets or sets whether to show the horizontal indicator during scrolling.
ShowsVerticalIndicator As Boolean
Gets or sets whether to show the vertical indicator during scrolling.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

SegmentedControl

A horizontal control that shows multiple titles.

Events:

IndexChanged (Index As Int)
Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Enabled As Boolean

  GetItems As List

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Momentary As Boolean

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SelectedIndex As Int

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetItems (Items As List)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Enabled As Boolean
Gets or sets whether the view is enabled.
GetItems As List
Gets a List with the control titles.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Momentary As Boolean
If true then the control does not show the selected item. Default value is false.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SelectedIndex As Int
Gets or sets the selected index. -1 means that no item is selected.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetItems (Items As List)
Sets the control titles.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

Slider

A horizontal bar with a thumb. The user can change the value by dragging the thumb.
The ValueChanged event is raised when the value is changed.
You can change the color by changing the TintColor property.

Events:

ValueChanged (Value As Float)
Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Continuous As Boolean

  Enabled As Boolean

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  MaximumValue As Float

  MinimumValue As Float

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Value As Float

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Continuous As Boolean
If False then the ValueChanged event will only be raised when the user releases the thumb.
Enabled As Boolean
Gets or sets whether the view is enabled.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
Initializes the Slider.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
MaximumValue As Float
Gets or sets the maximum value. The default value is 1.
MinimumValue As Float
Gets or sets the minimum value. The default value is 0.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Value As Float
Gets or sets the current value.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

Stepper

A view that shows a + and - buttons that allow the user to increment of decrement a numeric value.
The value itself is not displayed (by this view).
You can change the color by changing the TintColor property.
ValueChanged event is raised when the value is changed.

Events:

ValueChanged (Value As Double)
Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Enabled As Boolean

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  MaximumValue As Double

  MinimumValue As Double

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  StepValue As Double

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Value As Double

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Enabled As Boolean
Gets or sets whether the view is enabled.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
Initializes the stepper.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
MaximumValue As Double
Gets or sets the maximum value. Default value is 100.
MinimumValue As Double
Gets or sets the minimum value. Default value is 0.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
StepValue As Double
Gets or sets the step value. Default value is 1.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Value As Double
Gets or sets the current value.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

Switch

A two states switch view. Note that the actual size of this view cannot be changed.
The ValueChanged event is raised when the state changes.

Events:

ValueChanged (Value As Boolean)
Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Enabled As Boolean

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  Parent As View [read only]

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SetValueAnimated (Value As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Value As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Enabled As Boolean
Gets or sets whether the view is enabled.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
Initializes the view.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SetValueAnimated (Value As Boolean)
Changes the current state. Animates the transition.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Value As Boolean
Gets or sets the current state.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

TabBarController

A root controller that contains other pages and allows the user to select the current page by clicking on the tab bar.
Set this controller by assigning it to App.KeyController.

Events:

None

Members:


  Initialize (EventName As String)

  IsInitialized As Boolean

  Pages As List

  SelectedIndex As Int

  Tag As Object

Members description:

Initialize (EventName As String)
IsInitialized As Boolean
Tests whether this object was initialized.
Pages As List
Gets or sets the tab pages.
SelectedIndex As Int
Gets or sets the current selected index.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.

TextField

A single line text field.
The keyboard appears automatically when a text field is focused.
You need to call TextField.ResignFocus to hide the keyboard.

Events:

TextChanged (OldText As String, NewText As String)
EnterPressed
BeginEdit
EndEdit
Click
LongClick

Members:


  AdjustFontSizeToFit As Boolean

  ALIGNMENT_CENTER As Int [read only]

  ALIGNMENT_LEFT As Int [read only]

  ALIGNMENT_RIGHT As Int [read only]

  Alpha As Float

  APPEARANCE_DARK As Int [read only]

  APPEARANCE_DEFAULT As Int [read only]

  APPEARANCE_LIGHT As Int [read only]

  AttributedText As AttributedString

  Autocapitalize As Int

  AUTOCAPITALIZE_ALL As Int [read only]

  AUTOCAPITALIZE_NONE As Int [read only]

  AUTOCAPITALIZE_SENTENCES As Int [read only]

  AUTOCAPITALIZE_WORDS As Int [read only]

  Autocorrect As Int

  AUTOCORRECT_DEFAULT As Int [read only]

  AUTOCORRECT_NO As Int [read only]

  AUTOCORRECT_YES As Int [read only]

  BorderStyle As Int

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Enabled As Boolean

  Font As Font

  Height As Float

  HintText As String

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  KeyboardAppearance As Int

  KeyboardType As Int

  Left As Float

  Parent As View [read only]

  PasswordMode As Boolean

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  RETURN_DEFAULT As Int [read only]

  RETURN_DONE As Int [read only]

  RETURN_GO As Int [read only]

  RETURN_NEXT As Int [read only]

  RETURN_SEARCH As Int [read only]

  RETURN_SEND As Int [read only]

  ReturnKey As Int

  SelectAll

  SelectionLength As Int

  SelectionStart As Int

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetSelection (Start As Int, Length As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  ShowClearButton As Boolean

  SizeToFit

  SPELLCHECK_DEFAULT As Int [read only]

  SPELLCHECK_NO As Int [read only]

  SPELLCHECK_YES As Int [read only]

  STYLE_BEZEL As Int [read only]

  STYLE_LINE As Int [read only]

  STYLE_NONE As Int [read only]

  STYLE_ROUNDEDRECT As Int [read only]

  Tag As Object

  Text As String

  TextAlignment As Int

  TextColor As Int

  TintColor As Int

  Top As Float

  TYPE_ASCII_CAPABLE As Int [read only]

  TYPE_DECIMAL_PAD As Int [read only]

  TYPE_DEFAULT As Int [read only]

  TYPE_EMAIL_ADDRESS As Int [read only]

  TYPE_NAME_PHONE_PAD As Int [read only]

  TYPE_NUMBER_PAD As Int [read only]

  TYPE_NUMBERS_AND_PUNCTUATIONS As Int [read only]

  TYPE_PHONE_PAD As Int [read only]

  TYPE_URL As Int [read only]

  TYPE_WEB_SEARCH As Int [read only]

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

AdjustFontSizeToFit As Boolean
If true then the font size is adjusted automatically to make room for all the text.
ALIGNMENT_CENTER As Int [read only]
ALIGNMENT_LEFT As Int [read only]
ALIGNMENT_RIGHT As Int [read only]
Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
APPEARANCE_DARK As Int [read only]
APPEARANCE_DEFAULT As Int [read only]
APPEARANCE_LIGHT As Int [read only]
AttributedText As AttributedString
Gets or sets the attributed string. CSBuilder can be used to build the string.
Autocapitalize As Int
Gets or sets the autocapitalize mode (one of the AUTOCAPITALIZE constants).
AUTOCAPITALIZE_ALL As Int [read only]
AUTOCAPITALIZE_NONE As Int [read only]
AUTOCAPITALIZE_SENTENCES As Int [read only]
AUTOCAPITALIZE_WORDS As Int [read only]
Autocorrect As Int
Gets or sets th
Gets or sets the keyboard auto-correct mode (one of the AUTOCORRECT constants).
AUTOCORRECT_DEFAULT As Int [read only]
AUTOCORRECT_NO As Int [read only]
AUTOCORRECT_YES As Int [read only]
BorderStyle As Int
Gets or sets the border style (one of the STYLE constants).
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Enabled As Boolean
Gets or sets whether the field is enabled.
Font As Font
Gets or sets the text font.
Height As Float
Gets or sets the view's height.
HintText As String
Gets or sets the hint that appears when no text is set.
Initialize (EventName As String)
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
KeyboardAppearance As Int
Gets or sets the keyboard appearance (one of the APPEARANCE constants).
KeyboardType As Int
Gets or sets the keyboard type (one of the TYPE constants).
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
PasswordMode As Boolean
Set to true to change the text field to password mode.
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
RETURN_DEFAULT As Int [read only]
RETURN_DONE As Int [read only]
RETURN_GO As Int [read only]
RETURN_NEXT As Int [read only]
RETURN_SEARCH As Int [read only]
RETURN_SEND As Int [read only]
ReturnKey As Int
Gets or sets the return key (one of the RETURN constants).
SelectAll
Selects all text.
SelectionLength As Int
Returns the text selection length. Use SetSelection method if you want to set the selection.
SelectionStart As Int
Gets or sets the selection start position.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetSelection (Start As Int, Length As Int)
Sets the selected text.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
ShowClearButton As Boolean
Gets or sets whether the clear button is visible when the field is focused.
SizeToFit
Resizes the view to make it fit its content.
SPELLCHECK_DEFAULT As Int [read only]
SPELLCHECK_NO As Int [read only]
SPELLCHECK_YES As Int [read only]
STYLE_BEZEL As Int [read only]
STYLE_LINE As Int [read only]
STYLE_NONE As Int [read only]
STYLE_ROUNDEDRECT As Int [read only]
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Text As String
Gets or sets the text.
TextAlignment As Int
Gets or sets the text alignment (one of the ALIGNMENT constants).
TextColor As Int
Gets or sets the text color.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
TYPE_ASCII_CAPABLE As Int [read only]
TYPE_DECIMAL_PAD As Int [read only]
TYPE_DEFAULT As Int [read only]
TYPE_EMAIL_ADDRESS As Int [read only]
TYPE_NAME_PHONE_PAD As Int [read only]
TYPE_NUMBER_PAD As Int [read only]
TYPE_NUMBERS_AND_PUNCTUATIONS As Int [read only]
TYPE_PHONE_PAD As Int [read only]
TYPE_URL As Int [read only]
TYPE_WEB_SEARCH As Int [read only]
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

TextView

A multiline, scrollable text field.
The keyboard appears automatically when a text field is focused.
You need to call TextView.ResignFocus to hide the keyboard.

Events:

TextChanged (OldText As String, NewText As String)
BeginEdit
EndEdit
LinkClick (URL As String)
Click
LongClick

Members:


  ALIGNMENT_CENTER As Int [read only]

  ALIGNMENT_LEFT As Int [read only]

  ALIGNMENT_RIGHT As Int [read only]

  Alpha As Float

  APPEARANCE_DARK As Int [read only]

  APPEARANCE_DEFAULT As Int [read only]

  APPEARANCE_LIGHT As Int [read only]

  AttributedText As AttributedString

  Autocapitalize As Int

  AUTOCAPITALIZE_ALL As Int [read only]

  AUTOCAPITALIZE_NONE As Int [read only]

  AUTOCAPITALIZE_SENTENCES As Int [read only]

  AUTOCAPITALIZE_WORDS As Int [read only]

  Autocorrect As Int

  AUTOCORRECT_DEFAULT As Int [read only]

  AUTOCORRECT_NO As Int [read only]

  AUTOCORRECT_YES As Int [read only]

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  Color As Int

  Editable As Boolean

  Font As Font

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  KeyboardAppearance As Int

  KeyboardType As Int

  Left As Float

  Parent As View [read only]

  PasswordMode As Boolean

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  RETURN_DEFAULT As Int [read only]

  RETURN_DONE As Int [read only]

  RETURN_GO As Int [read only]

  RETURN_NEXT As Int [read only]

  RETURN_SEARCH As Int [read only]

  RETURN_SEND As Int [read only]

  ReturnKey As Int

  ScrollTo (Index As Int)

  SelectAll

  SelectionLength As Int

  SelectionStart As Int

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetSelection (Start As Int, Length As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  SPELLCHECK_DEFAULT As Int [read only]

  SPELLCHECK_NO As Int [read only]

  SPELLCHECK_YES As Int [read only]

  Tag As Object

  Text As String

  TextAlignment As Int

  TextColor As Int

  TintColor As Int

  Top As Float

  TYPE_ASCII_CAPABLE As Int [read only]

  TYPE_DECIMAL_PAD As Int [read only]

  TYPE_DEFAULT As Int [read only]

  TYPE_EMAIL_ADDRESS As Int [read only]

  TYPE_NAME_PHONE_PAD As Int [read only]

  TYPE_NUMBER_PAD As Int [read only]

  TYPE_NUMBERS_AND_PUNCTUATIONS As Int [read only]

  TYPE_PHONE_PAD As Int [read only]

  TYPE_URL As Int [read only]

  TYPE_WEB_SEARCH As Int [read only]

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

ALIGNMENT_CENTER As Int [read only]
ALIGNMENT_LEFT As Int [read only]
ALIGNMENT_RIGHT As Int [read only]
Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
APPEARANCE_DARK As Int [read only]
APPEARANCE_DEFAULT As Int [read only]
APPEARANCE_LIGHT As Int [read only]
AttributedText As AttributedString
Gets or sets the attributed string. CSBuilder can be used to build the string.
Autocapitalize As Int
Gets or sets the autocapitalize mode (one of the AUTOCAPITALIZE constants).
AUTOCAPITALIZE_ALL As Int [read only]
AUTOCAPITALIZE_NONE As Int [read only]
AUTOCAPITALIZE_SENTENCES As Int [read only]
AUTOCAPITALIZE_WORDS As Int [read only]
Autocorrect As Int
Gets or sets th
Gets or sets the keyboard auto-correct mode (one of the AUTOCORRECT constants).
AUTOCORRECT_DEFAULT As Int [read only]
AUTOCORRECT_NO As Int [read only]
AUTOCORRECT_YES As Int [read only]
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
Color As Int
Gets or sets the view's background color.
Editable As Boolean
Gets or sets whether the field is editable.
Font As Font
Gets or sets the font.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
KeyboardAppearance As Int
Gets or sets the keyboard appearance (one of the APPEARANCE constants).
KeyboardType As Int
Gets or sets the keyboard type (one of the TYPE constants).
Left As Float
Gets or sets the view's left position.
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
PasswordMode As Boolean
Set to true to change the text field to password mode.
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
RETURN_DEFAULT As Int [read only]
RETURN_DONE As Int [read only]
RETURN_GO As Int [read only]
RETURN_NEXT As Int [read only]
RETURN_SEARCH As Int [read only]
RETURN_SEND As Int [read only]
ReturnKey As Int
Gets or sets the return key (one of the RETURN constants).
ScrollTo (Index As Int)
Scrolls to the specified index.
SelectAll
Selects all text.
SelectionLength As Int
Returns the text selection length. Use SetSelection method if you want to set the selection.
SelectionStart As Int
Gets or sets the selection start position.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetSelection (Start As Int, Length As Int)
Sets the selected text.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
SPELLCHECK_DEFAULT As Int [read only]
SPELLCHECK_NO As Int [read only]
SPELLCHECK_YES As Int [read only]
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Text As String
Gets or sets the text.
TextAlignment As Int
Gets or sets the text alignment (one of the ALIGNMENT constants).
TextColor As Int
Gets or sets the text color.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
TYPE_ASCII_CAPABLE As Int [read only]
TYPE_DECIMAL_PAD As Int [read only]
TYPE_DEFAULT As Int [read only]
TYPE_EMAIL_ADDRESS As Int [read only]
TYPE_NAME_PHONE_PAD As Int [read only]
TYPE_NUMBER_PAD As Int [read only]
TYPE_NUMBERS_AND_PUNCTUATIONS As Int [read only]
TYPE_PHONE_PAD As Int [read only]
TYPE_URL As Int [read only]
TYPE_WEB_SEARCH As Int [read only]
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.

WebView

A view with an embedded browser engine.
WebView can show online Urls or local html strings.
PageFinished event is raised after a page is loaded.
OverrideUrl is called before a page is loaded. If you return True from this method then the Url will not be loaded.

Events:

PageFinished (Success As Boolean, Url As String)
OverrideUrl (Url As String) As Boolean
Click
LongClick

Members:


  Alpha As Float

  BringToFront

  CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double

  CanGoBack As Boolean

  CanGoForward As Boolean

  Color As Int

  GoBack

  GoForward

  Height As Float

  Initialize (EventName As String)

  IsFocused As Boolean [read only]

  IsInitialized As Boolean

  Left As Float

  LoadHtml (Html As String)

  LoadUrl (Url As String)

  Parent As View [read only]

  Release

  RemoveViewFromParent

  RequestFocus As Boolean

  ResignFocus As Boolean

  ScaleToFit As Boolean

  SendToBack

  SetAlphaAnimated (DurationMS As Int, Alpha As Float)

  SetBorder (Width As Float, Color As Int, CornerRadius As Float)

  SetColorAnimated (DurationMS As Int, BackgroundColor As Int)

  SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)

  SetParallaxEffect (Vertical As Int, Horizontal As Int)

  SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)

  SizeToFit

  Tag As Object

  TintColor As Int

  Top As Float

  UserInteractionEnabled As Boolean

  Visible As Boolean

  Width As Float

Members description:

Alpha As Float
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BringToFront
Brings the view to front.
CalcRelativeKeyboardHeight (KeyboardHeight As Double) As Double
Calculates the keyboard top point relative to the current view.
CanGoBack As Boolean
Returns true if the WebView can navigate to the previous page.
CanGoForward As Boolean
Returns true if the WebView can navigate forward.
Color As Int
Gets or sets the view's background color.
GoBack
Navigates to the previous page.
GoForward
Navigates to the next page in the stack of pages.
Height As Float
Gets or sets the view's height.
Initialize (EventName As String)
Initializes the WebView.
IsFocused As Boolean [read only]
Returns true if the view is focused.
IsInitialized As Boolean
Tests whether this object was initialized.
Left As Float
Gets or sets the view's left position.
LoadHtml (Html As String)
Loads the given html code. The path is relative to the assets folder.
LoadUrl (Url As String)
Loads a url. Note that you cannot use this method to load files from the Assets folder.
Example:
WebView1.LoadUrl("http://www.google.com")
Parent As View [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
Release
Releases internal resources. You should call this method before removing WebView from its parent.
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocus As Boolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable.
When a text view is focused the keyboard is shown.
ResignFocus As Boolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
ScaleToFit As Boolean
If True then the webpage is scaled to fit and zooming is enabled. Default value is false.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMS As Int, Alpha As Float)
Animates the view's alpha level.
DurationMS - Animation duration measured in milliseconds.
Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
SetBorder (Width As Float, Color As Int, CornerRadius As Float)
Sets the view's border width, color and corner radius.
Note that the corner radius should be 0 if the view should show a shadow as well.
SetColorAnimated (DurationMS As Int, BackgroundColor As Int)
Animates the view's background color.
DurationMS - Animation duration measured in milliseconds.
BackgroundColor - The new background color.
Note that Labels do not support this type of animation.
SetLayoutAnimated (DurationMS As Int, DampingRatio As Float, Left As Float, Top As Float, Width As Float, Height As Float)
Animates the view's layout.
DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately.
DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1.
Set to 1 for no spring effect.
Left, Top, Width and Height - The new layout.
SetParallaxEffect (Vertical As Int, Horizontal As Int)
Adds a parallax effect to the view. The view will slightly move when the device is tilted.
Vertical - Vertical offset. Can be a positive or negative value.
Horizontal - Horizontal offset. Can be a positive or negative value.
SetShadow (Color As Int, OffsetX As Float, OffsetY As Float, Opacity As Float, StaticRect As Boolean)
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows.
Colors - The shadow color.
OffsetX, OffsetY - The horizontal and vertical offsets.
Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque.
StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColor As Int
Gets or sets the view's tint color. Some views use this color to change their appearance.
Top As Float
Gets or sets the view's top position.
UserInteractionEnabled As Boolean
Gets or sets whether the user can interact with this view. True by default.
Visible As Boolean
Gets or sets whether the view is visible.
Width As Float
Gets or sets the view's width.
Top