• 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
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.
 
also, do I have to set the Integers as public, or what, because I cant seem to do anything to something thats in another onclick listener
 
Back
Top Bottom