Resources

Class of android.content.res · Resources.java · Android's reference

public class Resources

The app's resources for the device's configuration, over its AssetManager.

Nested types

Page 1 2

Fields

public static final int ID_NULL = 0 source

Constructors

public Resources(AssetManager assets, DisplayMetrics metrics, Configuration config) source
public Resources(ClassLoader classLoader) source

Methods

public static Resources getSystem() source

The framework's own resources: ScarletNX has none of its own, so the app's tables serve.

public static void deviceChanged(Configuration device, DisplayMetrics m) source

The display changed (snx.android.Device): each Resources takes its metrics, and the fields of the device's configuration that follow the display's size. A configuration context keeps what it overrides otherwise.

public final AssetManager getAssets() source
public ClassLoader getClassLoader() source
public Configuration getConfiguration() source
public DisplayMetrics getDisplayMetrics() source
public void updateConfiguration(Configuration config, DisplayMetrics m) deprecated source
public void getValue(int id, TypedValue outValue, boolean resolveRefs) throws NotFoundException source
public void getValue(String name, TypedValue outValue, boolean resolveRefs) throws NotFoundException source
public void getValueForDensity(int id, int density, TypedValue outValue, boolean resolveRefs) source
public CharSequence getText(int id) throws NotFoundException source
public CharSequence getText(int id, CharSequence def) source
public String getString(int id) throws NotFoundException source
public String getString(int id, Object... formatArgs) throws NotFoundException source
public CharSequence getQuantityText(int id, int quantity) throws NotFoundException source

A plural's text for quantity: the bag's entry for its category in the configuration's first locale, as ICU selects it (other when the bag has none for it)

public String getQuantityString(int id, int quantity) source
public String getQuantityString(int id, int quantity, Object... formatArgs) source
public CharSequence[] getTextArray(int id) throws NotFoundException source
public String[] getStringArray(int id) throws NotFoundException source
public int[] getIntArray(int id) throws NotFoundException source
public TypedArray obtainTypedArray(int id) throws NotFoundException source
public int getInteger(int id) throws NotFoundException source
public boolean getBoolean(int id) throws NotFoundException source
public float getFloat(int id) source
public float getFraction(int id, int base, int pbase) source
public float getDimension(int id) throws NotFoundException source
public int getDimensionPixelOffset(int id) throws NotFoundException source
public int getDimensionPixelSize(int id) throws NotFoundException source

Page 1 2


Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.