Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid View Layout Scaling bitmaps
    text
    copied!<p>I'm working an a layout which I will have a bitmap centered, and I'd like the left &amp; right margin bitmaps to scale (horizontally) to fill the screen, such that my center item can be a decorated titlebar, and the left &amp; right are filler bitmaps that match the center bitmaps background, and thus stretching horizontally. </p> <p>But what I'm seeing is there is a space between the bitmaps. The left &amp; right scale, but there is a space between them. </p> <p>Eg what I'm getting is:<br> <a href="http://www.58seconds.com/getting.png" rel="nofollow">http://www.58seconds.com/getting.png</a></p> <p>What I want is:<br> <a href="http://www.58seconds.com/want.png" rel="nofollow">http://www.58seconds.com/want.png</a></p> <p>Any ideas?</p> <p>Here is a snippet of the Layout code I use:</p> <pre><code>&lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" &gt; &lt;ImageView android:layout_width="1dp" android:layout_weight="1" android:layout_height="45sp" android:src="@drawable/mdjleftfiller" android:layout_gravity="top" android:gravity="top" android:scaleType="fitXY" /&gt; &lt;ImageView android:id="@+id/command_selection_topImage" android:layout_width="wrap_content" android:layout_height="45sp" android:src="@drawable/top_image" android:layout_gravity="top" android:gravity="top" android:layout_weight="0" /&gt; &lt;ImageView android:layout_width="0dp" android:layout_weight="1" android:layout_height="45sp" android:src="@drawable/mdjrightfiller" android:layout_gravity="top" android:gravity="top" android:scaleType="fitXY" /&gt; &lt;/LinearLayout&gt; </code></pre>
 

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