Generate random number using function Random whose value should not be exceed (array length - 1) using that value get value from string array and display it in your textview.
String[] colors = getResources().getStringArray(R.array.colorArray);
Random random = new Random();
textView.setText(colors[random.nextInt(colors.length()-1)]);
Note : This snippet is just an example .pass your variables in it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…