Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this in the adapter of your infoWindow:</p> <pre><code>@Override public View getInfoWindow(Marker marker) { View infoWindowLayout = (View) inflater.inflate(R.layout.my_info_window_layout, null); int width = display.getWidth() (I put here a "*2/3" too to not fill the whole screen, but this is your choice); LinearLayout infoWindowSubLayout = (LinearLayout) infoWindowLayout.findViewById(R.id.myInfoWindowSubLayout); android.widget.LinearLayout.LayoutParams lp = new android.widget.LinearLayout.LayoutParams(width, LayoutParams.MATCH_PARENT); infoWindowSubLayout.setLayoutParams(lp); return infoWindowLayout; } </code></pre> <p>And the layout file for this in my case is like:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myInfoWindowLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/..." android:orientation="horizontal" ... &gt; &lt;LinearLayout android:id="@+id/myInfoWindowSubLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_vertical" android:orientation="horizontal" ...&gt; &lt;LinearLayout android:layout_width="0px" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_vertical" android:orientation="vertical" &gt; CONTENT HERE &lt;/LinearLayout&gt; CONTENT HERE TOO &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>Well, this works for me, feel free to rewrite it</p>
 

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