Reputation: 4167
For beautification of android apps and making it more presentable, one can use images as well as drawables in android. There are certain things which can be done using both (images and drawables) such as making a gradient background, customizing buttons, selection states, and such others.
My concern is that which one (drawable or image) in an android app will be good in terms of efficiency and performance? Or the both will have the same performance and efficiency?
Upvotes: 1
Views: 478
Reputation: 28158
I'd say that drawables are an abstraction class wrapping content of several kinds (Bitmaps, shapes, layers, animations, nine-patchs, ...). Drawables can also abstract images, so they are not mutually excluding. ImageView has a Drawable member.
To perform low level painting on Canvas or Views, I'd use Bitmaps. Gradients and backgrounds, if they are simple enough as to be painted directly with a few colors, are better achieved with xml defined drawables, but if the drawables are made of images, then there's no difference.
Upvotes: 1