Android Question Increase or decrease a value

Giusy

Active Member
Licensed User
Hi,
There is in B4a a control that performs an increment or a decrease of a value, or must be created (see attached file)
Thanks
 

Attachments

emexes

Expert
Licensed User
Do you actually need the number? If you're using it to set speech parameters, those slidey SeekBar things are probably simpler:

Screenshot_20190401-224449[1].png
 

emexes

Expert
Licensed User
Yes, I know him, but I hate him.
Fair enough. Depends on the use-case, I agree.

Depending on how many options you've got: how about a Spinner?
B4X:
Dim Spinner1 As Spinner

For I = 1 to 25
    Spinner1.Add(I)
Next
Spinner1.SelectedIndex = 12    'default to middle

'or perhaps like I have in the TTS test program
'LanguageSpinner.AddAll(Array As String("en", "fr", "de", "it", "ru"))
I have some electronic-equipment lookalike knobs and gauges and spirit-level things that I keep meaning to convert to a library or custom views, but... is always left for tomorrow :-/
 
Top