Slider change max value

Trying to modify a slider max value , thumb position changes.


Set slider max value to slider max value +1



Please notice that thumb value do not change here (1), and there is no link with the circular progress shown here.
Is it the same for you all?

Hello Smou

Do you mean you are changing the slider maximum value at runtime? That's unusual - why do you need to?

Probably the component developer was only expecting the Thumb position to be changed at runtime. The work-around in your case is to move the Thumb to suit the ratio of the new slider maximum.

Using flash cards, total of them depends on your answers, each time i answer bad a word, number of cards to play increase (leitner shuffle system).

...but where does a slider fit in that mix?

Slider is the total restant cards to match.

10 cards, 3 in first list, 3 in second list, 4 in last list.

If you answer well, word will move to the last list, if you answer bad it goes to next list.

If all the answers are true, it means 16 found cards to the end game, but if you miss the 3 first words of the first list: 19.

So when a word quit from the first list to the last, i increase slider max. A nearly leitner method

.... it's your App, your GUI - but that is an unusual use of the slider, given that it does not display values so you still have to use a label for that. The App Inventor slider is for the input of values rather than the output. Still, you do understand that if you change the max value you have to also change the thumb position to match the new value range.

What is the issue with Fill Parent?

Finally there were no issue with fill parent.

So i refresh the value, of course, and thumber will goes to 19 little to little, value by value, but first it position with no coherence. If thumber value is one, how can it be at the middle of the slider?

Well, you have introduced an unexpected change to the Slider Range - anything could happen. When you change the range, change the thumb position.

But as you say, this is an unusual use of a slider.

It is - certainly not the intended use - which is why I asked if it should be there. It's always a good thing to keep your App and App Code as simple as possible.

Something like this might "maintain" the slider thumb value as you increase the max value:


Thanks, thats exactly what i've done, but it was the same. So i finally used a canevas-made loading bar.