By just looking at the Android developers documentation of PaintDrawable and ColorDrawable, I can not distinguish the difference between the two. I hope someone can enlighten me with this one…
thanks,
artsylar
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.
A ColorDrawable is a very simple kind of drawable that just fills the canvas with a color. You can set a ColorFilter on a ColorDrawable, but it will be ignored. A PaintDrawable is more complex; it draws a color, but this operation can be modified by a ColorFilter, as well as a Paint object. A ColorDrawable is cheaper to use but more limited in what you can use it for.