Configuration.FontScale Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Current user preference for the scaling factor for fonts, relative to the base density scaling.
[Android.Runtime.Register("fontScale")]
public float FontScale { get; set; }
[<Android.Runtime.Register("fontScale")>]
member this.FontScale : single with get, set
- Attributes
Current user preference for the scaling factor for fonts, relative to the base density scaling.
Note: Please do not use this to hardcode font size equations. The equation for font scaling is now non-linear; this coefficient is no longer used as a direct multiplier to determine font size. It exists for informational purposes only.
Please use android.util.TypedValue#applyDimension(int, float, DisplayMetrics)
or android.util.TypedValue#deriveDimension(int, float, DisplayMetrics)
to convert between scaled font size dimensions and pixels.
Java documentation for android.content.res.Configuration.fontScale
.
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.
Produkt | Versioner |
---|---|
.NET for Android | .NET for Android API 34, .NET for Android API 35 |