1
<compatible-screens >
        <screen android:screenSize="small" android:screenDensity="ldpi"/>
    </compatible-screens>

我编写此代码仅支持240x320屏幕分辨率。它正在根据我的需要进行过滤。但现在我希望这个 .apk 文件也支持240x400240x432屏幕分辨率。

现在是否可以将此标记也添加到上述现有代码中:

    <screen android:screenSize="normal" android:screenDensity="ldpi"/>

所以使用这个apk我们可以支持所有三种屏幕分辨率。因为我已经使用多个 apk 完成了这个应用程序。

4

2 回答 2

1

是的,您可以这样做:

   <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" />
    </compatible-screens>

检查此参考以获得更好的解释:

兼容屏幕

于 2013-01-19T08:30:17.013 回答
1

试试这个会更好

 <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" />
</compatible-screens>

欲了解更多信息,试试这个

http://developer.android.com/guide/topics/manifest/compatible-screens-element.html

于 2013-01-19T08:30:57.817 回答