Hey guys, I think this is the best place to post this. Could not find any good site to ask this. But here goes,
I am making a simple app, and I need the text to link to a webpage. The App randomly generates a set word each time the button is pressed. Here is the code.
This is a small amount of the code but it continues down for about 30 more if else.
public void onClick(View arg0) { // When the Button is Clicked String answer = ""; //Random Answer Yes, No, or Maybe Random randomGenerator = new Random(); int randomNumber = randomGenerator.nextInt(30); if (randomNumber == 0) { answer = "TEXT HERE!"; } else if (randomNumber == 1) { answer = "TEXT HERE!"; } else if (randomNumber == 2) { answer = "TEXT HERE!"; } else if (randomNumber == 3) { answer = "TEXT HERE!"; }
how would I go about linking those words to a webpage? The links will be different though. So not all of the words will link to the same page.
Thanks