Clip Layout to Overlay

I have a little Problem with the app that I'm developing.

In the App I have a MapView with an overlay (a simple arrow which is drawn programatically) which is centerd on the screen.

Also I have a Layout which consists of two buttons and two textviews, basically forming a bar.

Now I want to clip the bar to the overlay so it stays centered with a little y-axis offset so it's basically over the bar with the same offset, regardless of screensize or resolution.

As requestet here is a layout sketch:

I appreciate any help or hint.

Thank you in advance!

Answers


Put both the MapView and your bar layout inside a RelativeLayout. List the bar after the map to cause it to be rendered "on top." To form the offset above center, add a Space view somewhat larger than the overlay arrow centered on both dimensions. Align the bar vertically above the Space and centered horizontally. (In fact you could do the centered arrow as an ImageView or shape drawable view also in XML and use it rather than the space.)


Need Your Help

How can I use resources in forms with type arguments?

.net winforms generics embedded-resource

I've added a type argument to my form by adding it to both Form1.cs and Form1.Designer.cs:

cViewSERVER: Missing cView.xml

xml crystal-reports scheduling

I'm trying to use the application cViewSERVER to schedule export/e-mailing Crystal Reports.