Q:

Place view on edge of layout

I have a RelativeLayout that is a map showing locations inside a building.  When the user selects a place, I show a popup pointing to the place on the map. 
I move the view around with leftMargin and topMargin, but when the location is on the edge of the view, I want it to clip outside the RelativeLayout a bit. 
I tried applying the solutions I found on here, namely setting this in the XML of the containing RelativeLayout:
android:clipToPadding="false"
android:clipChildren="false"

But when I do that, the view still gets squished against the right edge of the RelativeLayout. 

A:

If you already move a view with margin values, you could simply use a FrameLayout, which does not do so much measurement stuff like a RelativeLayout. 
If you are familiar with custom views, another solution would be using your own ViewGroup implementation, which takes care about the positions of its childs by View.layout(left,top,right,bottom).