Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to draw a border around a mapview
    primarykey
    data
    text
    <p>i am trying to draw a margin around my mapView when a button is clicked. </p> <p>So this is what i have tried and it does not work. The mapview is inside a relative layout.</p> <pre><code>LayoutInflater inflater = getLayoutInflater(); LinearLayout mView = (LinearLayout) inflater.inflate( R.layout.map_view_create_ps, mapView, false); GeoPoint viewLoc = mapView.getMapCenter(); MapView.LayoutParams params = new MapView.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, viewLoc, MapView.LayoutParams.BOTTOM_CENTER); mView.setLayoutParams(params); mapView.addView(mView); mView.setVisibility(View.VISIBLE); </code></pre> <p>The above is called when the button is clicked</p> <p>my create_ps_layout is as such</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/transparent"&gt; &lt;LinearLayout android:layout_width="fill_parent" android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_height="fill_parent" android:background="@drawable/rounded_boarder"&gt;&lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>And the drawable background is like this </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"&gt; &lt;solid android:color="@color/translucent_black" /&gt; &lt;corners android:bottomRightRadius="30dp" android:bottomLeftRadius="30dp" android:topLeftRadius="30dp" android:topRightRadius="30dp" /&gt; &lt;stroke android:width="2dip" android:color="#FFB600"/&gt; &lt;/shape&gt; </code></pre> <p>This does not work, but could you guys point me in the correct direction on how to draw a border around the mapview when the button is selected?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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