Sorry if my topic is confusing, I am not sure which words should i use to describe the layout I need.
Currently, I am working on a project that needs to overlay a hollow layout on map view, which the hollow layout will use to display the far distance location point, I post an image to demonstrate what I mean.

Basically the whole screen is fill by Mapview, and the overlay layout should overlay it without cover the center, like what I show in the image.
Here is the xml show what I have done to make layout like above
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.google.android.maps.MapView
android:id="@+id/MapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="..."
/>
<View
android:layout_width="320dip"
android:layout_height="50dip"
android:layout_gravity="center_horizontal|top"
android:background="#800ff4ff"
android:textColor="#ffffffff" />
<View
android:layout_width="320dip"
android:layout_height="50dip"
android:layout_gravity="center_horizontal|bottom"
android:background="#800ff4ff"
android:textColor="#ffffffff"
/>
<View
android:layout_width="50dip"
android:layout_height="520dip"
android:layout_gravity="center_vertical|right"
android:background="#800ff4ff"
android:textColor="#ffffffff" />
<View
android:layout_width="50dip"
android:layout_height="520dip"
android:layout_gravity="center_vertical|left"
android:padding="20dip"
android:background="#800ff4ff"
android:textColor="#ffffffff" />
</FrameLayout>
I use frame layout to allow layout can overlay others, and create 4 separate on each edge to simulate what I really want (empty in the center). I just not sure who to make layout only show 4 sides and keep the center invisible, if anyone can help please give me some guidance. thanks.
There is another easy option that you can use which meets your requirements.
Create new drawable resource with defined shape. Call this resource (XML file): margin_border.xml and place it under drawable folder.
The content of this XML:
Explanation:
This shape will act as border/frame for your inner layout. The ‘stroke’ attribute which is a border could be in any color you want and the ‘solid’ attribute has transparent color.
Then use this shape in your main layout:
Explanation:
The main layout is RelativeLayout. The MapView didn’t change, except alignParent flag for all directions which is set to true like it’s shown here.
And finally use any layout you want for the center. I used LinearLayout while background is referencing to shape drawable.
Note: The padding of this layout must be the same as the stroke width in the shape. In this case it is 50dp
This is how it looks on my mobile (screenshot):