Added in API level 50
public static class

XResources.DimensionReplacement

extends Object
java.lang.Object
   ↳ android.content.res.XResources.DimensionReplacement

Class Overview

Callback for dimension replacements. Instances of this class can passed to XResources.setReplacement(String, String, String, Object) and its variants.

Summary

Public Constructors
XResources.DimensionReplacement(float value, int unit)
Creates an instance that can be used for XResources.setReplacement(String, String, String, Object) to replace a dimension resource.
Public Methods
float getDimension(DisplayMetrics metrics)
int getDimensionPixelOffset(DisplayMetrics metrics)
int getDimensionPixelSize(DisplayMetrics metrics)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public XResources.DimensionReplacement (float value, int unit)

Added in API level 50

Creates an instance that can be used for XResources.setReplacement(String, String, String, Object) to replace a dimension resource.

Parameters
value The value of the replacement, in the unit specified with the next parameter.
unit One of the COMPLEX_UNIT_* constants in TypedValue.

Public Methods

public float getDimension (DisplayMetrics metrics)

Added in API level 50

public int getDimensionPixelOffset (DisplayMetrics metrics)

Added in API level 50

public int getDimensionPixelSize (DisplayMetrics metrics)

Added in API level 50