AndroidMainifest標籤使用說明5——<compatible-screens>

來源:互聯網
上載者:User

標籤:manifest   application   web服務   

格式:
<compatible-screens>    <screen android:screenSize=["small" | "normal" | "large" | "xlarge"]            android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] />    ...</compatible-screens>



父標籤:<manifest>


描述:指定螢幕的配置為應用能夠相容。在manifest中只允許一個這種標籤。但是能夠包含多個<screen>。每個<screen>指定一個能夠相容應用的螢幕大小密度。
android系統不會讀取<compatible-screens>標籤。這個標籤只是提供給像Google Play的外部服務,是使用者更好地選擇適合的。
如果想要位你的應用設定最小尺寸的螢幕,你應該使用<supports-screens>標籤。同樣地標籤還有 <supports-screens>。


子標籤:<screen>

用於指定一個單一的螢幕配置。一個執行個體中必須包含<compatible-screens>,<compatible-screens>中必須要有android:screenSize和android:screenDensity,否則是非法的。


屬性:android:screenSize必須的。可接受的值small|normal|large|xlarge。
android:screenDensity必須得。可接受的值ldpi|mdpi|hdpi|xhdpi。


例子:
<manifest ... >    ...    <compatible-screens>        <!-- 所有small型的螢幕 -->        <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" />        <!-- 所有normal性的螢幕 -->        <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>    <application ... >        ...    <application></manifest>


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.