Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitmap vs ImageView vs Drawable

What is the different between them?

where and why we need to convert from one type to another?

like image 291
thalsharif Avatar asked Mar 26 '12 20:03

thalsharif


People also ask

What is the difference between bitmap and drawable in android?

A Bitmap is a representation of a bitmap image (something like java. awt. Image). A Drawable is an abstraction of "something that can be drawn".

What is ImageView?

Displays image resources, for example Bitmap or Drawable resources. ImageView is also commonly used to apply tints to an image and handle image scaling.

What is bitmap drawable in android?

android.graphics.drawable.BitmapDrawable. A Drawable that wraps a bitmap and can be tiled, stretched, or aligned. You can create a BitmapDrawable from a file path, an input stream, through XML inflation, or from a Bitmap object. It can be defined in an XML file with the <bitmap> element.

What is the ImageView in android?

ImageView class is used to display any kind of image resource in the android application either it can be android. graphics. Bitmap or android. graphics.


1 Answers

For a difference between bitmap and drawable see here

ImageView is something like img tag in HTML. It is the View that displays an image.

like image 86
antoniom Avatar answered Sep 26 '22 11:09

antoniom