Note that there are some explanatory texts on larger screens.

plurals
  1. POPrevent ImageView from pushing views offscreen
    primarykey
    data
    text
    <p>I have a linear layout which contains an imageview and another linear layout which is a bottom bar on the screen. I use the bottom bar elsewhere in my project and I dont think it is the problem. </p> <p>The problem is that the imageview takes up the entire screen. The image itself doesn't, but the view does. I can't seem to figure this out. As you can see in my xml, I am not using fill_parent for the image view and I have tried every possible scaleType for the image.</p> <p>Any suggestions? Also if it helps I am building to Android API 8</p> <p>Edit: I have changed the xml below so that you can use exactly what I have written. (This is the image that I use in the image view: <a href="https://i.imgur.com/qN5aT.jpg" rel="noreferrer">http://i.imgur.com/qN5aT.jpg</a>)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="#FFFFFF" &gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitStart" android:src="@drawable/quote_sample_img" /&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="bottom" android:orientation="vertical" &gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="This is text" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p><a href="https://i.imgur.com/m3msH.png" rel="noreferrer">http://i.imgur.com/m3msH.png</a> (Sorry not enough reputation to post the actual picture)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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