, поэтому я пытался решить проблему с неправильным отображением значков, но безуспешно.
В результате получается, что на каждом экране, на эмуляторе, я пробовал все размеры и разрешения, с масштабированием и безпроисходит следующее ..
http://imageshack.us/photo/my-images/830/messedupz.png/
Верхние изображения - это снимок экрана из эмулятора, но это также происходит на устройстве.Я попробовал свое приложение также на телефоне xperia, просто чтобы посмотреть, является ли это эмулятором, но, похоже, это не так.Я использую этот значок / PNG-изображение в качестве переключателя.Я создал png для каждого dpi (ldpi, mdpi, hdpi).
Есть идеи, как это исправить?
Спасибо!
ps вот код макетакак просили
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TEST TEST TEST TEST"
android:gravity="center_horizontal"
/>
<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"
>
<ImageButton
android:background="@drawable/icon"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/btn1">
</ImageButton>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="@string/hello"
/>
</LinearLayout>
<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"
>
<ImageButton
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon">
</ImageButton>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="@string/hello"
/>
</LinearLayout>
<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">
<LinearLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<ToggleButton
android:id="@+id/btn3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/gpsonoff">
</ToggleButton>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<ToggleButton
android:id="@+id/btn4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/flashonoff">
</ToggleButton>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/btn5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon">
</ImageButton>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<ToggleButton
android:id="@+id/btn6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/noteonoff">
</ToggleButton>
</LinearLayout>
</LinearLayout>
<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">
<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"/>
<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"/>
</LinearLayout>
<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">
<TableRow>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="left"
android:paddingLeft="15dp"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/btn7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon">
</ImageButton>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:paddingRight="15dp"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/btn8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon">
</ImageButton>
</LinearLayout>
</TableRow>
</TableLayout>
</LinearLayout>