I have an android app with various buttons and text views. The buttons, textviews and edittext fields are spaced around on the screen using measurment of dp. So for example a button will have: 'margintop from left 10dp'
The problem is for high density phones. I have created a new layout for higher density screens and named them either layout-large or layout-sw600-sw720 (as the problem is with galaxy s3).
But the phone still keeps calling the normal layout file which is suited to density screen 480 x 800.
I read that the s3 calls the mormal layout file. So if I change the xml in the normal file to that of the high density, what should I do with the lowere density layout xml? what file name should I call it and will the phone call this file or the normal file again?
Extract of XML layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/duroodscreen"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp" >
<Button
android:id="@+id/dmute"
android:layout_width="48dp"
android:layout_height="33dp"
android:layout_alignParentLeft="true"
android:background="@drawable/soundon" />
<Button
android:id="@+id/dreset"
style="?android:attr/buttonStyleSmall"
android:layout_width="48dp"
android:layout_height="33dp"
android:layout_alignParentRight="true"
android:background="@drawable/customresetbutton" />
<TextView
android:id="@+id/dcount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/dmute"
android:layout_marginLeft="25dp"
android:layout_marginTop="36dp"
android:gravity="center"
android:singleLine="true"
android:text="Numbers"
android:textSize="25sp" />
Refference in Manifest:
<supports-screens
android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />