I am trying to set a drawableLeft in a TextView in my MainActivity from my class.
How do I do this?
Thanks,
Vincent.
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.
Like Kumar mentions above, most likely all you’ll need to do is something like this (within your MainActivity).
Again, this should be done within your Activity, since the findViewById() and the getResources() methods are available through the activity. If you’re trying to do this type of thing from another class, make sure to pass the activity instance to the other class, and call these methods using that activity object.