unit

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2023 License: MIT, Unlicense Imports: 1 Imported by: 1,123

Documentation

Overview

Package unit implements device independent units.

Device independent pixel, or dp, is the unit for sizes independent of the underlying display device.

Scaled pixels, or sp, is the unit for text sizes. An sp is like dp with text scaling applied.

Finally, pixels, or px, is the unit for display dependent pixels. Their size vary between platforms and displays.

To maintain a constant visual size across platforms and displays, always use dps or sps to define user interfaces. Only use pixels for derived values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.