手機螢幕的術語

來源:互聯網
上載者:User

1.螢幕術語

1, Screen size 螢幕的尺寸,即對角線長度(單位inch-英寸)

2, Screen density螢幕密度,即單位長度像素點數(pots/inches)

3, Resolution 解析度,即螢幕的總像素點數(width * height)

4, Density-independent pixel (dp)獨立像素密度。標準是160dip.即1dp對應1個pixel,計算公式如:px = dp * (dpi / 160),螢幕密度越大,1dp對應 的像素點越多。

2、怎樣適配多種螢幕

a.在manifest裡定義你的程式支援的螢幕類型,相應代碼如下:

<supports-screens android:resizeable=["true"| "false"]

android:smallScreens=["true" | "false"]   //是否支援小屏

android:normalScreens=["true" | "false"]  //是否支援中屏

android:largeScreens=["true" | "false"]   //是否支援大屏

android:xlargeScreens=["true" | "false"]  //是否支援超大屏

android:anyDensity=["true" | "false"]    //是否支援多種不同密度的螢幕

android:requiresSmallestWidthDp=”integer”

android:compatibleWidthLimitDp=”integer”

android:largestWidthLimitDp=”integer”/>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.