Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
flutterui:slider_button [2023/02/02 10:21] admin |
flutterui:slider_button [2023/02/02 13:48] (current) admin |
||
---|---|---|---|
Line 4: | Line 4: | ||
A standard button performs an action on click/press. Sometimes it's nice to use a standard button as "confirmation button". In this case it's better to use a slider button. Our standard implementation offers such styling variant: | A standard button performs an action on click/press. Sometimes it's nice to use a standard button as "confirmation button". In this case it's better to use a slider button. Our standard implementation offers such styling variant: | ||
- | Simply use | + | Simply set: |
<file java> | <file java> | ||
Line 13: | Line 13: | ||
{{:flutterui:sliderbutton.png?nolink&400|}} | {{:flutterui:sliderbutton.png?nolink&400|}} | ||
+ | |||
+ | If you slide to the right, the slider will show a check image and it's not possible to use it again: | ||
+ | |||
+ | {{:flutterui:sliderbutton_done.png?nolink&400|}} | ||
+ | |||
+ | If you want to use it multiple times, simple set: | ||
+ | |||
+ | <file java> | ||
+ | Style.addStyleNames(button, "f_slide_reset"); | ||
+ | </file> | ||
+ | |||
+ | In this case, double press will reset the slider and it will be possible to use it again. | ||
+ | |||
+ | In special cases it's useful to reset the button automatically. To do this, just set: | ||
+ | |||
+ | <file java> | ||
+ | Style.addStyleNames(button, "f_slide_auto_reset"); | ||
+ | </file> | ||
+ |