I want to display a play button (ImageView) ontop of a thumbnail (another ImageView). How can I place UI controls ontop of each other?
Programatically or in XML?
I want to display a play button (ImageView) ontop of a thumbnail (another ImageView). How can I place UI controls ontop of each other?
Programatically or in XML?
You can do this programatically & in XML - but XML is the most preferable way. Just choose a layout manager like RelativeLayout
, and add your ImageViews to it like this:
<ImageView
android:id="@+id/imageview_bottom"
... />
<ImageView
android:id="@+id/imageview_ontop"
... />
The FrameLayout is designed for layering multiple Views on top of each other.