android: how to make a child view overlap the parent?

Just contain them all within a RelativeLayout, and remember the draw order is top to bottom, so put the top most view on the bottom of the XML definition.


If:

  1. sibling is a sibling of parent
  2. parent is a ViewGroup
  3. and you really want child to be a child of parent

then maybe you could consider using android:clipChildren set to false on parent.


I was actually just looking at an example of a FrameLayout that had a TextView overlaid on top of an ImageView. So, there are obviously multiple ways to get it done. Your next question might be which one is best ... to that I have no idea, but here's a guy that might:

http://www.curious-creature.org/2009/03/01/android-layout-tricks-3-optimize-part-1/