I took the original B4XSeekBar code from @Erel and modified it to create a new view.
I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of time. If you want to support me, then you can do it here by Paypal or with a coffee.
ASStepSeekBar
Author: Alexander Stolte
Version: 1.00
I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of time. If you want to support me, then you can do it here by Paypal or with a coffee.
Add steps example:
For i = 0 To 4 -1
ASStepSeekBar1.AddStep(xui.Color_White,"Item " & (i))
ASStepSeekBar2.AddStep(xui.Color_White,"Item " & (i))
Next
Author: Alexander Stolte
Version: 1.00
- ASStepSeekBar
- Events:
- TouchStateChanged (Pressed As Boolean)
- ValueChanged (Index As Int, Value As Object)
- Fields:
- Interval As Int
- mBase As B4XView
- Radius1 As Int
- Radius2 As Int
- ReachedLineColor As Int
- ReachedLineSize As Int
- Tag As Object
- ThumbColor As Int
- UnreachedLineColor As Int
- UnreachedLineSize As Int
- Functions:
- AddStep (Color As Int, Value As Object) As String
- Class_Globals As String
- CreateASStepSeekBar_Step (Value As Object, Color As Int) As ASStepSeekBar_Step
- DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
Base type must be Object - getSize As Int
Gets the count of steps - GetStepValue (Index As Int) As Object
Get a value from a step - Initialize (Callback As Object, EventName As String) As String
- IsInitialized As Boolean
Tests whether the object has been initialized. - setStepIndex (Index As Int) As String
- Update As String
Redraws the control
- Properties:
- StepIndex
- Events:
- ASStepSeekBar_Step
- Fields:
- Color As Int
- IsInitialized As Boolean
Tests whether the object has been initialized. - Value As Object
- Functions:
- Initialize
Initializes the fields to their default value.
- Initialize
- Fields:
- 1.00
- Release
- 1.01
- minor adjustments
- Base_Resize is public now
- 1.02
- Add get StepIndex
- 1.03
- Add Clear - Clear all steps
- Hitbox improved - you can now simply tap on the line and the item that is closer to it will be selected
- 1.04
- BugFix
- 1.05
- BugFixes on the vertical seekbar
- Add AddStep2 with ReachedColor and UnreachedColor parameter
Attachments
Last edited: