about android, Can you please help me some in this simple task? please see the attachment. you can do the task there.

I want to start a do-while loop by pressing a button to print some numbers,
in the mean time the button will be ready for take next touch, (I mean one button will work for two task.)
in the next touch the button will stop to print those numbers.
if again I touch the same button then it will start print the numbers from the beginning.

Like: I press the button...its prining 1,2,3,4,5,6,7 then I press the button again then it stoped. then again I press the same button the its start to print 1,2,3...and so on.
means The process will run one the back of the interface.

I hope you can understand me.

can you please hep me on that?