Is there any command i can use in activity class that disables TextViews that are created in xml file? I want to put that in an if clause like:
if (something == null) {
TextView.dontCreate();
} else {
TextView.setText("Hello");
}
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.
In the reference I find two methods:invalidate() and setVisibility() .But it’s an english preference so with a broken english I couldn’t distinguish them exactly.Maybe, you could have a try.