I have written some simple code to generate a random value in my array. It generates that random value, but I cannot set my textView equal to that value. This is a very simple problem, but I can't seem to find the solution anywhere.
Here is my code...
final String[] group_topics = {"Walking", "Swimming", "Running"};
public void getRandomTopic1() {
Random random = new Random();
int index = random.nextInt(group_topics.length);
topicOne.setText(group_topics[index]);
topicOne = (TextView) findViewById(R.id.textView2);
}