This library was made based on UISegmentedControl for IOS
Installation instructions:
- Copy the .xml and .jar files to your custom libraries folder
- Select in your REFERENCED LIBRARIES
Version history:
V1.0 (Not published):
- Initial version
V1.1 (Not published):
- Bugs Corrections and add some features, like size of fonts, shadow (on/off), color of split, size of split, etc
V1.2 (First public release)
UISegmented
Author: Alberto Iglesias
Version: 1.2
- UISegmented
Fields:- _shadow As Boolean
- _splitcolor As Int
- _splitwidth As Int
- IsInitialized As Boolean
Tests whether the object has been initialized. - _addbutton (pID As String, pText As String, pColor As Int, pSize As Int) As String
Add a button like Segment.
pID = Identifier to your Segment Button
pText = Text to your Segment Button
pColor = Color of the Text
pSize = Size of the Text
Examples:
objUI1.addButton("y","num 2",Colors.Red,18)
objUI2.addButton("4","4",Colors.White,18)
objUI3.addButton("5","E",Colors.Black,14) - _asview As PanelWrapper
Return Panel Object from UISegment - _author As String
Return the author of this library - _build (Width As Int, height As Int) As String
Need build "AFTER" put all of segment buttons and Split to calculate sizes
Example: objUI3.Build(250dip,50dip) - _getpressed As String
Return the Pressed Segment - _initialize (vCallback As Object, ev As String, colorA As Int, colorB As Int) As String
Initializes the object. You can add parameters to this method if needed.
Examples:
Dim objUI1 As UISegmented
objUI1.Initialize(Me,"objUI2",Colors.ARGB(255,196,83,82),Colors.ARGB(255,216,29,8))
Dim objUI3 As UISegmented
objUI3.Initialize(Me,"objUI3",Colors.White,Colors.White) - _setpressedbytag (pTag As String) As String
Force to pressed a segment button, identifing by TAG value - _setpressedbytext (pText As String) As String
Force to pressed a segment button, identifing by TEXT value - _unpressall As String
Unpress all of segment buttons - _version As String
Return the version of this library
* Add a flag to invert colors when the button is push or not
V1.3 (First public release)
New flag added..... InvertedColors = True/False
2 UISegmented Samples with InvertedColors True and False:
With InvertedColors = TRUE
With InvertedColors = FALSE (DEFAULT)
Attachments
Last edited: