I took the original RoundSlider code from @Erel and modified it to create a new view.
Still, it was a very big challenge, since I've never done anything with circles before.
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee.
ASRoundSlider
Author: Alexander Stolte
Version: 1.00
Still, it was a very big challenge, since I've never done anything with circles before.
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee.
ASRoundSlider
Author: Alexander Stolte
Version: 1.00
- ASRoundSlider
- Events:
- ValueChanged (Value As Int)
- Fields:
- mBase As B4XView
- Tag As Object
- Functions:
- Class_Globals As String
- DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
Base type must be Object - Draw As String
Draws the view new - FontToBitmap (text As String, IsMaterialIcons As Boolean, FontSize As Float, color As Int) As B4XBitmap
FontAwesome To Bitmap
Unlike an older "TextToBitmap" sub that you can find in the forum, this code vertically centers the icon. It can also be used in B4J and B4i (only need to change the font line). Sub Activity_Create(FirstTime As Boolean) 'usage example Activity.AddMenuItem3("Android", "Test"...www.b4x.com - getInnerCircleColor As Int
Gets or sets the Inner Circle Color - getReachedColor As Int
Gets or sets the Reached Color - getStrokeWidth As Int
Gets or sets the Stroke Width - getThumbBorderColor As Int
Gets or sets the Thumb Border Color - getThumbIcon As B4XBitmap
Gets or sets the Thumb Icon - getThumbInnerColor As Int
Gets or sets the Thumb Inner Color - getThumbView As B4XView
- getUnreachedColor As Int
Gets or sets the Unreached Color - getValue As Int
- Initialize (Callback As Object, EventName As String) As String
- IsInitialized As Boolean
Tests whether the object has been initialized. - setInnerCircleColor (Color As Int) As String
- setReachedColor (Color As Int) As String
- setStrokeWidth (Width As Int) As String
- setThumbBorderColor (Color As Int) As String
- setThumbIcon (Icon As B4XBitmap) As String
- setThumbInnerColor (Color As Int) As String
- setUnreachedColor (Color As Int) As String
- setValue (v As Int) As String
Gets or sets the value
- Properties:
- InnerCircleColor As Int
Gets or sets the Inner Circle Color - ReachedColor As Int
Gets or sets the Reached Color - StrokeWidth As Int
Gets or sets the Stroke Width - ThumbBorderColor As Int
Gets or sets the Thumb Border Color - ThumbIcon As B4XBitmap
Gets or sets the Thumb Icon - ThumbInnerColor As Int
Gets or sets the Thumb Inner Color - ThumbView As B4XView [read only]
- UnreachedColor As Int
Gets or sets the Unreached Color - Value As Int
Gets or sets the value
- InnerCircleColor As Int
- Events:
- 1.00
- Release
- 1.01
- Add get and set MinValue
- Add get and set MaxValue
- Add Icon Gap
Attachments
Last edited: