Before I go back to sleep,...
Study the procedures chapter of the free online book.
You have much repetition of code. Use parameters.
Create your own Android Apps - Wolber, Abelson, Spertus, Looney (Online book) 23
Look for the shuffle topics in
... I code best in my sleep ...