3
我的項目支持手機和10英寸平板電腦的單個apk。然而,手機和平板電腦的用戶界面非常不同。我將在下週發佈應用程序,並且我希望該應用程序暫時可供電話用戶使用。由於測試未完成,平板電腦版本將暫停。 將下面的聲明清單中阻止應用程序安裝/可見的10英寸平板電腦防止應用程序在Android平板電腦上運行
<manifest ... >
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="false"/>
...
<application ... >
...
</application>
</manifest>
這個問題的解決應該是:這將篩選出10英寸(超大)平板電腦的應用程序?
<manifest ... >
<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>
...
<application ... >
...
<application>
贊成,.// .. @CommonsWare,我想我的應用程序與平板電腦不兼容?我怎樣才能防止使用? –
2012-12-26 19:35:46
@AbdulWahab:這在問題的編輯中已涵蓋。 – CommonsWare 2012-12-26 19:38:02
行動,小姐完全讀取這個問題, 我認爲,下面是最聰明的代碼,我是對嗎? compatible-screens> –
2012-12-26 19:44:12