Random Number Generation See CodeRepo Android>> SharedPreferenceReadWriteActivity.java
//Import util random class
import java.util.Random;
//Sample method for a buttons on click listener.
@Override
public void onClick(View v) {
//Create a new instance of a Random Object
Random r = new Random();
//Create a var 'val' to hold the new random number
int val = r.nextInt(1000);
//Output option -- here setting the output to display String val
gameScore.setText(String.valueOf(val));
}