• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

App Inventor Hi! I have a novice question

Wolfgang343

Lurker
Apr 12, 2020
3
0
its fun learning to develop with android studio and I've got some of the basics down. But I have a question that I cant find an answer to.

all I want is one button to start adding a fixed number to a total (starting with 0 or another fixed amount), then another button to stop it from adding.
I am using java not kotlin but I can switch if its easier. I know how to use setOnClickListener and declare buttons and textviews, integers and booleans. I'm just a newb with coding. I know Timer and setScheduled should be used but I cant get the hang of it.

example:
start,
total:0
every 300 milliseconds, add 12.
total:
12
24
36
48... etc.
thanks in advance to any help.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones