I am getting a null pointer exception when attempting to set a CheckBox to checked.
Example of my code:
CheckBox something;
something.setChecked(true);
What am i doing wrong here?
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.
It is because you did not instantiate your
CheckBoxobject properly.If your
CheckBoxis in an xml file you can do :If not just do :
See this for more info.