新聞中心
DisplayAttributes

創(chuàng)新互聯(lián)公司是一家專注網(wǎng)站建設(shè)、網(wǎng)絡(luò)營銷策劃、成都小程序開發(fā)、電子商務(wù)建設(shè)、網(wǎng)絡(luò)推廣、移動互聯(lián)開發(fā)、研究、服務(wù)為一體的技術(shù)型公司。公司成立十年以來,已經(jīng)為千余家格柵板各業(yè)的企業(yè)公司提供互聯(lián)網(wǎng)服務(wù)?,F(xiàn)在,服務(wù)的千余家客戶與我們一路同行,見證我們的成長;未來,我們一起分享成功的喜悅。
java.lang.Object
|---ohos.agp.window.service.DisplayAttributes
public class DisplayAttributes
extends Object以像素為單位封裝顯示屬性,包括顯示寬度、高度和密度。
Since:
3
字段摘要
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| int | densityDpi | 表示顯示分辨率。 |
| float | densityPixels | 以像素為單位表示顯示密度。 |
| int | height | 表示顯示的實際高度,以像素為單位。 |
| static int | HIGH_DENSITY | 表示高分辨率顯示的密度,值為 240。 |
| static int | LOW_DENSITY | 表示低分辨率顯示的密度,值為 120。 |
| static int | MEDIUM_DENSITY | 表示中分辨率顯示的密度,值為 160。 |
| float | scalDensity | 指示顯示的文本比例密度。 |
| int | width | 表示顯示的實際寬度,以像素為單位。 |
| float | xDpi | 表示 X 軸上的每英寸點數(shù) (DPI)。 |
| float | yDpi | 表示 Y 軸上的 DPI。 |
構(gòu)造函數(shù)摘要
| 構(gòu)造函數(shù) | 描述 |
|---|---|
| DisplayAttributes() | 用于創(chuàng)建 DisplayAttributes 實例的默認(rèn)構(gòu)造函數(shù)。 |
方法總結(jié)
| 從類 java.lang.Object 繼承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段詳細(xì)信息
HIGH_DENSITY
public static final int HIGH_DENSITY
表示高分辨率顯示的密度,值為 240。
LOW_DENSITY
public static final int LOW_DENSITY
表示低分辨率顯示的密度,值為 120。
MEDIUM_DENSITY
public static final int MEDIUM_DENSITY
表示中分辨率顯示的密度,值為 160。
densityDpi
public int densityDpi
表示顯示分辨率。
densityPixels
public float densityPixels
以像素為單位表示顯示密度。 低分辨率顯示器的值為 1.0。
height
public int height
表示顯示的實際高度,以像素為單位。
scalDensity
public float scalDensity
指示顯示的文本比例密度。
width
public int width
表示顯示的實際寬度,以像素為單位。
xDpi
public float xDpi
表示 X 軸上的每英寸點數(shù) (DPI)。
yDpi
public float yDpi
表示 Y 軸上的 DPI。
構(gòu)造函數(shù)詳細(xì)信息
DisplayAttributes
public DisplayAttributes()
用于創(chuàng)建 DisplayAttributes 實例的默認(rèn)構(gòu)造函數(shù)。
當(dāng)前標(biāo)題:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OS DisplayAttributes
文章路徑:http://fisionsoft.com.cn/article/dhdddcs.html


咨詢
建站咨詢
