Place ImageView over Button android

后端 未结 9 1977
醉话见心
醉话见心 2020-11-30 06:35

I am trying to place an ImageView over a Button using RelativeLayout. Here is my xml:



        
9条回答
  •  借酒劲吻你
    2020-11-30 07:00

    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.

    If the foreground is smaller than background, the background portion which is not covered by the foreground would be visible. Also, you can use transparency in the foreground in which case the background would be visible(transparently). You can use BACKGROUND FOR ALL THE VIEWS.. But You can use SRC only for ImageView & ImageButton.....

提交回复
热议问题