Skip to content

Commit 3f129a1

Browse files
committed
Added Comments on UtilDisplayMetrics
1 parent 66fbdf3 commit 3f129a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/UtilDisplayMetrics.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public extension AndroidUtilDisplayMetrics {
4949
}
5050
}
5151

52+
/// The screen density expressed as dots-per-inch.
5253
public var densityDpi: Int {
5354
get {
5455
let __value = JNIField.GetIntField(fieldName: "densityDpi",
@@ -59,6 +60,7 @@ public extension AndroidUtilDisplayMetrics {
5960
}
6061
}
6162

63+
/// The absolute height of the available display size in pixels.
6264
public var heightPixels: Int {
6365
get {
6466
let __value = JNIField.GetIntField(fieldName: "heightPixels",
@@ -69,6 +71,8 @@ public extension AndroidUtilDisplayMetrics {
6971
}
7072
}
7173

74+
/// A scaling factor for fonts displayed on the display. This is the same as density,
75+
/// except that it may be adjusted in smaller increments at runtime based on a user preference for the font size.
7276
public var scaledDensity: Float {
7377
get {
7478
let __value = JNIField.GetFloatField(fieldName: "scaledDensity",
@@ -79,6 +83,7 @@ public extension AndroidUtilDisplayMetrics {
7983
}
8084
}
8185

86+
/// The absolute width of the available display size in pixels.
8287
public var widthPixels: Int {
8388
get {
8489
let __value = JNIField.GetIntField(fieldName: "widthPixels",
@@ -89,6 +94,7 @@ public extension AndroidUtilDisplayMetrics {
8994
}
9095
}
9196

97+
/// The exact physical pixels per inch of the screen in the X dimension.
9298
public var xdpi: Float {
9399
get {
94100
let __value = JNIField.GetFloatField(fieldName: "xdpi",
@@ -99,6 +105,7 @@ public extension AndroidUtilDisplayMetrics {
99105
}
100106
}
101107

108+
/// The exact physical pixels per inch of the screen in the Y dimension.
102109
public var ydpi: Float {
103110
get {
104111
let __value = JNIField.GetFloatField(fieldName: "ydpi",

0 commit comments

Comments
 (0)