android:background
exists for all views. As the name implies, this is what will be in the background.
android:src
exists for ImageViews
and its subclasses. You can think of it as a foreground. Since ImageView
is a subclass of View
, you even have android:background
.
- If the foreground is less than the background, a background part that is not covered by the foreground will be visible.
- In addition, you can use transparency in the foreground, in which case the background will be visible (transparent).
source share