ScreenUtils class

Warning.

This is an archived version of the documentation. Actual documentation for all platforms can be found here.

This class is responsible for converting pixels to density-independent pixels.

Methods

ConvertPixelsToDp(int pixels)

Converts the width in pixels to density-independent pixels.

ConvertPixelsToDp(int pixels)

Converts the width in pixels to density-independent pixels.

Method description

ConvertPixelsToDp(int pixels)

public static int ConvertPixelsToDp(int pixels)

Converts the width in pixels to density-independent pixels.

Parameters:
pixels The number of pixels.
pixels The number of pixels.