Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.annotation:annotation:1.0.0-rc01

Dimension

public abstract @interface Dimension
implements Annotation

androidx.annotation.Dimension


Denotes that an integer parameter, field or method return value is expected to represent a dimension.

Summary

Constants

int DP

int PX

int SP

Public methods

int unit()

Inherited methods

Constants

DP

added in version 1.0.0
public static final int DP

Constant Value: 0 (0x00000000)

PX

added in version 1.0.0
public static final int PX

Constant Value: 1 (0x00000001)

SP

added in version 1.0.0
public static final int SP

Constant Value: 2 (0x00000002)

Public methods

unit

public int unit ()

Returns
int