Slider - Customize Slider Colors: Right, Left & Thumb

Slider
Customize Slider Colors: Right, Left & Thumb.
Events that fire when the thumb is released,
when it reaches the maximum value,
and when it reaches the minimum value.

GIF_20250209_014119_920


Values ​​can be decimal or integer.
The gif shows the default values, which are 0 to 100 in increments of 1.


InitializeSeekBar


SetSliderRange

blocks (89)

Sets the range and increment of the Slider.

  • Values ​​can be with decimal or integer.

GetCurrentSliderValue


GetMinValue

blocks (96)


GetMaxValue

blocks (97)


SetSliderLeftColor


SetSliderRightColor


SetSliderThumbColor


SetSliderThumbPosition

Sets the position of the thumb.


SliderValueChanged

component_event (5)


SliderStopTracking

component_event (4)

Event triggered when the slider stops being tracked.


SliderMaxValueSet

component_event (2)

Event triggered when the maximum value of the slider is set.


SliderMinValueSet

component_event (3)

Event triggered when the minimum value of the slider is set.


Update:

  • Removed 2 functions that were not needed:
    SetStartValueLabel and SetCurrentValueLabel

  • Centered the Slider, since not using the 2 functions I mentioned, the slider was at the top.
    Changed the default value when not using the SetSliderRange function:

    • min: 0
      max: 100
      increment: 1
These changes thanks to Tim for his suggestions.

Note:

I have changed the extension created in Niotron to Fast, now it is updated with the SDK and in Java 11.


minSdk: 21
maxSdk: 34
JDK: 11

Created with Fast. v2.3.0
fast-cli


aia project:
Slider.aia (14.2 KB)

Extension: Version 1.0.1.
joejsanz.joedevslider.aix (11.7 KB)


Thanks.

6 Likes

Nice extension, but only integer values ​​can be used as minValue and maxValue. And unlike the Slider component, there is apparently no fixed number of values ​​(100) distributed over an interval.

1 Like

this one with wrong block photo.

1 Like

It's true, I hadn't looked at that, thanks Anke.

The block is resolved, thanks KevinKun.

Nice extension, but at certain values ​​this slider shakes and the displayed value changes continuously.

Yes, thank you very much for the observation, I am making some corrections, I hope to update the extension in a few hours.

Updated extension

Several blocks have changed, now it is simpler but useful, since there are several functions and events that the slider integrated in ai2 does not have.

2 Likes

Can you provide the source code? What IDE did you use to create this extension?

I did it in niotron

hi can i have link of Tformet. i tried to find it everywhere...

TFormat. Search...

Just as Anke said, it is the first thing that appears when searching for TFormat

1 Like

thank you i have use this in my app :+1:

1 Like

Update:
Version 1.0.1.

1 Like