I'm testing multi dpi in android, and the layout xml file seems like this:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/new_album_bg">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="@string/hello" />
<RelativeLayout android:gravity="center"
android:paddingTop="400dip" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<EditText android:background="@drawable/name_text_bg"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center" />
</RelativeLayout>
</RelativeLayout>
When I run it on a 480x800 mdpi(160) simulator (scale to 7 inches), it works fine, but on a 480x800 hdpi simulator, it PADDING the EditText down to the near bottom of the screen, nearly 600px, is that 400dip x 240 / 160 ? And It seems has no difference with screen size even I scaled it to 4 inches. How to let padding work under different screen density? Thanks a lot!