Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid- Adjust image for different screen sizes
    primarykey
    data
    text
    <p>I currently have an <code>imageview</code> with an image. It looks perfect on my 2.7" test screen, however, when I test it on my 4.3" screen, the image is not where it should be. I am setting the height to have <code>dp</code> and I have my image file in hdpi, mdpi, and Ldpi folders. Am I doing something wrong? Or rather, is there some way to lock the place of the image so that it displays the same way in all phone sizes? Thanks. </p> <p>The <code>imageview</code> that is not adjusting to various screen sizes is the first <code>imageview</code> (id = sdrbg) here's my layout file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativeLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_alignParentTop="true" android:id="@+id/sdrbg" android:background="@drawable/sdrmaingraphic" android:layout_height="289dp"&gt;&lt;/ImageView&gt; &lt;ImageView android:id="@+id/canvasBOM" android:layout_alignParentBottom="true" android:layout_alignParentLeft="false" android:layout_width="fill_parent" android:background="@drawable/canvas" android:layout_height="100dp"&gt; &lt;/ImageView&gt; &lt;Button android:layout_alignParentBottom="true" android:id="@+id/playpausebuttonBOM" android:background="@drawable/main_pause_button" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="10dp"&gt;&lt;/Button&gt; &lt;Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/nextbuttonBOM" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:background="@drawable/next_song_button" android:layout_marginRight="10dp"&gt;&lt;/Button&gt; &lt;TextView android:id="@+id/textView1" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="Best of May 2011" android:textSize="20dp" android:textStyle="bold" android:layout_centerHorizontal="true" android:layout_centerVertical="false"&gt;&lt;/TextView&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    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