Titanium.Android.RemoteViews

Object of Titanium.Android.
Platform Since
Android 1.6

Summary

The Titanium binding of Android RemoteViews. RemoteViews are an API for referencing and updating views that live in another process (i.e. in a Titanium.Android.Notification)

Code Examples

Create a RemoteViews based on a custom layout called "custom_layout.xml", and set a label's text.

var AppR = Ti.App.Android.R;
var customLayout = Ti.Android.createRemoteViews(AppR.layout.custom_layout);
customLayout.setTextViewText(AppR.id.custom_text, "Hello World");

Methods

Name Summary
addEventListener

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

fireEvent

Fires a synthesized event to any registered listeners.

removeEventListener

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

setBoolean

Call a method taking one boolean on a view in the layout for this RemoteViews. See Android's documentation for setBoolean

setChronometer

Sets a chronometer's base, format, and started flag. See Android's documentation for setChronometer

setDouble

Call a method taking one double on a view in the layout for this RemoteViews. See Android's documentation for setDouble

setImageViewResource

Sets an ImageView's source given a Resource ID. See Android's documentation for setImageViewResource

setImageViewUri

Sets an ImageView's source given a URI (supports both Android and Titanium URLs). See Android's documentation for setImageViewUri

setInt

Call a method taking one int on a view in the layout for this RemoteViews. See Android's documentation for setInt

setOnClickPendingIntent

Launches a Titanium.Android.PendingIntent when the specified view is clicked. See Android's documentation for setOnClickPendingIntent

setProgressBar

Sets the progress, max value, and indeterminate flag of a ProgressBar. See Android's documentation for setProgressBar

setString

Call a method taking one String on a view in the layout for this RemoteViews. See Android's documentation for setString

setTextColor

Sets the text color of a view. See Android's documentation for setTextColor

setTextViewText

Sets the text of a TextView. See Android's documentation for setTextViewText

setUri

Call a method taking one Uri on a view in the layout for this RemoteViews. See Android's documentation for setUri

setViewVisibility

Sets the visibility of a View. See Android's documentation for setViewVisibility

Properties

This type has no properties.

Events

This type has no events.