I created array.xml in the res/values folder which contain 5 strings(avalaible_buses as the name of the array). pls how can i select strings randomly from this array and display it on textview. below is my attempt. seatNumber is the name of the textview.
public void seatNumber (View view) {
String[] myArray = getResources().getStringArray(array.avalaible_buses);
TextView seatNumber = (TextView) findViewById(R.id.seatNumber);
Random random = new Random();
seatNumber.setText(random.nextInt(myArray));
}