Share via


DisplayMetrics.ScaledDensity Property

Definition

A scaling factor for fonts displayed on the display.

[Android.Runtime.Register("scaledDensity")]
public float ScaledDensity { get; set; }
[<Android.Runtime.Register("scaledDensity")>]
member this.ScaledDensity : single with get, set

Property Value

Attributes

Remarks

A scaling factor for fonts displayed on the display. This is the same as #density, except that it may be adjusted in smaller increments at runtime based on a user preference for the font size.

This member is deprecated. this scalar factor is no longer accurate due to adaptive non-linear font scaling. Please use TypedValue#applyDimension(int, float, DisplayMetrics) or TypedValue#deriveDimension(int, float, DisplayMetrics) to convert between SP font sizes and pixels.

Java documentation for android.util.DisplayMetrics.scaledDensity.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to