我想顯示一個imageview和2 textview使用listfragment。我爲了在平板電腦上顯示而設計它。它看起來不錯。但是,如果我使用手機查看它,效果會有所不同。正如你可以從截圖中看到的。Android圖像是不符合手機和平板電腦大小
是否有可能使手機的看法是一樣的平板電腦有何看法?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="0dp"
android:layout_height="200dp"
android:id="@+id/img"
android:src="@drawable/img_1"
android:layout_weight="1" />
<RelativeLayout
android:orientation="horizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Name"
android:id="@+id/name"
android:layout_alignParentTop="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Price"
android:id="@+id/price"
android:layout_below="@+id/name" />
</RelativeLayout>
</LinearLayout>
我爲不同屏幕尺寸的獨立佈局找不到截圖。 –
截圖的網址是http://i.stack.imgur.com/qjLp5.jpg – gosulove