适合所有屏幕尺寸

时间:2015-09-20 06:53:57

标签: java android

我做得对吗?我尝试制作可用于所有不同屏幕尺寸的项目,因为从一开始我就使用API​​ 17(Nexus One)创建它

<supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/fitnessku"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/AppTheme" >
        <compatible-screens>
            <!-- all small size screens -->
            <screen android:screenSize="small" android:screenDensity="ldpi" />
            <screen android:screenSize="small" android:screenDensity="mdpi" />
            <screen android:screenSize="small" android:screenDensity="hdpi" />
            <screen android:screenSize="small" android:screenDensity="xhdpi" />
            <!-- all normal size screens -->
            <screen android:screenSize="normal" android:screenDensity="ldpi" />
            <screen android:screenSize="normal" android:screenDensity="mdpi" />
            <screen android:screenSize="normal" android:screenDensity="hdpi" />
            <screen android:screenSize="normal" android:screenDensity="xhdpi" />
            <!-- all large size screens -->
            <screen android:screenSize="large" android:screenDensity="ldpi" />
            <screen android:screenSize="large" android:screenDensity="mdpi" />
            <screen android:screenSize="large" android:screenDensity="hdpi" />
            <screen android:screenSize="large" android:screenDensity="xhdpi" />
        </compatible-screens>

0 个答案:

没有答案