I've created my first app and I now am checking how it looks on a set of several devices. I've found 1 error though :
The picture of the top is the result on my Galaxy S4 while the bottom one is from an Xperia Z
As you can see the results are different even though the Xperia is a 1920*1080 443 ppi, juste like the Galaxy S4...
On the Sony Xperia Z, the text isn't centered but sightly under instead.
Here is my custom List structure :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/list_selector">
<ImageView
android:id="@+id/icon"
android:layout_width="25dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:contentDescription="@string/desc_list_item_icon"
android:src="@drawable/ic_home"
android:gravity="center_vertical"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/icon"
android:textColor="@color/list_item_title"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textSize="20sp"
android:text="TEST"
android:paddingRight="40dp"/>
</RelativeLayout>
So why would they be different, what, beyoud the screen resolution should be taken into account ? What could make these changes ?
Thanks a lot for all your help !
No comments:
Post a Comment