You are reading 12.6.4. See this page in 13.4.1.
Titanium.Android.R
Extends Titanium.Proxy
The Titanium binding of the native Android R class, giving access to
Android system-wide resources or application resources.
To access system-wide resources your application's resources, use Titanium.Android.R. To access your application's resources, use Titanium.App.Android.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:
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:
var resid = Titanium.App.Android.R.drawable.icon;
See also: android.R in the Android Developer Reference. For more information, refer to the official documentation on the Android Developer website about accessing application resources.
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 for details!
Properties 25
Animation resources. See R.anim in the Android Developer Reference.
Animator resources. See R.animator in the Android Developer Reference.
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Array resources. See R.array in the Android Developer Reference.
Attribute resources. See R.attr in the Android Developer Reference.
Boolean resources. See R.bool in the Android Developer Reference.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Color resources. See R.color in the Android Developer Reference.
Dimension resources. See https://developer.android.com/reference/android/R.dimen.html in the Android Developer Reference.
Drawable resources. See R.drawable in the Android Developer Reference.
Fraction resources. See R.fraction in the Android Developer Reference.
ID resources. See R.id in the Android Developer Reference.
Integer resources. See R.integer in the Android Developer Reference.
Interpolator resources. See R.fraction in the Android Developer Reference.
Layout resources. See R.layout in the Android Developer Reference.
Inherited from Titanium.Proxy
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
Menu resources. See R.menu in the Android Developer Reference.
Mipmap resources. See R.mipmap in the Android Developer Reference.
Plurals resources. See R.plurals in the Android Developer Reference.
Raw resources. See R.raw in the Android Developer Reference.
String resources. See R.string in the Android Developer Reference.
Style resources. See R.style in the Android Developer Reference.
Styleable resources. See R.styleable in the Android Developer Reference.
Transition resources. See R.transition in the Android Developer Reference.
XML resources. See R.xml in the Android Developer Reference.
Methods 4
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| event? | Dictionary | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|