# Titanium.Android.R

> The Titanium binding of the native Android `R` class, giving access to Android system-wide resources or application resources.

- Source: https://titaniumsdk.com/docs/sdk/12.8.0/Titanium.Android.R
- Titanium SDK version: 12.8.0
- Kind: proxy
- Platforms: Android
- Since: Titanium SDK 1.5
- Extends: Titanium.Proxy
- Inheritance: Titanium.Proxy

To access system-wide resources your application's resources, use
[Titanium.Android.R](https://titaniumsdk.com/docs/sdk/Titanium.Android.R.md).
To access your application's resources, use [Titanium.App.Android.R](https://titaniumsdk.com/docs/sdk/Titanium.App.Android.md#R).

These properties and sub-properties correspond directly to the properties
of the the `android.R` class, and should have the same syntax.
To retrieve the "OK" string from system resources in Android:

``` js
Ti.Android.currentActivity.getString(Ti.Android.R.string.ok);
```

If the file  `platform/android/res/drawable/icon.png` exists in the
project, it can be accessed using its resource name, as follows:

``` js
var resid = Titanium.App.Android.R.drawable.icon;
```

See also:
[android.R](https://developer.android.com/reference/android/R.html) in the
Android Developer Reference.
For more information, refer to the official documentation on the Android
Developer website about
[accessing application resources](https://developer.android.com/guide/topics/resources/accessing-resources.html).

Starting in Titanium SDK 7.3.0, this API exposes all Android related R classes
for the usage in Hyperloop. For example, it can be used to access `menu` resources
as part of native user interfaces, e.g. `BottomNavigationView` or `RecyclerView`.
See an example in the [Hyperloop Sample App](https://github.com/tidev/hyperloop-examples) for details!

## Properties

### anim

- Type: Object
- Platforms: Android
- Permission: read-only

Animation resources. See
[R.anim](https://developer.android.com/reference/android/R.anim.html)
in the Android Developer Reference.

### animator

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Animator resources. See
[R.animator](https://developer.android.com/reference/android/R.animator.html)
in the Android Developer Reference.

### array

- Type: Object
- Platforms: Android
- Permission: read-only

Array resources. See [R.array](https://developer.android.com/reference/android/R.array.html)
in the Android Developer Reference.

### attr

- Type: Object
- Platforms: Android
- Permission: read-only

Attribute resources. See
[R.attr](https://developer.android.com/reference/android/R.attr.html)
in the Android Developer Reference.

### bool

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Boolean resources. See
[R.bool](https://developer.android.com/reference/android/R.bool.html)
in the Android Developer Reference.

### color

- Type: Object
- Platforms: Android
- Permission: read-only

Color resources. See
[R.color](https://developer.android.com/reference/android/R.color.html)
in the Android Developer Reference.

### dimen

- Type: Object
- Platforms: Android
- Permission: read-only

Dimension resources.  See
[https://developer.android.com/reference/android/R.dimen.html](https://developer.android.com/reference/android/R.dimen.html)
in the Android Developer Reference.

### drawable

- Type: Object
- Platforms: Android
- Permission: read-only

Drawable resources. See
[R.drawable](https://developer.android.com/reference/android/R.drawable.html)
in the Android Developer Reference.

### fraction

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Fraction resources. See
[R.fraction](https://developer.android.com/reference/android/R.fraction.html)
in the Android Developer Reference.

### id

- Type: Object
- Platforms: Android
- Permission: read-only

ID resources.  See
[R.id](https://developer.android.com/reference/android/R.id.html)
in the Android Developer Reference.

### integer

- Type: Object
- Platforms: Android
- Permission: read-only

Integer resources. See
[R.integer](https://developer.android.com/reference/android/R.integer.html)
in the Android Developer Reference.

### interpolator

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Interpolator resources. See
[R.fraction](https://developer.android.com/reference/android/R.interpolator.html)
in the Android Developer Reference.

### layout

- Type: Object
- Platforms: Android
- Permission: read-only

Layout resources. See
[R.layout](https://developer.android.com/reference/android/R.layout.html)
in the Android Developer Reference.

### menu

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Menu resources. See
[R.menu](https://developer.android.com/reference/android/R.menu.html)
in the Android Developer Reference.

### mipmap

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Mipmap resources. See
[R.mipmap](https://developer.android.com/reference/android/R.mipmap.html)
in the Android Developer Reference.

### plurals

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Plurals resources. See
[R.plurals](https://developer.android.com/reference/android/R.plurals.html)
in the Android Developer Reference.

### raw

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Raw resources. See
[R.raw](https://developer.android.com/reference/android/R.raw.html)
in the Android Developer Reference.

### string

- Type: Object
- Platforms: Android
- Permission: read-only

String resources. See
[R.string](https://developer.android.com/reference/android/R.string.html)
in the Android Developer Reference.

### style

- Type: Object
- Platforms: Android
- Permission: read-only

Style resources. See
[R.style](https://developer.android.com/reference/android/R.style.html)
in the Android Developer Reference.

### styleable

- Type: Object
- Platforms: Android
- Permission: read-only

Styleable resources. See
[R.styleable](https://developer.android.com/reference/android/R.styleable.html)
in the Android Developer Reference.

### transition

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

Transition resources. See
[R.transition](https://developer.android.com/reference/android/R.transition.html)
in the Android Developer Reference.

### xml

- Type: Object
- Platforms: Android
- Since: Titanium SDK 7.3.0
- Permission: read-only

XML resources. See
[R.xml](https://developer.android.com/reference/android/R.xml.html)
in the Android Developer Reference.

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.8.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

