Search code examples
androidviewandroid-videoviewoverlapping

Is it possible to place one view over another in android?


Can we place a small view over another large view? For example, I have a VideoView which is playing a file in the background. Over this, somewhere in the middle/corner, I want to place another ImageView.

But in Linear/Relative Layout, views can be placed only one after another or relative to each other, and AbsoluteLayout is advised against. So what do I do?


Solution

  • FrameLayouts let you pile each view on top of the one below. This can also be achieved with a RelativeLayout.