Slider auto return to center.

855 views
Skip to first unread message

JustinH

unread,
Jan 26, 2018, 11:26:10 PM1/26/18
to MIT App Inventor Forum
Is possible make the slider auto return to center?

When your finger left the slider, it auto returns to center position.

Juan Antonio

unread,
Jan 27, 2018, 11:36:47 AM1/27/18
to mitappinv...@googlegroups.com
Hello JustinH, AI2 does not currently have that possibility with the Slider component, however it is a good proposal to be added in future versions.
You can request it at:

You can use this extension, to create components, the Slider has the possibility of returning to an established place.

com.KIO4_CreateView.aix
p194_crear_slider_verticalcentro.aia

Chris Ward

unread,
Jan 27, 2018, 1:29:41 PM1/27/18
to MIT App Inventor Forum
Hi JustinH

You can make a slider do that, with a short timer.




SliderAutoReturn.aia

JustinH

unread,
Jan 27, 2018, 10:45:24 PM1/27/18
to MIT App Inventor Forum
Thank you. Good solution.

I added "set TextBox1.Text to 5" in "when Clock1.Timer do"

JustinH

unread,
Jan 27, 2018, 10:58:48 PM1/27/18
to MIT App Inventor Forum
Thank you. I will add that request later on. I am hoping more people to request that, so they may add this feature sooner.

I used your extension to make vertical slider, but had two problems:

1. The vertical slider didn't work well with AppToMarket_v41 to make multi-touch function. The slider cannot show up, but showed error message: Runtime Error
android.widget.SeekBar.setProgressTintList.
Any solution?

2. I used your old version of extension, which no StopTrackingTouch. How can I update the extension without redoing everything?

Thank you.

Abraham Getzler

unread,
Jan 28, 2018, 12:21:33 PM1/28/18
to MIT App Inventor Forum
If you want to avoid using extensions,
consider using a thin Canvas and Ball,
using the Canvas TouchUp event.

The Ball is optional, just a visual hint.

You can do this vertically or horizontally.

ABG

JustinH

unread,
Jan 28, 2018, 1:55:04 PM1/28/18
to MIT App Inventor Forum
Thank you, You are right. 
Reply all
Reply to author
Forward
0 new messages