Titanium.UI.Android
> Titanium.UI.Android

The Android-specific UI capabilities. All properties, methods and events in this namespace will only work on Android systems.

Examples

Android Preferences Example

Create preferences interface for the application.

app.js

var button = Ti.UI.createButton({
  title:    'Click to Open Preferences'
});
button.addEventListener('click', function() {
  Ti.API.info('Current value for editText: ' + Ti.App.Properties.getString('editText'));
  Ti.UI.Android.openPreferences();
});
Ti.UI.currentWindow.add(button);

platform/android/res/xml/preferences.xml

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="Preferences">
  <PreferenceScreen
      android:title="Misc. Preferences"
      android:summary="Click to see more options">
    <EditTextPreference
      android:title="Edit Text Preference"
      android:summary="You may enter a string"
      android:defaultValue=""
      android:key="editText" />
  </PreferenceScreen>
  <PreferenceCategory android:title="Category One">
    <CheckBoxPreference
      android:title="CheckBox Preference"
      android:defaultValue="false"
      android:summary="You may enter a boolean"
      android:key="checkbox" />
    <RingtonePreference
      android:title="Ringtone Preference"
      android:summary="You may pick a ringtone"
      android:defaultValue=""
      android:key="ringtone" />
  </PreferenceCategory>
  <PreferenceCategory android:title="Category Two">
    <ListPreference
      android:title="List Preference"
      android:summary="You may chose from multiple choices"
      android:key="list" 
    android:entries="@array/listNames"
    android:entryValues="@array/listValues" 
    />
  </PreferenceCategory>
</PreferenceScreen>

platform/android/res/values/array/array.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string-array name="listNames">
    <item>5 Minutes</item>
    <item>10 Minutes</item>
    <item>15 Minutes</item>
    <item>30 Minutes</item>
    <item>60 Minutes</item>
  </string-array>
  <string-array name="listValues">
    <item>5</item>
    <item>10</item>
    <item>15</item>
    <item>30</item>
    <item>60</item>
  </string-array>
</resources>
  • 1.0
Defined By

Properties

Titanium.UI.Android
: Numberreadonly
Raw bit controlling whether the right/bottom edge is clipped to its container, based on the gravity direction being a...

Raw bit controlling whether the right/bottom edge is clipped to its container, based on the gravity direction being applied.

  • 5.4.0
Titanium.UI.Android
GRAVITY_AXIS_PULL_AFTER : Numberreadonly

Raw bit controlling how the right/bottom edge is placed.

Raw bit controlling how the right/bottom edge is placed.

  • 5.4.0
Titanium.UI.Android
GRAVITY_AXIS_PULL_BEFORE : Numberreadonly

Raw bit controlling how the left/top edge is placed.

Raw bit controlling how the left/top edge is placed.

  • 5.4.0
Titanium.UI.Android
GRAVITY_AXIS_SPECIFIED : Numberreadonly

Raw bit indicating the gravity for an axis has been specified.

Raw bit indicating the gravity for an axis has been specified.

  • 5.4.0
Titanium.UI.Android
GRAVITY_AXIS_X_SHIFT : Numberreadonly

Bits defining the horizontal axis.

Bits defining the horizontal axis.

  • 5.4.0
Titanium.UI.Android
GRAVITY_AXIS_Y_SHIFT : Numberreadonly

Bits defining the vertical axis.

Bits defining the vertical axis.

  • 5.4.0
Titanium.UI.Android
GRAVITY_BOTTOM : Numberreadonly

Push object to the bottom of its container, not changing its size.

Push object to the bottom of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_CENTER : Numberreadonly

Place the object in the center of its container in both the vertical and horizontal axis, not changing its size.

Place the object in the center of its container in both the vertical and horizontal axis, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_CENTER_HORIZONTAL : Numberreadonly

Place object in the horizontal center of its container, not changing its size.

Place object in the horizontal center of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_CENTER_VERTICAL : Numberreadonly

Place object in the vertical center of its container, not changing its size.

Place object in the vertical center of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_CLIP_HORIZONTAL : Numberreadonly

Flag to clip the edges of the object to its container along the horizontal axis.

Flag to clip the edges of the object to its container along the horizontal axis.

  • 5.4.0
Titanium.UI.Android
GRAVITY_CLIP_VERTICAL : Numberreadonly

Flag to clip the edges of the object to its container along the vertical axis.

Flag to clip the edges of the object to its container along the vertical axis.

  • 5.4.0
Titanium.UI.Android
GRAVITY_DISPLAY_CLIP_HORIZONTAL : Numberreadonly

Special constant to enable clipping to an overall display along the horizontal dimension.

Special constant to enable clipping to an overall display along the horizontal dimension.

  • 5.4.0
Titanium.UI.Android
GRAVITY_DISPLAY_CLIP_VERTICAL : Numberreadonly

Special constant to enable clipping to an overall display along the vertical dimension.

Special constant to enable clipping to an overall display along the vertical dimension.

  • 5.4.0
Titanium.UI.Android
GRAVITY_END : Numberreadonly

Push object to x-axis position at the end of its container, not changing its size.

Push object to x-axis position at the end of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_FILL : Numberreadonly

Grow the horizontal and vertical size of the object if needed so it completely fills its container.

Grow the horizontal and vertical size of the object if needed so it completely fills its container.

  • 5.4.0
Titanium.UI.Android
GRAVITY_FILL_HORIZONTAL : Numberreadonly

Grow the horizontal size of the object if needed so it completely fills its container.

Grow the horizontal size of the object if needed so it completely fills its container.

  • 5.4.0
Titanium.UI.Android
GRAVITY_FILL_VERTICAL : Numberreadonly

Grow the vertical size of the object if needed so it completely fills its container.

Grow the vertical size of the object if needed so it completely fills its container.

  • 5.4.0
Titanium.UI.Android
GRAVITY_HORIZONTAL_GRAVITY_MASK : Numberreadonly

Binary mask to get the absolute horizontal gravity of a gravity.

Binary mask to get the absolute horizontal gravity of a gravity.

  • 5.4.0
Titanium.UI.Android
GRAVITY_LEFT : Numberreadonly

Push object to the left of its container, not changing its size.

Push object to the left of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_NO_GRAVITY : Numberreadonly

Constant indicating that no gravity has been set

Constant indicating that no gravity has been set

  • 5.4.0
Titanium.UI.Android
GRAVITY_RELATIVE_HORIZONTAL_GRAVITY_MASK : Numberreadonly

Binary mask for the horizontal gravity and script specific direction bit.

Binary mask for the horizontal gravity and script specific direction bit.

  • 5.4.0
Titanium.UI.Android
: Numberreadonly
Raw bit controlling whether the layout direction is relative or not (GRAVITY_START/GRAVITY_END instead of absolute GR...

Raw bit controlling whether the layout direction is relative or not (GRAVITY_START/GRAVITY_END instead of absolute GRAVITY_LEFT/GRAVITY_RIGHT).

  • 5.4.0
Titanium.UI.Android
GRAVITY_RIGHT : Numberreadonly

Push object to the right of its container, not changing its size.

Push object to the right of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_START : Numberreadonly

Push object to x-axis position at the start of its container, not changing its size.

Push object to x-axis position at the start of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_TOP : Numberreadonly

Push object to the top of its container, not changing its size.

Push object to the top of its container, not changing its size.

  • 5.4.0
Titanium.UI.Android
GRAVITY_VERTICAL_GRAVITY_MASK : Numberreadonly

Binary mask to get the vertical gravity of a gravity.

Binary mask to get the vertical gravity of a gravity.

  • 5.4.0
Titanium.UI.Android
: Numberdeprecatedreadonly
Converts all detectable types of data into clickable links. ...

Converts all detectable types of data into clickable links.

deprecated since 3.0.0

Use <Titanium.UI.AUTOLINK_ALL> instead.

Titanium.UI.Android
: Numberdeprecatedreadonly
Converts strings formatted as email addresses into clickable links. ...

Converts strings formatted as email addresses into clickable links.

deprecated since 3.0.0

Use <Titanium.UI.AUTOLINK_EMAIL_ADDRESSES> instead.

Titanium.UI.Android
: Numberdeprecatedreadonly
Converts strings formatted as addresses into clickable links. ...

Converts strings formatted as addresses into clickable links.

deprecated since 3.0.0

Use <Titanium.UI.AUTOLINK_MAP_ADDRESSES> instead.

Titanium.UI.Android
: Numberdeprecatedreadonly
Converts strings formatted as phone numbers into clickable links. ...

Converts strings formatted as phone numbers into clickable links.

deprecated since 3.0.0

Use <Titanium.UI.AUTOLINK_PHONE_NUMBERS> instead.

Titanium.UI.Android
: Numberdeprecatedreadonly
Converts strings formatted as URLs into clickable links. ...

Converts strings formatted as URLs into clickable links.

deprecated since 3.0.0

Use <Titanium.UI.AUTOLINK_URLS> instead.

Titanium.UI.Android
OVER_SCROLL_ALWAYS : Numberreadonly

Always allow a user to over-scroll this view, provided it is a view that can scroll.

Always allow a user to over-scroll this view, provided it is a view that can scroll.

Use this with the following properties - Titanium.UI.ScrollableView.overScrollMode, Titanium.UI.ScrollView.overScrollMode, Titanium.UI.TableView.overScrollMode and Titanium.UI.WebView.overScrollMode.

Only applicable when Titanium.Platform.Android.API_LEVEL is 9 or above.

  • 3.1.0
Titanium.UI.Android
: Numberreadonly
Allow a user to over-scroll this view only if the content is large enough to meaningfully scroll, provided it is a vi...

Allow a user to over-scroll this view only if the content is large enough to meaningfully scroll, provided it is a view that can scroll.

Use this with the following properties - Titanium.UI.ScrollableView.overScrollMode, Titanium.UI.ScrollView.overScrollMode, Titanium.UI.TableView.overScrollMode and Titanium.UI.WebView.overScrollMode.

Only applicable when Titanium.Platform.Android.API_LEVEL is 9 or above.

  • 3.1.0
Titanium.UI.Android
OVER_SCROLL_NEVER : Numberreadonly

Never allow a user to over-scroll this view.

Never allow a user to over-scroll this view.

Use this with the following properties - Titanium.UI.ScrollableView.overScrollMode, Titanium.UI.ScrollView.overScrollMode, Titanium.UI.TableView.overScrollMode and Titanium.UI.WebView.overScrollMode.

Only applicable when Titanium.Platform.Android.API_LEVEL is 9 or above.

  • 3.1.0
Titanium.UI.Android
: Numberreadonly
Android A_8 pixel format for Titanium.UI.Window. ...

Android A_8 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android LA_88 pixel format for Titanium.UI.Window. ...

Android LA_88 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android L_8 pixel format for Titanium.UI.Window. ...

Android L_8 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android OPAQUE pixel format for Titanium.UI.Window. ...

Android OPAQUE pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGBA_4444 pixel format for Titanium.UI.Window. ...

Android RGBA_4444 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGBA_5551 pixel format for Titanium.UI.Window. ...

Android RGBA_5551 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGBA_8888 pixel format for Titanium.UI.Window. ...

Android RGBA_8888 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGBX_8888 pixel format for Titanium.UI.Window. ...

Android RGBX_8888 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGB_332 pixel format for Titanium.UI.Window. ...

Android RGB_332 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGB_565 pixel format for Titanium.UI.Window. ...

Android RGB_565 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android RGB_888 pixel format for Titanium.UI.Window. ...

Android RGB_888 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android TRANSLUCENT pixel format for Titanium.UI.Window. ...

Android TRANSLUCENT pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android A_8 pixel format for Titanium.UI.Window. ...

Android A_8 pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Android UNKNOWN pixel format for Titanium.UI.Window. ...

Android UNKNOWN pixel format for Titanium.UI.Window. Selecting the correct pixel format can improve image clarity and performance.

See the Android Developer website for official documentation about the PixelFormat constants.

  • 1.8.0
Titanium.UI.Android
: Numberreadonly
Used with the Titanium.UI.Android.ProgressIndicator.type property to indicate an ongoing activity of determinate len...

Used with the Titanium.UI.Android.ProgressIndicator.type property to indicate an ongoing activity of determinate length.

  • 3.0.0
Titanium.UI.Android
: Numberreadonly
Display Titanium.UI.Android.ProgressIndicator as a modal dialog. ...

Display Titanium.UI.Android.ProgressIndicator as a modal dialog. (default)

Used with the Titanium.UI.Android.ProgressIndicator.location property.

  • 3.0.0
Titanium.UI.Android
: Numberreadonly
Used with the Titanium.UI.Android.ProgressIndicator.type property to indicate an ongoing activity of indeterminate l...

Used with the Titanium.UI.Android.ProgressIndicator.type property to indicate an ongoing activity of indeterminate length. (default)

  • 3.0.0
Titanium.UI.Android
PROGRESS_INDICATOR_STATUS_BAR : Numberreadonly

Display Titanium.UI.Android.ProgressIndicator as a horizontal progress bar in the title of the window.

Display Titanium.UI.Android.ProgressIndicator as a horizontal progress bar in the title of the window.

Used with the Titanium.UI.Android.ProgressIndicator.location property.

  • 3.0.0
Titanium.UI.Android
: NumberreadonlyCreation-Only
Pan the current heavyweight window when the input method (ie software keyboard) is shown, to ensure that its content...

Pan the current heavyweight window when the input method (ie software keyboard) is shown, to ensure that its contents are not obscured.

Used with the Titanium.UI.Window.windowSoftInputMode property.

One of the group of soft input adjustment constants, SOFT_INPUT_ADJUST_UNSPECIFIED, SOFT_INPUT_ADJUST_RESIZE, and SOFT_INPUT_ADJUST_PAN.

Titanium.UI.Android
: NumberreadonlyCreation-Only
Resize the current heavyweight window when the input method (ie software keyboard) is shown, to ensure that its cont...

Resize the current heavyweight window when the input method (ie software keyboard) is shown, to ensure that its contents are not obscured.

Used with the Titanium.UI.Window.windowSoftInputMode property.

One of the group of soft input adjustment constants, SOFT_INPUT_ADJUST_UNSPECIFIED, SOFT_INPUT_ADJUST_RESIZE, and SOFT_INPUT_ADJUST_PAN.

Titanium.UI.Android
: NumberreadonlyCreation-Only
Use the system-default behavior to determine how the soft input area (ie software keyboard) is accomodated by the cu...

Use the system-default behavior to determine how the soft input area (ie software keyboard) is accomodated by the current heavyweight window when it receives focus (default.)

Depends on the AndroidManifest.xml setting if defined or system-default otherwise to determine how to accomodate the soft keyboard when visible.

Used with the Titanium.UI.Window.windowSoftInputMode property.

One of the group of soft input adjustment constants, SOFT_INPUT_ADJUST_UNSPECIFIED, SOFT_INPUT_ADJUST_RESIZE, and SOFT_INPUT_ADJUST_PAN.

Titanium.UI.Android
SOFT_INPUT_STATE_ALWAYS_HIDDEN : Numberreadonly

Always hide the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Always hide the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Note that the unresolved bug #7115 on the Official Android Project website affects this functionality.

Used with the Titanium.UI.Window.windowSoftInputMode property.

One of the group of soft input visibility constants, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_UNSPECIFIED, and SOFT_INPUT_STATE_VISIBLE.

Titanium.UI.Android
SOFT_INPUT_STATE_ALWAYS_VISIBLE : Numberreadonly

Always show the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Always show the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Used with the Titanium.UI.Window.windowSoftInputMode property.

This constant is one of the group of soft input visibility constants, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_UNSPECIFIED, and SOFT_INPUT_STATE_VISIBLE.

Titanium.UI.Android
SOFT_INPUT_STATE_HIDDEN : Numberreadonly

Attempt to hide the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Attempt to hide the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Used with the Titanium.UI.Window.windowSoftInputMode property.

This constant is one of the group of soft input visibility constants, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_UNSPECIFIED, and SOFT_INPUT_STATE_VISIBLE.

Titanium.UI.Android
: Numberreadonly
Use the system-default behavior to determine whether to show the soft input area (ie software keyboard) when the cur...

Use the system-default behavior to determine whether to show the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Used with the Titanium.UI.Window.windowSoftInputMode property.

This constant is one of the group of soft input visibility constants, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_UNSPECIFIED, and SOFT_INPUT_STATE_VISIBLE.

Titanium.UI.Android
SOFT_INPUT_STATE_VISIBLE : Numberreadonly

Attempt to show the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Attempt to show the soft input area (ie software keyboard) when the current heavyweight window receives focus.

Used with the Titanium.UI.Window.windowSoftInputMode property.

This constant is one of the group of soft input visibility constants, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_UNSPECIFIED, and SOFT_INPUT_STATE_VISIBLE.

Titanium.UI.Android
: Numberreadonly
Use Android default behavior to handle keyboard visibility when a view receives focus. ...

Use Android default behavior to handle keyboard visibility when a view receives focus. (default)

Titanium.UI.Android
: Numberreadonly
Attempt to hide the soft keyboard when a view receives focus. ...

Attempt to hide the soft keyboard when a view receives focus. Note: system can override request.

Titanium.UI.Android
: Numberreadonly
Attempt to show the soft keyboard when a view receives focus. ...

Attempt to show the soft keyboard when a view receives focus. Note: system can override request.

Titanium.UI.Android
SWITCH_STYLE_CHECKBOX : Numberreadonly

Display a checkbox.

Display a checkbox.

Use with the Titanium.UI.Switch.style property.

Titanium.UI.Android
SWITCH_STYLE_SWITCH : Numberreadonly

Display a switch.

Display a switch.

Use with the Titanium.UI.Switch.style property.

Due to Android issue #78262, the thumb (circle icon) may not appear on the switch.

  • 4.0.0
Titanium.UI.Android
SWITCH_STYLE_TOGGLEBUTTON : Numberreadonly

Display a toggle button.

Display a toggle button.

Use with the Titanium.UI.Switch.style property.

Titanium.UI.Android
: Numberreadonly
Captures layout bounds of target views before and after the scene change and animates those changes during the transi...

Captures layout bounds of target views before and after the scene change and animates those changes during the transition.

Use this only for shared element transition. Refers to ChangeBounds transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_CHANGE_CLIP_BOUNDS : Numberreadonly

Captures the clip bounds before and after the scene change and animates those changes during the transition.

Captures the clip bounds before and after the scene change and animates those changes during the transition.

Use this only for shared element transition. Refers to ChangeClipBounds transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_CHANGE_IMAGE_TRANSFORM : Numberreadonly

Captures an ImageView's matrix before and after the scene change and animates it during the transition.

Captures an ImageView's matrix before and after the scene change and animates it during the transition.

Use this only for shared element transition. Refers to ChangeImageTransform transition.

  • 5.2.0
Titanium.UI.Android
: Numberreadonly
Captures scale and rotation for Views before and after the scene change and animates those changes during the transit...

Captures scale and rotation for Views before and after the scene change and animates those changes during the transition.

Use this only for shared element transition. Refers to ChangeTransform transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_EXPLODE : Numberreadonly

Moves views in or out from the edges of the scene.

Moves views in or out from the edges of the scene.

Use this only for activity transition. Refers to Explode transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_FADE_IN : Numberreadonly

Fades in the views.

Fades in the views.

Use this only for activity transition. Refers to Fade transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_FADE_OUT : Numberreadonly

Fades out the views.

Fades out the views.

Use this only for activity transition. Refers to Fade transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_NONE : Numberreadonly

Resets transition to platform default.

Resets transition to platform default.

Can be used with activity and shared element transtion.

  • 5.2.0
Titanium.UI.Android
TRANSITION_SLIDE_BOTTOM : Numberreadonly

Moves views to bottom.

Moves views to bottom.

Use this only for activity transition. Refers to Slide transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_SLIDE_LEFT : Numberreadonly

Moves views to left.

Moves views to left.

Use this only for activity transition. Refers to Slide transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_SLIDE_RIGHT : Numberreadonly

Moves views to right.

Moves views to right.

Use this only for activity transition. Refers to Slide transition.

  • 5.2.0
Titanium.UI.Android
TRANSITION_SLIDE_TOP : Numberreadonly

Moves views to top.

Moves views to top.

Use this only for activity transition. Refers to Slide transition.

  • 5.2.0
Titanium.UI.Android
WEBVIEW_LOAD_CACHE_ELSE_NETWORK : Numberreadonly

Use with WebView.cacheMode to override how the cache is used in a web view.

Use with WebView.cacheMode to override how the cache is used in a web view.

Use cached resources when they're available, even when they're expired. Otherwise load resources via network.

  • 3.2.0
Titanium.UI.Android
WEBVIEW_LOAD_CACHE_ONLY : Numberreadonly

Use with WebView.cacheMode to override how the cache is used in a web view.

Use with WebView.cacheMode to override how the cache is used in a web view.

Don't use network, load from the cache only.

  • 3.2.0
Titanium.UI.Android
WEBVIEW_LOAD_DEFAULT : Numberreadonly

Use with WebView.cacheMode to override how the cache is used in a web view.

Use with WebView.cacheMode to override how the cache is used in a web view.

This is the default cache usage mode.

  • 3.2.0
Titanium.UI.Android
WEBVIEW_LOAD_NO_CACHE : Numberreadonly

Use with WebView.cacheMode to override how the cache is used in a web view.

Use with WebView.cacheMode to override how the cache is used in a web view.

Don't use cache, load from the network.

  • 3.2.0
Titanium.UI.Android
WEBVIEW_PLUGINS_OFF : Numberreadonly

Use with WebView.pluginState to disable plugins in a web view.

Use with WebView.pluginState to disable plugins in a web view.

Content that requires a plugin, such as Flash Player, is not loaded, and any alternative content is displayed instead.

Titanium.UI.Android
WEBVIEW_PLUGINS_ON : Numberreadonly

Use with WebView.pluginState to enable plugins in a web view.

Use with WebView.pluginState to enable plugins in a web view.

Content that requires a plugin, such as Flash Player, is always loaded, whether or not a plugin is available for the content.

Titanium.UI.Android
WEBVIEW_PLUGINS_ON_DEMAND : Numberreadonly

Display a placeholder and only load plugins when user selects it.

Display a placeholder and only load plugins when user selects it.

Content that requires a plugin, such as Flash Player, is replaced by a placeholder. When the user clicks on the placeholder, the plugin is loaded and the content is displayed.

Use with WebView.pluginState to load plugins on demand.

apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0.0
  • 3.0.0
  • 3.0.0

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
Defined By

Methods

Adds the specified callback as an event listener for the named event. ...

Adds the specified callback as an event listener for the named event.

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to invoke when the event is fired.

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Titanium.UI.Android
( [parameters] ) : Titanium.UI.Android.CardView
Creates and returns an instance of Titanium.UI.Android.CardView. ...

Creates and returns an instance of Titanium.UI.Android.CardView.

  • 5.1.0

Parameters

Returns

Titanium.UI.Android
( [parameters] ) : Titanium.UI.Android.DrawerLayout
Creates and returns an instance of Titanium.UI.Android.DrawerLayout. ...

Creates and returns an instance of Titanium.UI.Android.DrawerLayout.

  • 6.2.0

Parameters

Returns

Creates and returns an instance of Titanium.UI.Android.ProgressIndicator. ...

Creates and returns an instance of Titanium.UI.Android.ProgressIndicator.

  • 3.0.0

Parameters

Returns

Titanium.UI.Android
( [parameters] ) : Titanium.UI.Android.SearchView
Creates and returns an instance of Titanium.UI.Android.SearchView. ...

Creates and returns an instance of Titanium.UI.Android.SearchView.

  • 3.0.2

Parameters

Returns

Fires a synthesized event to any registered listeners. ...

Fires a synthesized event to any registered listeners.

Parameters

  • 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.

Returns

  • void
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Titanium.UI.Android
( )
Hides the soft keyboard. ...

Hides the soft keyboard.

Be aware that it is not currently possible in the native Android API to detect that the keyboard is already visible or to globally show the keyboard.

Returns

  • void
Titanium.UI.Android
( )
Opens an application preferences dialog, using the native Android system settings interface, defined by the platform...

Opens an application preferences dialog, using the native Android system settings interface, defined by the platform-specific preferences.xml and array.xml files.

The preferences configuration files must be created in the project folders, platform/android/res/xml/preferences.xml and platform/android/res/values/array/array.xml.

The preferences values can be accessed via Titanium.App.Properties.

See the example for a demonstration, and the official Android Developer documentation for the preferences.xml format.

Returns

  • void
Removes the specified callback as an event listener for the named event. ...

Removes the specified callback as an event listener for the named event.

Multiple listeners can be registered for the same event, so the callback parameter is used to determine which listener to remove.

When adding a listener, you must save a reference to the callback function in order to remove the listener later:

var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);

To remove the listener, pass in a reference to the callback function:

window.removeEventListener('click', listener);

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to remove. Must be the same function passed to addEventListener.

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void