What is the difference between Bitmap and Drawable in Android?
What is the difference between Bitmap and Drawable in Android?
The main difference between Bitmap and Drawable in Android is:
Bitmap is a specific type of Drawable that represents an image in memory as a grid of pixels[1][2]. Bitmaps are the most common type of Drawable and are used to display static images in your app. They are defined by image files (PNG, JPEG, WebP) stored in the res/drawable/
directory[1][4].
Drawable is a general abstraction for something that can be drawn to the screen[2]. It is a superclass that includes Bitmaps as well as other types of drawables like:
So in summary, a Bitmap is a specific type o...
entry
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào