A modified TextField that shows the hint text as a small floating label. This implementation is based on JVFloatLabeledTextField open source project: https://github.com/jverdi/JVFloatLabeledTextField
Events:
TextChanged (OldText As String, NewText As String) EnterPressed BeginEdit EndEdit Click LongClick
Gets or sets the hint that appears when no text is set.
Initialize (EventNameAsString)
IsFocusedAsBoolean [read only]
Returns true if the view is focused.
IsInitializedAsBoolean
Tests whether this object was initialized.
KeyboardAppearanceAsInt
Gets or sets the keyboard appearance (one of the APPEARANCE constants).
KeyboardTypeAsInt
Gets or sets the keyboard type (one of the TYPE constants).
LeftAsFloat
Gets or sets the view's left position.
ParentAsViewWrapper [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
PasswordModeAsBoolean
Set to true to change the text field to password mode.
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocusAsBoolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable. When a text view is focused the keyboard is shown.
ResignFocusAsBoolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
RETURN_DEFAULTAsInt [read only]
RETURN_DONEAsInt [read only]
RETURN_GOAsInt [read only]
RETURN_NEXTAsInt [read only]
RETURN_SEARCHAsInt [read only]
RETURN_SENDAsInt [read only]
ReturnKeyAsInt
Gets or sets the return key (one of the RETURN constants).
SelectAll
Selects all text.
SelectionLengthAsInt
Returns the text selection length. Use SetSelection method if you want to set the selection.
SelectionStartAsInt
Gets or sets the selection start position.
SendToBack
Sends the view to the back.
SetAlphaAnimated (DurationMSAsInt, AlphaAsFloat)
Animates the view's alpha level. DurationMS - Animation duration measured in milliseconds. Alpha - The new alpha level (0 - transparent, 1 - fully opaque).
Animates the view's background color. DurationMS - Animation duration measured in milliseconds. BackgroundColor - The new background color. Note that Labels do not support this type of animation.
Animates the view's layout. DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately. DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1. Set to 1 for no spring effect. Left, Top, Width and Height - The new layout.
Adds a parallax effect to the view. The view will slightly move when the device is tilted. Vertical - Vertical offset. Can be a positive or negative value. Horizontal - Horizontal offset. Can be a positive or negative value.
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows. Colors - The shadow color. OffsetX, OffsetY - The horizontal and vertical offsets. Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque. StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
ShowClearButtonAsBoolean
Gets or sets whether the clear button is visible when the field is focused.
SizeToFit
Resizes the view to make it fit its content.
SPELLCHECK_DEFAULTAsInt [read only]
SPELLCHECK_NOAsInt [read only]
SPELLCHECK_YESAsInt [read only]
STYLE_BEZELAsInt [read only]
STYLE_LINEAsInt [read only]
STYLE_NONEAsInt [read only]
STYLE_ROUNDEDRECTAsInt [read only]
TagAsObject
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TextAsString
Gets or sets the text.
TextAlignmentAsInt
Gets or sets the text alignment (one of the ALIGNMENT constants).
TextColorAsInt
Gets or sets the text color.
TintColorAsInt
Gets or sets the view's tint color. Some views use this color to change their appearance.
TopAsFloat
Gets or sets the view's top position.
TYPE_ASCII_CAPABLEAsInt [read only]
TYPE_DECIMAL_PADAsInt [read only]
TYPE_DEFAULTAsInt [read only]
TYPE_EMAIL_ADDRESSAsInt [read only]
TYPE_NAME_PHONE_PADAsInt [read only]
TYPE_NUMBER_PADAsInt [read only]
TYPE_NUMBERS_AND_PUNCTUATIONSAsInt [read only]
TYPE_PHONE_PADAsInt [read only]
TYPE_URLAsInt [read only]
TYPE_WEB_SEARCHAsInt [read only]
UserInteractionEnabledAsBoolean
Gets or sets whether the user can interact with this view. True by default.
Shows a check mark. This symbol does not track touch events.
ACCESSORY_DETAIL_BUTTONAsInt [read only]
Shows an info button. This symbol does track touch events.
ACCESSORY_DISCLOSURE_BUTTONAsInt [read only]
Shows a chevron image with an info button. This symbol does track touch events.
ACCESSORY_INDICATORAsInt [read only]
Shows a chevron symbol (arrow). This accessory symbol does not track touch events.
ACCESSORY_NONEAsInt [read only]
No accessory view.
AccessoryTypeAsInt
Gets or sets the accessory symbol that shows at the right side of the cell.
AddActionButton (TextAsString, ColorAsInt)
Adds an action button. The button will be displayed when the user swipes the item. The TableView_ActionButtonClicked event will be raised when the button is clicked.
BitmapAsBitmap
Gets or sets the item bitmap.
ClearActionButtons
Removes the action buttons from the button.
CustomViewAsPanelWrapper
The Panel together with its child views will be added to the cell. Usually you will also need to set the table RowHeight and set the Panel's width and height.
DetailTextAsAttributedString
Gets or sets the second line attributed string.
IndentationLevelAsInt
Gets or sets the indentation level. Default value is 0.
IndentationWidthAsFloat
Gets or sets the indentation width. Default value is 10 pixels (points).
InitializeSingleLine (TextAsString)
Initializes a single line item with the given text.
TableView shows a list of items (cells). The TableView is divided into one or more sections. TableView reuses the cells views and only updates the content. TableView can show very large lists. TableView2 which adds support for action buttons, requires iOS 8+.
Events:
SelectedChanged (SectionIndex As Int, Cell As TableCell) AccessoryButtonClicked (SectionIndex As Int, Cell As TableCell) ActionButtonClicked (SectionIndex As Int, Cell As TableCell, Text As String) Click LongClick
Adds a two lines item to the TableView. This method returns a TableCell object which you can further modify.
AlphaAsFloat
Gets or sets the view's alpha level. 0 - transparent, 1 (default) - fully opaque.
BaseViewAsViewWrapper [read only]
When the TableView is added as a custom view (from the designer) it is added to a base panel. This property will return the base panel. You can use this property to move the TableView. Note that if the view was added by code then this property will return the TableView itself.
BeginUpdates
Call this method before you call InsertCells or RemoveCells. You must call EndUpdates at the end.
Ends an updates block that was previously started with BeginUpdates.
GetItems (SectionIndexAsInt) AsList
Returns a List with the TableCells in the specified index. Modifying this list will affect the items in this section. You should call TableView.ReloadSection if you have added or removed items.
HeightAsFloat
Gets or sets the view's height.
Initialize (EventNameAsString, GroupedAsBoolean)
Initializes the TableView. EventName - Set the subs that will handle the events. Grouped - Whether to use the grouped style or the plain style. The plain style uses floating headers.
This method should only be called after BeginUpdates was called. Inserts one or more cells in the list. You do not need to call ReloadSection to apply the changes. SectionIndex - The section index. RowIndex - The first item will be added at this index. Cells - A list with TableCells.
IsFocusedAsBoolean [read only]
Returns true if the view is focused.
IsInitializedAsBoolean
Tests whether this object was initialized.
LeftAsFloat
Gets or sets the view's left position.
NumberOfSectionsAsInt [read only]
Returns the number of sections added to the TableView.
ParentAsViewWrapper [read only]
Returns the views parent. The returned view can be uninitialized (if there is no parent).
ReloadAll
Reloads all the TableCell data.
ReloadSection (SectionIndexAsInt)
Reloads the data of a specific section. You should call this method if you have added or removed items from this section.
This method should only be called after BeginUpdates was called. Removes one or more cells from list. You do not need to call ReloadSection to apply the changes. SectionIndex - The section index. StartRowIndex - Index of the first item that will be removed. Count - Number of items to remove.
RemoveViewFromParent
Removes the view from its parent (same as B4A View.RemoveView method).
RequestFocusAsBoolean
Tries to set the focus on the current view. Returns True if the focus was set. Most views are not focusable. When a text view is focused the keyboard is shown.
ResignFocusAsBoolean
Removes the focus from the current view. Removing the focus from a text view will hide the keyboard.
Animates the view's background color. DurationMS - Animation duration measured in milliseconds. BackgroundColor - The new background color. Note that Labels do not support this type of animation.
Animates the view's layout. DurationMS - Animation duration measured in milliseconds. Set to 0 to change the layout immediately. DampingRatio - If smaller than 1 then a spring effect will be applied to the animation. The minimum value should be 0.1. Set to 1 for no spring effect. Left, Top, Width and Height - The new layout.
Adds a parallax effect to the view. The view will slightly move when the device is tilted. Vertical - Vertical offset. Can be a positive or negative value. Horizontal - Horizontal offset. Can be a positive or negative value.
SetSelection (SectionIndexAsInt, RowIndexAsInt)
Sets the selected item and scrolls to this item. SectionIndex - The item section index (o if there is only a single section). RowIndex - The index of the item in the section. Pass -1 to deselect the current selected item.
Adds a shadow to to the view. The border corners radius should be set to 0 when adding shadows. Colors - The shadow color. OffsetX, OffsetY - The horizontal and vertical offsets. Opacity - Sets the shadow opacity: 0 - transparent, 1 - opaque. StaticRect - (optimization parameter) Set this parameter to True if the view's size is constant.
SizeToFit
Resizes the view to make it fit its content.
TagAsObject
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
TintColorAsInt
Gets or sets the view's tint color. Some views use this color to change their appearance.
TopAsFloat
Gets or sets the view's top position.
UserInteractionEnabledAsBoolean
Gets or sets whether the user can interact with this view. True by default.
Improved version of WebView. It is based on the native WKWebView instead of UIWebView. This is a custom view. It should be added from the designer. OverrideUrl event allows you to cancel requests. Return True to cancel (override) the request.
Events:
PageFinished (Success As Boolean, Url As String) OverrideUrl (Url As String) As Boolean JSComplete (Success As Boolean, Tag As Object, Result As String)
Returns the estimated loading progress. The returned value is between 0 to 1.
EvaluateJavaScript (TagAsObject, ScriptAsString)
Asynchronously evaluates the JavaScript. The JSComplete event will be raised. Tag - An object that will be included in the event. Script - The JavaScript to evaluate.
GoBack
Navigates to the previous page.
GoForward
Navigates to the next page in the stack of pages.
IsInitializedAsBoolean
Tests whether this object was initialized.
LoadHtml (HtmlAsString)
Loads the given html code. The path is relative to the assets folder.
LoadUrl (UrlAsString)
Loads a url. Note that you cannot use this method to load files from the Assets folder. Example: WebView1.LoadUrl("http://www.google.com")
Reload
Clear caches and reloads the current page.
StopLoading
Stops loading the current page.
TagAsObject
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.