需要帮助提供图像的跨屏流动性?

时间:2014-07-15 13:11:56

标签: android xml

任何人都可以建议我进行编辑,以便图像和文本可以在所有设备上以相同的比例显示此代码仅在3.2 - 4.5英寸屏幕的屏幕尺寸上查看请帮助。可绘制的hdpi,ldpi和mdpi尺寸图像是161 * 232,75 * 108,100 * 144我怎么没有xhdpi和xxhdpi,因为它们使图像在大屏幕设备上更小

以下是mainactivty.xml的代码

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/radial_background"
tools:context=".MainActivity" >

<ImageButton
    android:id="@+id/btnSwitch"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="100dip"
    android:background="@null"
    android:contentDescription="@null"
    android:src="@drawable/btn_switch_on" />

    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="15dip"
    android:gravity="center"
    android:padding="15dip"
    android:text="@string/about"
    android:textColor="#292929"
    android:textSize="13sp" />

</RelativeLayout>

0 个答案:

没有答案