Note that there are some explanatory texts on larger screens.

plurals
  1. POIcon resize messed up?
    text
    copied!<p>so I have been trying to resolve the issue with icons being displayed incorrectly, with no success.</p> <p>What happens is that on every screen, on emulator I tried all sizes and resolutions, with and without scaling and the following happens..</p> <p><a href="http://imageshack.us/photo/my-images/830/messedupz.png/" rel="nofollow">http://imageshack.us/photo/my-images/830/messedupz.png/</a></p> <p>Top images are a screen captre from an emulator, but this happens on a device also. I tried my app also on xperia phone, just to see if this is an emulator thing but seems it isn't. I am using this icon/png-image as a togglebutton. I have created png for every dpi (ldpi, mdpi, hdpi).</p> <p>Any ideas how to fix this?</p> <p>Thanks!</p> <p>p.s. here is the code of the layout as asked for</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" &gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="TEST TEST TEST TEST" android:gravity="center_horizontal" /&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="wrap_content" android:padding="5dp" &gt; &lt;ImageButton android:background="@drawable/icon" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/btn1"&gt; &lt;/ImageButton&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp" android:text="@string/hello" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="wrap_content" android:padding="5dp" &gt; &lt;ImageButton android:id="@+id/btn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon"&gt; &lt;/ImageButton&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp" android:text="@string/hello" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:padding="5dp" android:orientation="horizontal"&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_weight="1" android:gravity="center_horizontal" android:layout_height="wrap_content"&gt; &lt;ToggleButton android:id="@+id/btn3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/gpsonoff"&gt; &lt;/ToggleButton&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_weight="1" android:gravity="center_horizontal" android:layout_height="wrap_content"&gt; &lt;ToggleButton android:id="@+id/btn4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flashonoff"&gt; &lt;/ToggleButton&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_weight="1" android:gravity="center_horizontal" android:layout_height="wrap_content"&gt; &lt;ImageButton android:id="@+id/btn5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon"&gt; &lt;/ImageButton&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_weight="1" android:gravity="center_horizontal" android:layout_height="wrap_content"&gt; &lt;ToggleButton android:id="@+id/btn6" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/noteonoff"&gt; &lt;/ToggleButton&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_width="fill_parent" android:paddingLeft="12dp" android:paddingRight="12dp" android:paddingTop="4dp" android:layout_marginTop="8dp" android:orientation="horizontal"&gt; &lt;kankan.wheel.widget.WheelView android:id="@+id/wheel1" android:layout_height="fill_parent" android:layout_width="wrap_content" android:layout_weight="1" android:layout_gravity="center_vertical"/&gt; &lt;kankan.wheel.widget.WheelView android:id="@+id/wheel2" android:layout_height="fill_parent" android:layout_width="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:layout_marginLeft="10dp"/&gt; &lt;/LinearLayout&gt; &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom" android:stretchColumns="1"&gt; &lt;TableRow&gt; &lt;LinearLayout android:layout_width="0dp" android:layout_weight="1" android:gravity="left" android:paddingLeft="15dp" android:layout_height="wrap_content"&gt; &lt;ImageButton android:id="@+id/btn7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon"&gt; &lt;/ImageButton&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="0dp" android:layout_weight="1" android:gravity="right" android:paddingRight="15dp" android:layout_height="wrap_content"&gt; &lt;ImageButton android:id="@+id/btn8" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon"&gt; &lt;/ImageButton&gt; &lt;/LinearLayout&gt; &lt;/TableRow&gt; &lt;/TableLayout&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