I’d like to try to set string array as text of the textview. How can I do that?
Below is what I’ve tried so far:
String[] word = { "Pretty", "Cool", "Weird" };
tv.setText( word.length );
But it’s throwing some errors. I’m new to Android/Java
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
word.lengthgives you length of the array, not the content. You mean to set the content totv. You can useArrays#toStringmethod: –