Android studio, layout



layout in my app looks different on every devices, the images are biger or smaller :) is there any code to "scale" images with resolution, its 8bit retro graphic. :) Here's my code.



<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:background="@drawable/bakgraund">

<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton2"
android:layout_marginBottom="49dp"
android:onClick="opennewgameActivity"
android:src="@drawable/nowyplaygame"
android:background="#00ffffff"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="57dp" />

<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton3"
android:src="@drawable/nowyhighscore"
android:background="#00ffffff"
android:layout_alignTop="@+id/imageButton2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="47dp" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:src="@drawable/apple2"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView2"
android:src="@drawable/napis"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="@+id/imageView" />

</RelativeLayout>


can someone pls help me :/ it looks horrilble


No comments:

Post a Comment