Possible Duplicate:
What is the difference between src and background of ImageView
What is the difference between android:background
and android:src
? Is their working same?
Possible Duplicate:
What is the difference between src and background of ImageView
What is the difference between android:background
and android:src
? Is their working same?
android:background
exists for all the view. As the name suggests this is what is going to be there in the background.
android:src
exists for ImageViews
and its subclasses. You can think of this as the foreground. Because ImageView
is a subclass of View
you even have android:background
for that.
You can use BACKGROUND FOR ALL THE VIEWS.. But You can use SRC only for ImageView & ImageButton.....
one sets the background, one sets the image. You can use both to set a background to an image.