Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid (newbie) image/s layout/scaling problem
    primarykey
    data
    text
    <p>I am a total noob so I might have gotten the basics wrong but this is just confusing the heck out of me.</p> <p>I have one image button and one background image here (note: bikini girl so might be NSFW - I figured if i was going to be seeing this screen for a long time i might as well have something interesting there ;D )</p> <p><a href="http://imageshack.us/photo/my-images/6/finaldi.jpg/" rel="nofollow">http://imageshack.us/photo/my-images/6/finaldi.jpg/</a></p> <p>As you can see at different screen sizes the background image scales fine, but my image button at first has a weird border around it and then it just starts shrinking.</p> <p>I have made the same image button in 36x36,48x48,72x72 and 96x96 and put them in the drawable-ldpi,drawable-mdpi,drawable-hdpi directories without any change :(</p> <p>How can I get that button to be the same on all screens? I was reading on DIP but where do i declare that?</p> <p>Thanks!</p> <p>EDIT, The XML code:</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="@drawable/background_ass"&gt; &lt;TableLayout android:id="@+id/tableLayout1" android:layout_height="wrap_content" android:layout_width="fill_parent"&gt; &lt;TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;ImageButton android:src="@drawable/level1" android:id="@+id/imageButton1" android:onClick="button_clicked1" android:background="#00000000" android:layout_width="48dip" android:layout_height="48dip"&gt; &lt;/ImageButton&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;TextView android:text="TextView" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow3" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow4" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/LinearLayout&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.
    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