Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: is it possible to create hollow (empty center) layout?
    primarykey
    data
    text
    <p>sorry if my topic is confuing, I am not sure which word should use to describe the layout I need. </p> <p>Currently I am working on a project that need to overlay a hollow layout on mapview, which the hollow layout will use to display the far distance location point, I post a image to demonstrate what I mean.</p> <p><img src="https://i.stack.imgur.com/ntcQH.png" alt="Mapview with storke overlay"></p> <p>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.</p> <p>Here is the xml show what I have done to make layout like above</p> <pre><code>&lt;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" &gt; &lt;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="..." /&gt; &lt;View android:layout_width="320dip" android:layout_height="50dip" android:layout_gravity="center_horizontal|top" android:background="#800ff4ff" android:textColor="#ffffffff" /&gt; &lt;View android:layout_width="320dip" android:layout_height="50dip" android:layout_gravity="center_horizontal|bottom" android:background="#800ff4ff" android:textColor="#ffffffff" /&gt; &lt;View android:layout_width="50dip" android:layout_height="520dip" android:layout_gravity="center_vertical|right" android:background="#800ff4ff" android:textColor="#ffffffff" /&gt; &lt;View android:layout_width="50dip" android:layout_height="520dip" android:layout_gravity="center_vertical|left" android:padding="20dip" android:background="#800ff4ff" android:textColor="#ffffffff" /&gt; &lt;/FrameLayout&gt; </code></pre> <p>I use framelayout to allow layout can overlay others,and create 4 sepreate on each edge to simulate what I really want (empty in center). I just not sure who to make layout only show 4 side and keep the center invisible, if any one can help please give me some guide. thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload