Android Programming Press on the image to return to the main documentation page. ------------------------------------------------------------------------ Views (Core) List of types: Activity <#activity> AutoCompleteEditText <#autocompleteedittext> Button <#button> CheckBox <#checkbox> EditText <#edittext> HorizontalScrollView <#horizontalscrollview> ImageView <#imageview> Label <#label> ListView <#listview> Panel <#panel> ProgressBar <#progressbar> RadioButton <#radiobutton> ScrollView <#scrollview> SeekBar <#seekbar> Spinner <#spinner> TabHost <#tabhost> ToggleButton <#togglebutton> View <#view> WebView <#webview> ------------------------------------------------------------------------ _Activity_ Each activity module include a predefined Activity object. Activity is the main component of your application. Activities have three special life cycle related event: Activity_Create, Activity_Resume and Activity_Pause. See this tutorial for more information about activities and processes life cycle: Life cycle tutorial . You can add and remove views to this activity with AddView and RemoveViewAt methods. You can also load a layout file with LoadLayout. The Touch event can be used to handle user touches. The first parameter of this event is the Action parameter. The parameter values can be ACTION_DOWN, ACTION_MOVE or ACTION_UP. Use this value to find the user current action. The KeyPress and KeyUp events occur when the user presses or releases a key, assuming that no other view has consumed this event (like EditText). When handling the KeyPress or KeyUp event you should return a boolean value which tells whether the event was consumed. For example if the user pressed on the Back key and you return True then the OS will not close your activity. Sub Activity_KeyPress (KeyCode As Int) As Boolean If Keycode = KeyCodes.KEYCODE_BACK Then Return True Else Return False End If End Sub You can add menu items to the activity with AddMenuItem method. Note that this method should only be called inside Activity_Create event. Starting from Android 4.3 it is not possible to show a modal dialog inside the KeyPress or KeyUp events, with one exception which is in the case of the Back key. If you need to show a modal dialog for other keys then you should call a sub with CallSubDelayed and show the modal dialog in that sub. Events: Touch (Action As Int, X As Float, Y As Float) KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event KeyUp (KeyCode As Int) As Boolean WindowFocusChanged (Focused As Boolean) ActionBarHomeClick PermissionResult (Permission As String, Result As Boolean) Click LongClick Members: *ACTION_DOWN* <#activity_action_down> As Int *ACTION_MOVE* <#activity_action_move> As Int *ACTION_UP* <#activity_action_up> As Int *AddMenuItem* <#activity_addmenuitem> (Title As CharSequence, EventName As String) *AddMenuItem2* <#activity_addmenuitem2> (Title As CharSequence, EventName As String, Bitmap As android.graphics.Bitmap) *AddMenuItem3* <#activity_addmenuitem3> (Title As CharSequence, EventName As String, Bitmap As android.graphics.Bitmap, AddToActionBar As Boolean) *AddView* <#activity_addview> (View As android.view.View, Left As Int, Top As Int, Width As Int, Height As Int) *Background* <#activity_background> As android.graphics.drawable.Drawable *CloseMenu* <#activity_closemenu> *Color* <#activity_color> As Int [write only] *DisableAccessibility* <#activity_disableaccessibility> (Disable As Boolean) *Finish* <#activity_finish> *GetAllViewsRecursive* <#activity_getallviewsrecursive> As IterableList *GetStartingIntent* <#activity_getstartingintent> As Intent *GetView* <#activity_getview> (Index As Int) As View *Height* <#activity_height> As Int *Initialize* <#activity_initialize> (EventName As String) *Invalidate* <#activity_invalidate> *Invalidate2* <#activity_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#activity_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#activity_isinitialized> As Boolean *Left* <#activity_left> As Int *LoadLayout* <#activity_loadlayout> (LayoutFile As String) As LayoutValues *NumberOfViews* <#activity_numberofviews> As Int [read only] *OpenMenu* <#activity_openmenu> *Padding* <#activity_padding>() As Int *Parent* <#activity_parent> As Object [read only] *RemoveAllViews* <#activity_removeallviews> *RemoveViewAt* <#activity_removeviewat> (Index As Int) *RequestFocus* <#activity_requestfocus> As Boolean *RerunDesignerScript* <#activity_rerundesignerscript> (Layout As String, Width As Int, Height As Int) *SetActivityResult* <#activity_setactivityresult> (Result As Int, Data As Intent) *SetBackgroundImage* <#activity_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#activity_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#activity_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#activity_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#activity_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#activity_tag> As Object *Title* <#activity_title> As CharSequence *TitleColor* <#activity_titlecolor> As Int *Top* <#activity_top> As Int *Width* <#activity_width> As Int Members description: ACTION_DOWN As Int ACTION_MOVE As Int ACTION_UP As Int AddMenuItem (Title As CharSequence, EventName As String) Adds a menu item to the activity. Title - Menu item title. EventName - The prefix name of the sub that will handle the click event. This method should only be called inside sub Activity_Create. Note that the 'Sender' value inside the click event equals to the clicked menu item text. Example: Activity.AddMenuItem("Open File", "OpenFile") ... Sub OpenFile_Click ... End Sub AddMenuItem2 (Title As CharSequence, EventName As String, Bitmap As android.graphics.Bitmap) Adds a menu item to the activity. Title - Menu item title. EventName - The prefix name of the sub that will handle the click event. Bitmap - Bitmap to draw as the item background. Only the first five (or six if there are six total) menu items display icons. This method should only be called inside sub Activity_Create. Note that the 'Sender' value inside the click event equals to the clicked menu item text. Example: Activity.AddMenuItem2("Open File", "OpenFile", LoadBitmap(File.DirAssets, "SomeImage.png")) ... Sub OpenFile_Click ... End Sub AddMenuItem3 (Title As CharSequence, EventName As String, Bitmap As android.graphics.Bitmap, AddToActionBar As Boolean) Similar to AddMenuItem2. If AddToActionBar is true then the item will be displayed in the action bar (on Android 3.0+ devices) if there is enough room. If there is not enough room then the item will be displayed together with the other menu items. AddView (View As android.view.View, Left As Int, Top As Int, Width As Int, Height As Int) Adds a view to this activity. Background As android.graphics.drawable.Drawable Gets or sets the background drawable. CloseMenu Programmatically closes the menu. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. DisableAccessibility (Disable As Boolean) This method was added as a workaround for the following Android bug . By setting the Disable property to True the child views (of all Activities) will not be added to the accessibility enabled list. Finish Closes this activity. GetAllViewsRecursive As IterableList Returns an iterator that iterates over all the child views including views that were added to other child views. Example: For Each v As View In Activity.GetAllViewsRecursive ... Next GetStartingIntent As Intent (Advanced) Gets the intent object that started this Activity. This can be used together with SetActivityResult to return results to 3rd party applications. GetView (Index As Int) As View Gets the view that is stored in the specified index. Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int LoadLayout (LayoutFile As String) As LayoutValues Loads a layout file (.bal). Returns the LayoutValues of the actual layout variant that was loaded. NumberOfViews As Int [read only] Returns the number of child views. OpenMenu Programmatically opens the menu. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveAllViews Removes all child views. RemoveViewAt (Index As Int) Removes the view that is stored in the specified index. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. RerunDesignerScript (Layout As String, Width As Int, Height As Int) *This method is deprecated.* It ignores the anchoring features and it will fail in Rapid Debug mode. You should instead remove the views and load the layout again. SetActivityResult (Result As Int, Data As Intent) (Advanced) Sets the result that the calling Activity will get after calling StartActivityForResult. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Title As CharSequence TitleColor As Int Gets or sets the title color. This property is only supported by Android 2.x devices. It will not do anything on newer devices. Top As Int Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___AutoCompleteEditText_ An enhanced version of EditText which shows the user a drop down list with all items matching the currently entered characters. Items matching are items starting with the current input or items that include a word that starts with the current input (words must be separated with spaces). Call SetItems with the list of possible items. ItemClick event is raised when the user clicks on an item from the list. Example: Sub Process_Globals End Sub Sub Globals Dim ACT As AutoCompleteEditText End Sub Sub Activity_Create(FirstTime As Boolean) ACT.Initialize("ACT") Activity.AddView(ACT, 10dip, 10dip, 500dip, 80dip) Dim countries() As String countries = Array As String( _ "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", _ "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", _ "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", _ "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", _ "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", _ "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", _ "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", _ "Cote d'Ivoire", "Cambodia", "Cameroon", "Canada", "Cape Verde", _ "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", _ "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", _ "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic", _ "Democratic Republic of the Congo", "Denmark", "Djibouti", "Dominica", "Dominican Republic", _ "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", _ "Estonia", "Ethiopia", "Faeroe Islands", "Falkland Islands", "Fiji", "Finland", _ "Former Yugoslav Republic of Macedonia", "France", "French Guiana", "French Polynesia", _ "French Southern Territories", "Gabon", "Georgia", "Germany", "Ghana", "Gibraltar", _ "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", _ "Guyana", "Haiti", "Heard Island and McDonald Islands", "Honduras", "Hong Kong", "Hungary", _ "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", _ "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos", _ "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", _ "Macau", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", _ "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova", _ "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", _ "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", _ "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "Northern Marianas", _ "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", _ "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar", _ "Reunion", "Romania", "Russia", "Rwanda", "Sqo Tome and Principe", "Saint Helena", _ "Saint Kitts and Nevis", "Saint Lucia", "Saint Pierre and Miquelon", _ "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Saudi Arabia", "Senegal", _ "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", _ "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Korea", _ "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden", _ "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "The Bahamas", _ "The Gambia", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", _ "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Virgin Islands", "Uganda", _ "Ukraine", "United Arab Emirates", "United Kingdom", _ "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", _ "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Wallis and Futuna", "Western Sahara", _ "Yemen", "Yugoslavia", "Zambia", "Zimbabwe") ACT.SetItems(countries) End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Events: ItemClick (Value As String) TextChanged (Old As String, New As String) EnterPressed FocusChanged (HasFocus As Boolean) Members: *Background* <#autocompleteedittext_background> As android.graphics.drawable.Drawable *BringToFront* <#autocompleteedittext_bringtofront> *Color* <#autocompleteedittext_color> As Int [write only] *DismissDropDown* <#autocompleteedittext_dismissdropdown> *Ellipsize* <#autocompleteedittext_ellipsize> As String *Enabled* <#autocompleteedittext_enabled> As Boolean *ForceDoneButton* <#autocompleteedittext_forcedonebutton> As Boolean [write only] *Gravity* <#autocompleteedittext_gravity> As Int *Height* <#autocompleteedittext_height> As Int *Hint* <#autocompleteedittext_hint> As String *HintColor* <#autocompleteedittext_hintcolor> As Int *Initialize* <#autocompleteedittext_initialize> (EventName As String) *INPUT_TYPE_DECIMAL_NUMBERS* <#autocompleteedittext_input_type_decimal_numbers> As Int *INPUT_TYPE_NONE* <#autocompleteedittext_input_type_none> As Int *INPUT_TYPE_NUMBERS* <#autocompleteedittext_input_type_numbers> As Int *INPUT_TYPE_PHONE* <#autocompleteedittext_input_type_phone> As Int *INPUT_TYPE_TEXT* <#autocompleteedittext_input_type_text> As Int *InputType* <#autocompleteedittext_inputtype> As Int *Invalidate* <#autocompleteedittext_invalidate> *Invalidate2* <#autocompleteedittext_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#autocompleteedittext_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#autocompleteedittext_isinitialized> As Boolean *Left* <#autocompleteedittext_left> As Int *Padding* <#autocompleteedittext_padding>() As Int *Parent* <#autocompleteedittext_parent> As Object [read only] *PasswordMode* <#autocompleteedittext_passwordmode> As Boolean [write only] *RemoveView* <#autocompleteedittext_removeview> *RequestFocus* <#autocompleteedittext_requestfocus> As Boolean *SelectAll* <#autocompleteedittext_selectall> *SelectionLength* <#autocompleteedittext_selectionlength> As Int [read only] *SelectionStart* <#autocompleteedittext_selectionstart> As Int *SendToBack* <#autocompleteedittext_sendtoback> *SetBackgroundImage* <#autocompleteedittext_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#autocompleteedittext_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetItems* <#autocompleteedittext_setitems> (Items As List) *SetItems2* <#autocompleteedittext_setitems2> (Items As List, Typeface As android.graphics.Typeface, Gravity As Int, TextSize As Float, TextColor As Int) *SetLayout* <#autocompleteedittext_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#autocompleteedittext_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetSelection* <#autocompleteedittext_setselection> (Start As Int, Length As Int) *SetTextColorAnimated* <#autocompleteedittext_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#autocompleteedittext_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#autocompleteedittext_setvisibleanimated> (Duration As Int, Visible As Boolean) *ShowDropDown* <#autocompleteedittext_showdropdown> *SingleLine* <#autocompleteedittext_singleline> As Boolean [write only] *Tag* <#autocompleteedittext_tag> As Object *Text* <#autocompleteedittext_text> As String *TextColor* <#autocompleteedittext_textcolor> As Int *TextSize* <#autocompleteedittext_textsize> As Float *Top* <#autocompleteedittext_top> As Int *Typeface* <#autocompleteedittext_typeface> As android.graphics.Typeface *Visible* <#autocompleteedittext_visible> As Boolean *Width* <#autocompleteedittext_width> As Int *Wrap* <#autocompleteedittext_wrap> As Boolean [write only] Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. DismissDropDown Forces the drop down list to disappear. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean ForceDoneButton As Boolean [write only] By default the OS sets the virtual keyboard action key to display Done or Next according to the specific layout. You can force it to display Done by setting this value to True. Example: EditText1.ForceDoneButton = True Gravity As Int Height As Int Gets or sets the view's height. Hint As String Gets or sets the text that will appear when the EditText is empty. Example: EditText1.Hint = "Enter username" HintColor As Int Gets or sets the hint text color. Example: EditText1.HintColor = Colors.Gray Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* INPUT_TYPE_DECIMAL_NUMBERS As Int Numeric keyboard will be displayed. Numbers, decimal point and minus sign are accepted. INPUT_TYPE_NONE As Int No keyboard will be displayed. INPUT_TYPE_NUMBERS As Int Numeric keyboard will be displayed. Only numbers are accepted. INPUT_TYPE_PHONE As Int Keyboard will be displayed in phone mode. INPUT_TYPE_TEXT As Int Default text mode. InputType As Int Gets or sets the input type flag. This flag is used to determine the settings of the virtual keyboard. Note that changing the input type will set the EditText to be in single line mode. Example: EditText1.InputType = EditText1.INPUT_TYPE_NUMBERS Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. PasswordMode As Boolean [write only] Sets whether the EditText should be in password mode and hide the actual characters. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SelectAll Selects the entire text. SelectionLength As Int [read only] Gets the selection length. SelectionStart As Int Gets or sets the selection start position (or the cursor position). Returns -1 if there is no selection or cursor. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetItems (Items As List) Sets the list of possible items. The items visual style will be the same as the style of the main text. SetItems2 (Items As List, Typeface As android.graphics.Typeface, Gravity As Int, TextSize As Float, TextColor As Int) Sets the list of possible items and specifies their style. Example: Dim act As AutoCompleteEditText act.Initialize("act") Activity.AddView(act, 10dip, 10dip, 200dip, 80dip) act.SetItems2(Array As String("aab", "abc"), act.Typeface, Gravity.LEFT, 12, Colors.Green) SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetSelection (Start As Int, Length As Int) Sets the selected text. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. ShowDropDown Forces the drop down list to appear. SingleLine As Boolean [write only] Sets whether the EditText should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Text As String TextColor As Int TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. Wrap As Boolean [write only] Sets whether the text content will wrap within the EditText bounds. Relevant when the EditText is in multiline mode. Example: EditText1.Wrap = False ------------------------------------------------------------------------ ___Button_ A Button view. If you change the button's background you will usually want to use StateListDrawable which allows you to set the "default" drawable and the "pressed" drawable. Note that the Up and Down events are still implemented but should not be used as they will not work properly on all devices. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: Click LongClick Members: *Background* <#button_background> As android.graphics.drawable.Drawable *BringToFront* <#button_bringtofront> *Color* <#button_color> As Int [write only] *Ellipsize* <#button_ellipsize> As String *Enabled* <#button_enabled> As Boolean *Gravity* <#button_gravity> As Int *Height* <#button_height> As Int *Initialize* <#button_initialize> (EventName As String) *Invalidate* <#button_invalidate> *Invalidate2* <#button_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#button_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#button_isinitialized> As Boolean *Left* <#button_left> As Int *Padding* <#button_padding>() As Int *Parent* <#button_parent> As Object [read only] *RemoveView* <#button_removeview> *RequestFocus* <#button_requestfocus> As Boolean *SendToBack* <#button_sendtoback> *SetBackgroundImage* <#button_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#button_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#button_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#button_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetTextColorAnimated* <#button_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#button_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#button_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLine* <#button_singleline> As Boolean [write only] *Tag* <#button_tag> As Object *Text* <#button_text> As String *TextColor* <#button_textcolor> As Int *TextSize* <#button_textsize> As Float *Top* <#button_top> As Int *Typeface* <#button_typeface> As android.graphics.Typeface *Visible* <#button_visible> As Boolean *Width* <#button_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean Gravity As Int Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLine As Boolean [write only] Sets whether the text field should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Text As String TextColor As Int TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___CheckBox_ A CheckBox view. Unlike RadioButtons each CheckBox can be checked independently. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: CheckedChange(Checked As Boolean) Members: *Background* <#checkbox_background> As android.graphics.drawable.Drawable *BringToFront* <#checkbox_bringtofront> *Checked* <#checkbox_checked> As Boolean *Color* <#checkbox_color> As Int [write only] *Ellipsize* <#checkbox_ellipsize> As String *Enabled* <#checkbox_enabled> As Boolean *Gravity* <#checkbox_gravity> As Int *Height* <#checkbox_height> As Int *Initialize* <#checkbox_initialize> (EventName As String) *Invalidate* <#checkbox_invalidate> *Invalidate2* <#checkbox_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#checkbox_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#checkbox_isinitialized> As Boolean *Left* <#checkbox_left> As Int *Padding* <#checkbox_padding>() As Int *Parent* <#checkbox_parent> As Object [read only] *RemoveView* <#checkbox_removeview> *RequestFocus* <#checkbox_requestfocus> As Boolean *SendToBack* <#checkbox_sendtoback> *SetBackgroundImage* <#checkbox_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#checkbox_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#checkbox_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#checkbox_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetTextColorAnimated* <#checkbox_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#checkbox_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#checkbox_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLine* <#checkbox_singleline> As Boolean [write only] *Tag* <#checkbox_tag> As Object *Text* <#checkbox_text> As String *TextColor* <#checkbox_textcolor> As Int *TextSize* <#checkbox_textsize> As Float *Top* <#checkbox_top> As Int *Typeface* <#checkbox_typeface> As android.graphics.Typeface *Visible* <#checkbox_visible> As Boolean *Width* <#checkbox_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Checked As Boolean Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean Gravity As Int Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLine As Boolean [write only] Sets whether the text field should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Text As String TextColor As Int TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___EditText_ EditText view is a view that allows the user to write free text (similar to WinForms TextBox). The EditText has two modes; SingleLine and MultiLine. You can set it to be multiline by calling EditText1.SingleLine = False On most devices the soft keyboard will show automatically when the user presses on the EditText. You can change the InputType property and change the type of keyboard that appears. For example: EditText1.InputType = EditText1.INPUT_TYPE_NUMBERS will cause the numeric keyboard to appear when the user presses on the EditText. Note that it will also cause the EditText to only accept numbers. The TextChanged event fires whenever the text changes and it includes the old and new strings. The EnterPressed event fires when the user presses on the enter key or action key (Done or Next). The FocusChanged event fires when the view is focused or loses focus. HasFocus parameter value will be set accordingly. Note that most views are not focusable. For example, pressing on a Button will not change the focus state of an EditText. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: TextChanged (Old As String, New As String) EnterPressed FocusChanged (HasFocus As Boolean) Members: *Background* <#edittext_background> As android.graphics.drawable.Drawable *BringToFront* <#edittext_bringtofront> *Color* <#edittext_color> As Int [write only] *Ellipsize* <#edittext_ellipsize> As String *Enabled* <#edittext_enabled> As Boolean *ForceDoneButton* <#edittext_forcedonebutton> As Boolean [write only] *Gravity* <#edittext_gravity> As Int *Height* <#edittext_height> As Int *Hint* <#edittext_hint> As String *HintColor* <#edittext_hintcolor> As Int *Initialize* <#edittext_initialize> (EventName As String) *INPUT_TYPE_DECIMAL_NUMBERS* <#edittext_input_type_decimal_numbers> As Int *INPUT_TYPE_NONE* <#edittext_input_type_none> As Int *INPUT_TYPE_NUMBERS* <#edittext_input_type_numbers> As Int *INPUT_TYPE_PHONE* <#edittext_input_type_phone> As Int *INPUT_TYPE_TEXT* <#edittext_input_type_text> As Int *InputType* <#edittext_inputtype> As Int *Invalidate* <#edittext_invalidate> *Invalidate2* <#edittext_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#edittext_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#edittext_isinitialized> As Boolean *Left* <#edittext_left> As Int *Padding* <#edittext_padding>() As Int *Parent* <#edittext_parent> As Object [read only] *PasswordMode* <#edittext_passwordmode> As Boolean [write only] *RemoveView* <#edittext_removeview> *RequestFocus* <#edittext_requestfocus> As Boolean *SelectAll* <#edittext_selectall> *SelectionLength* <#edittext_selectionlength> As Int [read only] *SelectionStart* <#edittext_selectionstart> As Int *SendToBack* <#edittext_sendtoback> *SetBackgroundImage* <#edittext_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#edittext_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#edittext_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#edittext_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetSelection* <#edittext_setselection> (Start As Int, Length As Int) *SetTextColorAnimated* <#edittext_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#edittext_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#edittext_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLine* <#edittext_singleline> As Boolean [write only] *Tag* <#edittext_tag> As Object *Text* <#edittext_text> As String *TextColor* <#edittext_textcolor> As Int *TextSize* <#edittext_textsize> As Float *Top* <#edittext_top> As Int *Typeface* <#edittext_typeface> As android.graphics.Typeface *Visible* <#edittext_visible> As Boolean *Width* <#edittext_width> As Int *Wrap* <#edittext_wrap> As Boolean [write only] Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean ForceDoneButton As Boolean [write only] By default the OS sets the virtual keyboard action key to display Done or Next according to the specific layout. You can force it to display Done by setting this value to True. Example: EditText1.ForceDoneButton = True Gravity As Int Height As Int Gets or sets the view's height. Hint As String Gets or sets the text that will appear when the EditText is empty. Example: EditText1.Hint = "Enter username" HintColor As Int Gets or sets the hint text color. Example: EditText1.HintColor = Colors.Gray Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* INPUT_TYPE_DECIMAL_NUMBERS As Int Numeric keyboard will be displayed. Numbers, decimal point and minus sign are accepted. INPUT_TYPE_NONE As Int No keyboard will be displayed. INPUT_TYPE_NUMBERS As Int Numeric keyboard will be displayed. Only numbers are accepted. INPUT_TYPE_PHONE As Int Keyboard will be displayed in phone mode. INPUT_TYPE_TEXT As Int Default text mode. InputType As Int Gets or sets the input type flag. This flag is used to determine the settings of the virtual keyboard. Note that changing the input type will set the EditText to be in single line mode. Example: EditText1.InputType = EditText1.INPUT_TYPE_NUMBERS Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. PasswordMode As Boolean [write only] Sets whether the EditText should be in password mode and hide the actual characters. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SelectAll Selects the entire text. SelectionLength As Int [read only] Gets the selection length. SelectionStart As Int Gets or sets the selection start position (or the cursor position). Returns -1 if there is no selection or cursor. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetSelection (Start As Int, Length As Int) Sets the selected text. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLine As Boolean [write only] Sets whether the EditText should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Text As String TextColor As Int TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. Wrap As Boolean [write only] Sets whether the text content will wrap within the EditText bounds. Relevant when the EditText is in multiline mode. Example: EditText1.Wrap = False ------------------------------------------------------------------------ ___HorizontalScrollView_ HorizontalScrollView is a view that contains other views and allows the user to horizontally scroll those views. The HorizontalScrollView is similar to ScrollView which scrolls vertically. See the ScrollView tutorial for more information. The HorizontalScrollView has an inner panel which actually contains the child views. You can add views by calling: HorizontalScrollView1.Panel.AddView(...) Note that it is not possible to nest scrolling views. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: ScrollChanged(Position As Int) Members: *Background* <#horizontalscrollview_background> As android.graphics.drawable.Drawable *BringToFront* <#horizontalscrollview_bringtofront> *Color* <#horizontalscrollview_color> As Int [write only] *Enabled* <#horizontalscrollview_enabled> As Boolean *FullScroll* <#horizontalscrollview_fullscroll> (Right As Boolean) *Height* <#horizontalscrollview_height> As Int *Initialize* <#horizontalscrollview_initialize> (Width As Int, EventName As String) *Invalidate* <#horizontalscrollview_invalidate> *Invalidate2* <#horizontalscrollview_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#horizontalscrollview_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#horizontalscrollview_isinitialized> As Boolean *Left* <#horizontalscrollview_left> As Int *Padding* <#horizontalscrollview_padding>() As Int *Panel* <#horizontalscrollview_panel> As Panel [read only] *Parent* <#horizontalscrollview_parent> As Object [read only] *RemoveView* <#horizontalscrollview_removeview> *RequestFocus* <#horizontalscrollview_requestfocus> As Boolean *ScrollPosition* <#horizontalscrollview_scrollposition> As Int *ScrollToNow* <#horizontalscrollview_scrolltonow> (Scroll As Int) *SendToBack* <#horizontalscrollview_sendtoback> *SetBackgroundImage* <#horizontalscrollview_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#horizontalscrollview_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#horizontalscrollview_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#horizontalscrollview_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#horizontalscrollview_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#horizontalscrollview_tag> As Object *Top* <#horizontalscrollview_top> As Int *Visible* <#horizontalscrollview_visible> As Boolean *Width* <#horizontalscrollview_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean FullScroll (Right As Boolean) Scrolls the view to the right or left. Height As Int Gets or sets the view's height. Initialize (Width As Int, EventName As String) Initializes the object. Width - The width of the inner panel. EventName - Sets the sub that will handle the event. Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Panel As Panel [read only] Returns the panel which you can use to add views to. Example: HorizontalScrollView1.Panel.AddView(...) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. ScrollPosition As Int Gets or sets the scroll position. ScrollToNow (Scroll As Int) Immediately scrolls the HorizontalScrollView (with no animations). SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___ImageView_ A view that shows an image. You can assign a bitmap using the Bitmap property. The Gravity property changes the way the image appears. The two most relevant values are Gravity.FILL (which will cause the image to fill the entire view) and Gravity.CENTER (which will draw the image in the view's center). This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: Click LongClick Members: *Background* <#imageview_background> As android.graphics.drawable.Drawable *Bitmap* <#imageview_bitmap> As android.graphics.Bitmap *BringToFront* <#imageview_bringtofront> *Color* <#imageview_color> As Int [write only] *Enabled* <#imageview_enabled> As Boolean *Gravity* <#imageview_gravity> As Int *Height* <#imageview_height> As Int *Initialize* <#imageview_initialize> (EventName As String) *Invalidate* <#imageview_invalidate> *Invalidate2* <#imageview_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#imageview_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#imageview_isinitialized> As Boolean *Left* <#imageview_left> As Int *Padding* <#imageview_padding>() As Int *Parent* <#imageview_parent> As Object [read only] *RemoveView* <#imageview_removeview> *RequestFocus* <#imageview_requestfocus> As Boolean *SendToBack* <#imageview_sendtoback> *SetBackgroundImage* <#imageview_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#imageview_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#imageview_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#imageview_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#imageview_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#imageview_tag> As Object *Top* <#imageview_top> As Int *Visible* <#imageview_visible> As Boolean *Width* <#imageview_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. Bitmap As android.graphics.Bitmap Gets or sets the bitmap assigned to the ImageView. Example: ImageView1.Bitmap = LoadBitmap(File.DirAssets, "someimage.jpg") BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean Gravity As Int Gets or sets the gravity assigned to the bitmap. Example: ImageView1.Gravity = Gravity.Fill Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is not changed. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___Label_ A Label view that shows read-only text. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: Click LongClick Members: *Background* <#label_background> As android.graphics.drawable.Drawable *BringToFront* <#label_bringtofront> *Color* <#label_color> As Int [write only] *Ellipsize* <#label_ellipsize> As String *Enabled* <#label_enabled> As Boolean *Gravity* <#label_gravity> As Int *Height* <#label_height> As Int *Initialize* <#label_initialize> (EventName As String) *Invalidate* <#label_invalidate> *Invalidate2* <#label_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#label_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#label_isinitialized> As Boolean *Left* <#label_left> As Int *Padding* <#label_padding>() As Int *Parent* <#label_parent> As Object [read only] *RemoveView* <#label_removeview> *RequestFocus* <#label_requestfocus> As Boolean *SendToBack* <#label_sendtoback> *SetBackgroundImage* <#label_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#label_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#label_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#label_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetTextColorAnimated* <#label_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#label_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#label_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLine* <#label_singleline> As Boolean [write only] *Tag* <#label_tag> As Object *Text* <#label_text> As String *TextColor* <#label_textcolor> As Int *TextSize* <#label_textsize> As Float *Top* <#label_top> As Int *Typeface* <#label_typeface> As android.graphics.Typeface *Visible* <#label_visible> As Boolean *Width* <#label_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean Gravity As Int Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLine As Boolean [write only] Sets whether the text field should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Text As String TextColor As Int TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___ListView_ ListView is a very useful view that can handle large and small lists. The ListView raises two events. ItemClick is raised when an item is clicked and ItemLongClick is raised when an item is clicked and held. See the ListView tutorial for more information. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: ItemClick (Position As Int, Value As Object) ItemLongClick (Position As Int, Value As Object) Members: *AddSingleLine* <#listview_addsingleline> (Text As CharSequence) *AddSingleLine2* <#listview_addsingleline2> (Text As CharSequence, ReturnValue As Object) *AddTwoLines* <#listview_addtwolines> (Text1 As CharSequence, Text2 As CharSequence) *AddTwoLines2* <#listview_addtwolines2> (Text1 As CharSequence, Text2 As CharSequence, ReturnValue As Object) *AddTwoLinesAndBitmap* <#listview_addtwolinesandbitmap> (Text1 As CharSequence, Text2 As CharSequence, Bitmap As android.graphics.Bitmap) *AddTwoLinesAndBitmap2* <#listview_addtwolinesandbitmap2> (Text1 As CharSequence, Text2 As CharSequence, Bitmap As android.graphics.Bitmap, ReturnValue As Object) *Background* <#listview_background> As android.graphics.drawable.Drawable *BringToFront* <#listview_bringtofront> *Clear* <#listview_clear> *Color* <#listview_color> As Int [write only] *Enabled* <#listview_enabled> As Boolean *FastScrollEnabled* <#listview_fastscrollenabled> As Boolean *GetItem* <#listview_getitem> (Index As Int) As Object *Height* <#listview_height> As Int *Initialize* <#listview_initialize> (EventName As String) *Invalidate* <#listview_invalidate> *Invalidate2* <#listview_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#listview_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#listview_isinitialized> As Boolean *Left* <#listview_left> As Int *Padding* <#listview_padding>() As Int *Parent* <#listview_parent> As Object [read only] *RemoveAt* <#listview_removeat> (Index As Int) *RemoveView* <#listview_removeview> *RequestFocus* <#listview_requestfocus> As Boolean *ScrollingBackgroundColor* <#listview_scrollingbackgroundcolor> As Int [write only] *SendToBack* <#listview_sendtoback> *SetBackgroundImage* <#listview_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#listview_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#listview_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#listview_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetSelection* <#listview_setselection> (Position As Int) *SetVisibleAnimated* <#listview_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLineLayout* <#listview_singlelinelayout> As SingleLineLayout [read only] *Size* <#listview_size> As Int [read only] *Tag* <#listview_tag> As Object *Top* <#listview_top> As Int *TwoLinesAndBitmap* <#listview_twolinesandbitmap> As TwoLinesAndBitmapLayout [read only] *TwoLinesLayout* <#listview_twolineslayout> As TwoLinesLayout [read only] *Visible* <#listview_visible> As Boolean *Width* <#listview_width> As Int Members description: AddSingleLine (Text As CharSequence) Adds a single line item. Example: ListView1.AddSingleLine("Sunday") AddSingleLine2 (Text As CharSequence, ReturnValue As Object) Adds a single line item. The specified return value will be returned when calling GetItem or in the ItemClick event. Example: ListView1.AddSingleLine2("Sunday", 1) AddTwoLines (Text1 As CharSequence, Text2 As CharSequence) Adds a two lines item. Example: ListView1.AddTwoLines("This is the first line.", "And this is the second") AddTwoLines2 (Text1 As CharSequence, Text2 As CharSequence, ReturnValue As Object) Adds a two lines item. The specified return value will be returned when calling GetItem or in the ItemClick event. AddTwoLinesAndBitmap (Text1 As CharSequence, Text2 As CharSequence, Bitmap As android.graphics.Bitmap) Adds a two lines and a bitmap item. Example: ListView1.AddTwoLinesAndBitmap("First line", "Second line", LoadBitmap(File.DirAssets, "SomeImage.png")) AddTwoLinesAndBitmap2 (Text1 As CharSequence, Text2 As CharSequence, Bitmap As android.graphics.Bitmap, ReturnValue As Object) Adds a two lines and a bitmap item. The specified return value will be returned when calling GetItem or in the ItemClick event. Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Clear Clears all items from the list. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean FastScrollEnabled As Boolean Gets or sets whether the fast scroll icon will appear when the user scrolls the list. The default is false. GetItem (Index As Int) As Object Returns the value of the item at the specified position. Returns the "return value" if it was set and if not returns the text of the first line. Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveAt (Index As Int) Removes the item at the specified position. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. ScrollingBackgroundColor As Int [write only] Sets the background color that will be used while scrolling the list. This is an optimization done to make the scrolling smoother. Set to Colors.Transparent if the background behind the list is not solid color. The default is black. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetSelection (Position As Int) Sets the currently selected item. Calling this method will make this item visible. If the user is interacting with the list with the keyboard or the wheel button the item will also be visibly selected. Example:ListView1.SetSelection(10) SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLineLayout As SingleLineLayout [read only] Returns the layout that is used to show single line items. You can change the layout values to change the appearance of such items. Example: Dim Label1 As Label Label1 = ListView1.SingleLineLayout.Label Label1.TextSize = 20 Label1.TextColor = Colors.Green Size As Int [read only] Returns the number of items stored in the list. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. TwoLinesAndBitmap As TwoLinesAndBitmapLayout [read only] Returns the layout that is used to show two lines and bitmap items. You can change the layout values to change the appearance of such items. For example if you want to remove the second label (in all items with this layout): ListView1.TwoLinesAndBitmap.SecondLabel.Visible = False TwoLinesLayout As TwoLinesLayout [read only] Returns the layout that is used to show two lines items. You can change the layout values to change the appearance of such items. Example: Dim Label1 As Label Label1 = ListView1.TwoLinesLayout.SecondLabel Label1.TextSize = 20 Label1.TextColor = Colors.Green Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___Panel_ A Panel is a view that holds other child views. You can add child views programmatically or by loading a layout file. The Panel raises the Touch event. The first parameter of this event is the Action which is one of the Activity action constants. Return True from the Touch event sub to consume the event (otherwise other views behind the Panel will receive the event). This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: Touch (Action As Int, X As Float, Y As Float) Click LongClick Members: *ACTION_DOWN* <#panel_action_down> As Int *ACTION_MOVE* <#panel_action_move> As Int *ACTION_UP* <#panel_action_up> As Int *AddView* <#panel_addview> (View As android.view.View, Left As Int, Top As Int, Width As Int, Height As Int) *Background* <#panel_background> As android.graphics.drawable.Drawable *BringToFront* <#panel_bringtofront> *Color* <#panel_color> As Int [write only] *Elevation* <#panel_elevation> As Float *Enabled* <#panel_enabled> As Boolean *GetAllViewsRecursive* <#panel_getallviewsrecursive> As IterableList *GetView* <#panel_getview> (Index As Int) As View *Height* <#panel_height> As Int *Initialize* <#panel_initialize> (EventName As String) *Invalidate* <#panel_invalidate> *Invalidate2* <#panel_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#panel_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#panel_isinitialized> As Boolean *Left* <#panel_left> As Int *LoadLayout* <#panel_loadlayout> (LayoutFile As String) As LayoutValues *NumberOfViews* <#panel_numberofviews> As Int [read only] *Padding* <#panel_padding>() As Int *Parent* <#panel_parent> As Object [read only] *RemoveAllViews* <#panel_removeallviews> *RemoveView* <#panel_removeview> *RemoveViewAt* <#panel_removeviewat> (Index As Int) *RequestFocus* <#panel_requestfocus> As Boolean *SendToBack* <#panel_sendtoback> *SetBackgroundImage* <#panel_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#panel_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetElevationAnimated* <#panel_setelevationanimated> (Duration As Int, Elevation As Float) *SetLayout* <#panel_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#panel_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#panel_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#panel_tag> As Object *Top* <#panel_top> As Int *Visible* <#panel_visible> As Boolean *Width* <#panel_width> As Int Members description: ACTION_DOWN As Int ACTION_MOVE As Int ACTION_UP As Int AddView (View As android.view.View, Left As Int, Top As Int, Width As Int, Height As Int) Adds a view to this panel. Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Elevation As Float Enabled As Boolean GetAllViewsRecursive As IterableList Returns an iterator that iterates over all the child views including views that were added to other child views. Example: For Each v As View In Panel1.GetAllViewsRecursive ... Next GetView (Index As Int) As View Gets the view that is stored in the specified index. Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. LoadLayout (LayoutFile As String) As LayoutValues Loads a layout file to this panel. Returns the value of the chosen layout variant. NumberOfViews As Int [read only] Returns the number of child views. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveAllViews Removes all child views. RemoveView Removes this view from its parent. RemoveViewAt (Index As Int) Removes the view that is stored in the specified index. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetElevationAnimated (Duration As Int, Elevation As Float) SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___ProgressBar_ A progress bar view. The Progress property sets the progress value which is between 0 to 100. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: None Members: *Background* <#progressbar_background> As android.graphics.drawable.Drawable *BringToFront* <#progressbar_bringtofront> *Color* <#progressbar_color> As Int [write only] *Enabled* <#progressbar_enabled> As Boolean *Height* <#progressbar_height> As Int *Indeterminate* <#progressbar_indeterminate> As Boolean *Initialize* <#progressbar_initialize> (EventName As String) *Invalidate* <#progressbar_invalidate> *Invalidate2* <#progressbar_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#progressbar_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#progressbar_isinitialized> As Boolean *Left* <#progressbar_left> As Int *Padding* <#progressbar_padding>() As Int *Parent* <#progressbar_parent> As Object [read only] *Progress* <#progressbar_progress> As Int *RemoveView* <#progressbar_removeview> *RequestFocus* <#progressbar_requestfocus> As Boolean *SendToBack* <#progressbar_sendtoback> *SetBackgroundImage* <#progressbar_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#progressbar_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#progressbar_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#progressbar_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#progressbar_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#progressbar_tag> As Object *Top* <#progressbar_top> As Int *Visible* <#progressbar_visible> As Boolean *Width* <#progressbar_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean Height As Int Gets or sets the view's height. Indeterminate As Boolean Gets or sets whether the progress bar is in indeterminate mode (cyclic animation). Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. Progress As Int Gets or sets the progress value. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___RadioButton_ A RadioButton view. Only one RadioButton in a group can be checked. When a different RadioButton is checked all others will automatically be unchecked. Grouping is done by adding RadioButtons to the same activity or panel. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: CheckedChange(Checked As Boolean) Members: *Background* <#radiobutton_background> As android.graphics.drawable.Drawable *BringToFront* <#radiobutton_bringtofront> *Checked* <#radiobutton_checked> As Boolean *Color* <#radiobutton_color> As Int [write only] *Ellipsize* <#radiobutton_ellipsize> As String *Enabled* <#radiobutton_enabled> As Boolean *Gravity* <#radiobutton_gravity> As Int *Height* <#radiobutton_height> As Int *Initialize* <#radiobutton_initialize> (EventName As String) *Invalidate* <#radiobutton_invalidate> *Invalidate2* <#radiobutton_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#radiobutton_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#radiobutton_isinitialized> As Boolean *Left* <#radiobutton_left> As Int *Padding* <#radiobutton_padding>() As Int *Parent* <#radiobutton_parent> As Object [read only] *RemoveView* <#radiobutton_removeview> *RequestFocus* <#radiobutton_requestfocus> As Boolean *SendToBack* <#radiobutton_sendtoback> *SetBackgroundImage* <#radiobutton_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#radiobutton_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#radiobutton_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#radiobutton_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetTextColorAnimated* <#radiobutton_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#radiobutton_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#radiobutton_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLine* <#radiobutton_singleline> As Boolean [write only] *Tag* <#radiobutton_tag> As Object *Text* <#radiobutton_text> As String *TextColor* <#radiobutton_textcolor> As Int *TextSize* <#radiobutton_textsize> As Float *Top* <#radiobutton_top> As Int *Typeface* <#radiobutton_typeface> As android.graphics.Typeface *Visible* <#radiobutton_visible> As Boolean *Width* <#radiobutton_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Checked As Boolean Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean Gravity As Int Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLine As Boolean [write only] Sets whether the text field should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Text As String TextColor As Int TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___ScrollView_ ScrollView is a view that contains other views and allows the user to vertically scroll those views. See the ScrollView tutorial for more information. The ScrollView has an inner panel which actually contains the child views. You can add views by calling: ScrollView1.Panel.AddView(...) Note that it is not possible to nest scrolling views. For example a multiline EditText cannot be located inside a ScrollView. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: ScrollChanged(Position As Int) Members: *Background* <#scrollview_background> As android.graphics.drawable.Drawable *BringToFront* <#scrollview_bringtofront> *Color* <#scrollview_color> As Int [write only] *Enabled* <#scrollview_enabled> As Boolean *FullScroll* <#scrollview_fullscroll> (Bottom As Boolean) *Height* <#scrollview_height> As Int *Initialize* <#scrollview_initialize> (Height As Int) *Initialize2* <#scrollview_initialize2> (Height As Int, EventName As String) *Invalidate* <#scrollview_invalidate> *Invalidate2* <#scrollview_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#scrollview_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#scrollview_isinitialized> As Boolean *Left* <#scrollview_left> As Int *Padding* <#scrollview_padding>() As Int *Panel* <#scrollview_panel> As Panel [read only] *Parent* <#scrollview_parent> As Object [read only] *RemoveView* <#scrollview_removeview> *RequestFocus* <#scrollview_requestfocus> As Boolean *ScrollPosition* <#scrollview_scrollposition> As Int *ScrollToNow* <#scrollview_scrolltonow> (Scroll As Int) *SendToBack* <#scrollview_sendtoback> *SetBackgroundImage* <#scrollview_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#scrollview_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#scrollview_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#scrollview_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#scrollview_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#scrollview_tag> As Object *Top* <#scrollview_top> As Int *Visible* <#scrollview_visible> As Boolean *Width* <#scrollview_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean FullScroll (Bottom As Boolean) Scrolls the scroll view to the top or bottom. Height As Int Gets or sets the view's height. Initialize (Height As Int) Initializes the ScrollView and sets its inner panel height to the given height. You can later change this height by calling ScrollView.Panel.Height. Dim ScrollView1 As ScrollView ScrollView1.Initialize(1000dip) Initialize2 (Height As Int, EventName As String) Similar to Initialize. Sets the Sub that will handle the ScrollChanged event. Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Panel As Panel [read only] Returns the panel which you can use to add views to. Example: ScrollView1.Panel.AddView(...) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. ScrollPosition As Int Gets or sets the scroll position. ScrollToNow (Scroll As Int) Immediately scrolls the ScrollView (with no animations). SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___SeekBar_ A view that allows the user to set a value by dragging a slider. Similar to WinForms TrackBar. The ValueChanged event is raised whenever the value is changed. The UserChanged parameter can be used to distinguish between changes done by the user and changes done programmatically. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: ValueChanged (Value As Int, UserChanged As Boolean) Members: *Background* <#seekbar_background> As android.graphics.drawable.Drawable *BringToFront* <#seekbar_bringtofront> *Color* <#seekbar_color> As Int [write only] *Enabled* <#seekbar_enabled> As Boolean *Height* <#seekbar_height> As Int *Initialize* <#seekbar_initialize> (EventName As String) *Invalidate* <#seekbar_invalidate> *Invalidate2* <#seekbar_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#seekbar_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#seekbar_isinitialized> As Boolean *Left* <#seekbar_left> As Int *Max* <#seekbar_max> As Int *Padding* <#seekbar_padding>() As Int *Parent* <#seekbar_parent> As Object [read only] *RemoveView* <#seekbar_removeview> *RequestFocus* <#seekbar_requestfocus> As Boolean *SendToBack* <#seekbar_sendtoback> *SetBackgroundImage* <#seekbar_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#seekbar_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#seekbar_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#seekbar_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#seekbar_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#seekbar_tag> As Object *Top* <#seekbar_top> As Int *Value* <#seekbar_value> As Int *Visible* <#seekbar_visible> As Boolean *Width* <#seekbar_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Max As Int Gets or sets the maximum allowed value. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Value As Int Gets or sets the current value. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___Spinner_ A folded list that opens when the user clicks on it and allows the user to choose an item. Similar to WinForms ComboBox. The ItemClick event is raised each time a user presses on an item (even if it is the already selected item). This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: ItemClick (Position As Int, Value As Object) Members: *Add* <#spinner_add> (Item As String) *AddAll* <#spinner_addall> (List As List) *Background* <#spinner_background> As android.graphics.drawable.Drawable *BringToFront* <#spinner_bringtofront> *Clear* <#spinner_clear> *Color* <#spinner_color> As Int [write only] *DropdownBackgroundColor* <#spinner_dropdownbackgroundcolor> As Int *DropdownTextColor* <#spinner_dropdowntextcolor> As Int *Enabled* <#spinner_enabled> As Boolean *GetItem* <#spinner_getitem> (Index As Int) As String *Height* <#spinner_height> As Int *IndexOf* <#spinner_indexof> (value As String) As Int *Initialize* <#spinner_initialize> (EventName As String) *Invalidate* <#spinner_invalidate> *Invalidate2* <#spinner_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#spinner_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#spinner_isinitialized> As Boolean *Left* <#spinner_left> As Int *Padding* <#spinner_padding>() As Int *Parent* <#spinner_parent> As Object [read only] *Prompt* <#spinner_prompt> As String *RemoveAt* <#spinner_removeat> (Index As Int) *RemoveView* <#spinner_removeview> *RequestFocus* <#spinner_requestfocus> As Boolean *SelectedIndex* <#spinner_selectedindex> As Int *SelectedItem* <#spinner_selecteditem> As String [read only] *SendToBack* <#spinner_sendtoback> *SetBackgroundImage* <#spinner_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#spinner_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#spinner_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#spinner_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#spinner_setvisibleanimated> (Duration As Int, Visible As Boolean) *Size* <#spinner_size> As Int [read only] *Tag* <#spinner_tag> As Object *TextColor* <#spinner_textcolor> As Int *TextSize* <#spinner_textsize> As Float *Top* <#spinner_top> As Int *Visible* <#spinner_visible> As Boolean *Width* <#spinner_width> As Int Members description: Add (Item As String) Adds an item. Example: Spinner1.Add("Sunday") AddAll (List As List) Adds multiple items. Example: Spinner1.AddAll(Array As String("Sunday", "Monday", ...)) Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Clear Clears all items. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. DropdownBackgroundColor As Int Gets or sets the dropdown items background color. The color should be set before adding items. Setting the color to transparent will make the spinner use the default background color. DropdownTextColor As Int Gets or sets the dropdown text color. The color should be set before adding items. Setting the color to transparent will make the spinner use the default text color. Enabled As Boolean GetItem (Index As Int) As String Returns the item at the specified index. Height As Int Gets or sets the view's height. IndexOf (value As String) As Int Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. Prompt As String Gets or sets the title that will be displayed when the spinner is opened. RemoveAt (Index As Int) Removes the item at the specified index. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SelectedIndex As Int Gets or sets the index of the selected item. Returns -1 if no item is selected. SelectedItem As String [read only] Returns the value of the selected item. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Size As Int [read only] Returns the number of items. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. TextColor As Int Gets or sets the text color. The color should be set before adding items. Setting the color to transparent will make the spinner use the default text color. TextSize As Float Gets or sets the text size. The size should be set before adding items. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___TabHost_ TabHost is a view that contains multiple tab pages. Each tab page contains other child views. See the TabHost tutorial for more information. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: TabChanged Click LongClick Members: *AddTab* <#tabhost_addtab> (Title As String, LayoutFile As String) *AddTab2* <#tabhost_addtab2> (Title As String, View As android.view.View) *AddTabWithIcon* <#tabhost_addtabwithicon> (Title As String, DefaultBitmap As android.graphics.Bitmap, SelectedBitmap As android.graphics.Bitmap, LayoutFile As String) *AddTabWithIcon2* <#tabhost_addtabwithicon2> (Title As String, DefaultBitmap As android.graphics.Bitmap, SelectedBitmap As android.graphics.Bitmap, View As android.view.View) *Background* <#tabhost_background> As android.graphics.drawable.Drawable *BringToFront* <#tabhost_bringtofront> *Color* <#tabhost_color> As Int [write only] *CurrentTab* <#tabhost_currenttab> As Int *Enabled* <#tabhost_enabled> As Boolean *Height* <#tabhost_height> As Int *Initialize* <#tabhost_initialize> (EventName As String) *Invalidate* <#tabhost_invalidate> *Invalidate2* <#tabhost_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#tabhost_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#tabhost_isinitialized> As Boolean *Left* <#tabhost_left> As Int *Padding* <#tabhost_padding>() As Int *Parent* <#tabhost_parent> As Object [read only] *RemoveView* <#tabhost_removeview> *RequestFocus* <#tabhost_requestfocus> As Boolean *SendToBack* <#tabhost_sendtoback> *SetBackgroundImage* <#tabhost_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#tabhost_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#tabhost_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#tabhost_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#tabhost_setvisibleanimated> (Duration As Int, Visible As Boolean) *TabCount* <#tabhost_tabcount> As Int [read only] *Tag* <#tabhost_tag> As Object *Top* <#tabhost_top> As Int *Visible* <#tabhost_visible> As Boolean *Width* <#tabhost_width> As Int Members description: AddTab (Title As String, LayoutFile As String) Adds a tab page. Title - The page title. LayoutFile - A layout file describing the page layout. Example: TabHost1.AddTab("Page 1", "page1.bal") AddTab2 (Title As String, View As android.view.View) Adds a tab page. Title - The page title. View - The page content. Usually the view should be a panel containing other views. AddTabWithIcon (Title As String, DefaultBitmap As android.graphics.Bitmap, SelectedBitmap As android.graphics.Bitmap, LayoutFile As String) Adds a tab page. The tab title includes an icon. Title - The page title. DefaultBitmap - The icon that will be drawn when the page is not selected. SelectedBitmap - The icon that will be drawn when the page is selected. LayoutFile - A layout file describing the page layout. Example: Dim bmp1, bmp2 As Bitmap bmp1 = LoadBitmap(File.DirAssets, "ic.png") bmp2 = LoadBitmap(File.DirAssets, "ic_selected.png") TabHost1.AddTabWithIcon("Page 1", bmp1, bmp2,"tabpage1.bal") AddTabWithIcon2 (Title As String, DefaultBitmap As android.graphics.Bitmap, SelectedBitmap As android.graphics.Bitmap, View As android.view.View) Adds a tab page. The tab title includes an icon. Title - The page title. DefaultBitmap - The icon that will be drawn when the page is not selected. SelectedBitmap - The icon that will be drawn when the page is selected. View - The page content. Usually the view should be a panel containing other views. Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. CurrentTab As Int Gets or sets the current tab. Example: TabHost1.CurrentTab = (TabHost1.CurrentTab + 1) Mod TabHost1.TabCount 'switch to the next tab. Enabled As Boolean Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. TabCount As Int [read only] Returns the number of tab pages. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___ToggleButton_ A ToggleButton view. This view which is similar to a button has two modes: ON and OFF. When the user presses on it, it will change its mode. You can set the text with the TextOn and TextOff properties. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: CheckedChange(Checked As Boolean) Members: *Background* <#togglebutton_background> As android.graphics.drawable.Drawable *BringToFront* <#togglebutton_bringtofront> *Checked* <#togglebutton_checked> As Boolean *Color* <#togglebutton_color> As Int [write only] *Ellipsize* <#togglebutton_ellipsize> As String *Enabled* <#togglebutton_enabled> As Boolean *Gravity* <#togglebutton_gravity> As Int *Height* <#togglebutton_height> As Int *Initialize* <#togglebutton_initialize> (EventName As String) *Invalidate* <#togglebutton_invalidate> *Invalidate2* <#togglebutton_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#togglebutton_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#togglebutton_isinitialized> As Boolean *Left* <#togglebutton_left> As Int *Padding* <#togglebutton_padding>() As Int *Parent* <#togglebutton_parent> As Object [read only] *RemoveView* <#togglebutton_removeview> *RequestFocus* <#togglebutton_requestfocus> As Boolean *SendToBack* <#togglebutton_sendtoback> *SetBackgroundImage* <#togglebutton_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#togglebutton_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#togglebutton_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#togglebutton_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetTextColorAnimated* <#togglebutton_settextcoloranimated> (Duration As Int, ToColor As Int) *SetTextSizeAnimated* <#togglebutton_settextsizeanimated> (Duration As Int, TextSize As Float) *SetVisibleAnimated* <#togglebutton_setvisibleanimated> (Duration As Int, Visible As Boolean) *SingleLine* <#togglebutton_singleline> As Boolean [write only] *Tag* <#togglebutton_tag> As Object *TextColor* <#togglebutton_textcolor> As Int *TextOff* <#togglebutton_textoff> As String *TextOn* <#togglebutton_texton> As String *TextSize* <#togglebutton_textsize> As Float *Top* <#togglebutton_top> As Int *Typeface* <#togglebutton_typeface> As android.graphics.Typeface *Visible* <#togglebutton_visible> As Boolean *Width* <#togglebutton_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Checked As Boolean Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Ellipsize As String Gets or sets the truncation mode. Only affects single line fields. Possible values: NONE START - The three dots appear at the beginning. MIDDLE - The three dots appear at the middle. END - The three dots appear at the end. Enabled As Boolean Gravity As Int Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextColorAnimated (Duration As Int, ToColor As Int) Changes the text color with a transition animation between the current color and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetTextSizeAnimated (Duration As Int, TextSize As Float) Changes the text size with an animation effect. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. SingleLine As Boolean [write only] Sets whether the text field should be in single line mode or multiline mode. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. TextColor As Int TextOff As String Gets or sets the text that will appear in the OFF mode. TextOn As String Gets or sets the text that will appear in the ON mode. TextSize As Float Get or sets the view's text size. Top As Int Gets or sets the view's top position. Typeface As android.graphics.Typeface Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___View_ View is a special type of object. You cannot create new View objects. However all other view types can be assigned to a view variable. This allows you to access the shared properties of all views. For example this code hides all views of an activity: For i = 0 To Activity.NumberOfViews - 1 Dim v As View v = Activity.GetView(i) v.Visible = False Next This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Events: Click LongClick Members: *Background* <#view_background> As android.graphics.drawable.Drawable *BringToFront* <#view_bringtofront> *Color* <#view_color> As Int [write only] *Enabled* <#view_enabled> As Boolean *Height* <#view_height> As Int *Invalidate* <#view_invalidate> *Invalidate2* <#view_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#view_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#view_isinitialized> As Boolean *Left* <#view_left> As Int *Padding* <#view_padding>() As Int *Parent* <#view_parent> As Object [read only] *RemoveView* <#view_removeview> *RequestFocus* <#view_requestfocus> As Boolean *SendToBack* <#view_sendtoback> *SetBackgroundImage* <#view_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#view_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#view_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#view_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#view_setvisibleanimated> (Duration As Int, Visible As Boolean) *Tag* <#view_tag> As Object *Top* <#view_top> As Int *Visible* <#view_visible> As Boolean *Width* <#view_width> As Int Members description: Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean Height As Int Gets or sets the view's height. Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean Left As Int Gets or sets the view's left position. Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Visible As Boolean Width As Int Gets or sets the view's width. ------------------------------------------------------------------------ ___WebView_ The WebView view uses the internal WebKit engine to display Html pages. The page displayed can be an online page loaded with LoadUrl or a Html string loaded with LoadHtml. The PageFinished event is raised after the page loads. OverrideUrl is called before loading any Url. If this method returns True then the Url will not be loaded. You can use this event as a way to handle click events in your code. UserAndPasswordRequired event is raised when accessing a site that requires basic authentication. You should return an array of strings with the username as the first element and password as the second element. For example:Return Array As String("someuser", "password123") Returning Null will cancel the request. Sending incorrect credentials will cause this event to be raised again. This is an 'Activity Object', it cannot be declared under Sub Process_Globals. Permissions: android.permission.INTERNET Events: PageFinished (Url As String) OverrideUrl (Url As String) As Boolean UserAndPasswordRequired (Host As String, Realm As String) As String() Members: *Back* <#webview_back> *Background* <#webview_background> As android.graphics.drawable.Drawable *BringToFront* <#webview_bringtofront> *CaptureBitmap* <#webview_capturebitmap> As Bitmap *Color* <#webview_color> As Int [write only] *Enabled* <#webview_enabled> As Boolean *Forward* <#webview_forward> *Height* <#webview_height> As Int *Initialize* <#webview_initialize> (EventName As String) *Invalidate* <#webview_invalidate> *Invalidate2* <#webview_invalidate2> (Rect As android.graphics.Rect) *Invalidate3* <#webview_invalidate3> (Left As Int, Top As Int, Right As Int, Bottom As Int) *IsInitialized* <#webview_isinitialized> As Boolean *JavaScriptEnabled* <#webview_javascriptenabled> As Boolean *Left* <#webview_left> As Int *LoadHtml* <#webview_loadhtml> (Html As String) *LoadUrl* <#webview_loadurl> (Url As String) *Padding* <#webview_padding>() As Int *Parent* <#webview_parent> As Object [read only] *RemoveView* <#webview_removeview> *RequestFocus* <#webview_requestfocus> As Boolean *SendToBack* <#webview_sendtoback> *SetBackgroundImage* <#webview_setbackgroundimage> (Bitmap As android.graphics.Bitmap) As BitmapDrawable *SetColorAnimated* <#webview_setcoloranimated> (Duration As Int, FromColor As Int, ToColor As Int) *SetLayout* <#webview_setlayout> (Left As Int, Top As Int, Width As Int, Height As Int) *SetLayoutAnimated* <#webview_setlayoutanimated> (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) *SetVisibleAnimated* <#webview_setvisibleanimated> (Duration As Int, Visible As Boolean) *StopLoading* <#webview_stoploading> *Tag* <#webview_tag> As Object *Top* <#webview_top> As Int *Url* <#webview_url> As String [read only] *Visible* <#webview_visible> As Boolean *Width* <#webview_width> As Int *Zoom* <#webview_zoom> (In As Boolean) As Boolean *ZoomEnabled* <#webview_zoomenabled> As Boolean Members description: Back Goes back to the previous Url. Background As android.graphics.drawable.Drawable Gets or sets the background drawable. BringToFront Changes the Z order of this view and brings it to the front. CaptureBitmap As Bitmap Returns the complete html page as a bitmap. Color As Int [write only] Sets the background of the view to be a ColorDrawable with the given color. If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept. Enabled As Boolean Forward Goes forward to the next Url. Height As Int Gets or sets the view's height. Initialize (EventName As String) Initializes the view and sets the subs that will handle the events. *Views added with the designer should NOT be initialized. These views are initialized when the layout is loaded.* Invalidate Invalidates the whole view forcing the view to redraw itself. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate2 (Rect As android.graphics.Rect) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int) Invalidates the given rectangle. Redrawing will only happen when the program can process messages. Usually when it finishes running the current code. IsInitialized As Boolean JavaScriptEnabled As Boolean Gets or sets whether JavaScript is enabled. JavaScript is enabled by default. Left As Int Gets or sets the view's left position. LoadHtml (Html As String) Loads the given Html. Example: WebView1.LoadHtml("Hello world!") You can use "file:///android_asset" to access files added with the file manager: WebView1.LoadHtml("") Note that files added with the file manager should be accessed with a lower cased name. LoadUrl (Url As String) Loads the given Url. Example: WebView1.LoadUrl("http://www.google.com") Padding() As Int Gets or sets the view's padding (distance between border and content). The data is stored in a 4 element array with the following values: left, top, right and bottom. Make sure to use 'dip' units when setting the padding. Example: Button1.Padding = Array As Int (30dip, 10dip, 10dip, 10dip) Parent As Object [read only] Returns the view's parent. In most cases the returned value can be casted to a Panel. Returns Null if there is no parent. RemoveView Removes this view from its parent. RequestFocus As Boolean Tries to set the focus to this view. Returns True if the focus was set. SendToBack Changes the Z order of this view and sends it to the back. SetBackgroundImage (Bitmap As android.graphics.Bitmap) As BitmapDrawable Creates a BitmapDrawable with the given Bitmap and sets it as the view's background. The Gravity is set to FILL. The BitmapDrawable is returned. You can use it to change the Gravity. SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int) Changes the background color with a transition animation between the FromColor and the ToColor colors. The transition is based on the HSV color space. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetLayout (Left As Int, Top As Int, Width As Int, Height As Int) Changes the view position and size. SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int) Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. SetVisibleAnimated (Duration As Int, Visible As Boolean) Changes the view visibility with a fade-in or fade-out animation. You must Note that the animation will only be applied when running on Android 3+ devices. Duration - Animation duration measured in milliseconds. Visible - New visibility state. StopLoading Stops the current load. Tag As Object Gets or sets the Tag value. This is a place holder which can used to store additional data. Top As Int Gets or sets the view's top position. Url As String [read only] Returns the current Url. Visible As Boolean Width As Int Gets or sets the view's width. Zoom (In As Boolean) As Boolean Zooms in or out according to the value of In. Returns true if zoom has changed. ZoomEnabled As Boolean Gets or sets whether the internal zoom feature is enabled. The zoom feature is enabled by default. ------------------------------------------------------------------------ Top <#top>