Активити открывается в уменьшенном размере
и View элементы на RelativeLayout ничем не оправдано смещаются в жопу
( но не все, а только
<ImageButton
android:id="@+id/up1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/textView6"
android:layout_alignParentLeft="true"
android:onClick="clickup1"
android:src="@drawable/up" />
<ImageButton
android:id="@+id/down1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView6"
android:onClick="clickdown1"
android:src="@drawable/down" />
При том что textView6" к которому пределаны обе кнопки, остается на своем месте
Чем объяснить, как можно приспособиться ?
xml на всякий случай
Код: Выделить всё
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#000" >
<NumberPicker
android:id="@+id/numberPicker2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="40dp" />
<NumberPicker
android:id="@+id/numberPicker3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/numberPicker2" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="144dp"
android:src="@drawable/mon1" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textView1"
android:layout_alignLeft="@+id/numberPicker3"
android:text=" Passive"
android:textColor="#fff" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textView2"
android:layout_alignLeft="@+id/numberPicker2"
android:text=" Active"
android:textColor="#fff" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_alignParentBottom="true"
android:layout_marginBottom="16dp"
android:layout_marginLeft="48dp"
android:text="0"
android:textColor="#fff" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView4"
android:layout_alignBottom="@+id/textView4"
android:layout_toRightOf="@+id/textView4"
android:text=" %"
android:textColor="#fff" />
<TextView
android:id="@+id/textView6"
style="@style/AppTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/up1"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:background="@drawable/your_bg_shape"
android:paddingBottom="11dp"
android:paddingLeft="20dp"
android:paddingRight="21dp"
android:paddingTop="11dp"
android:text="200"
android:textSize="18sp" />
<ImageButton
android:id="@+id/up1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/textView6"
android:layout_alignParentLeft="true"
android:onClick="clickup1"
android:src="@drawable/up" />
<ImageButton
android:id="@+id/down1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView6"
android:onClick="clickdown1"
android:src="@drawable/down" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/up1"
android:layout_alignLeft="@+id/textView6"
android:text=" max"
android:textColor="#fff" />
</RelativeLayout>