java.lang.Object | |
↳ | android.widget.RemoteViews |
A class that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RemoteViews.ActionException | Exception to send when something goes wrong executing an action | ||||||||||
RemoteViews.RemoteView | This annotation indicates that a subclass of View is alllowed to be used with the RemoteViews mechanism. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creator<RemoteViews> | CREATOR | Parcelable.Creator that instantiates RemoteViews objects |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new RemoteViews object that will display the views contained
in the specified layout file.
| |||||||||||
Reads a RemoteViews object from a parcel.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Inflates the view hierarchy represented by this object and applies
all of the actions.
| |||||||||||
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
| |||||||||||
Hook to allow clients of the LayoutInflater to restrict the set of Views
that are allowed to be inflated.
| |||||||||||
Applies all of the actions to the provided view.
| |||||||||||
Call a method taking one Bitmap on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one boolean on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one byte on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one char on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one CharSequence on a view in the layout for this RemoteViews.
| |||||||||||
Equivalent to calling Chronometer.setBase,
Chronometer.setFormat,
and Chronometer.start() or
Chronometer.stop().
| |||||||||||
Call a method taking one double on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one float on a view in the layout for this RemoteViews.
| |||||||||||
Equivalent to calling ImageView.setImageBitmap
| |||||||||||
Equivalent to calling ImageView.setImageResource
| |||||||||||
Equivalent to calling ImageView.setImageURI
| |||||||||||
Call a method taking one int on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one long on a view in the layout for this RemoteViews.
| |||||||||||
Equivalent to calling
setOnClickListener(android.view.View.OnClickListener)
to launch the provided PendingIntent.
| |||||||||||
Equivalent to calling ProgressBar.setMax,
ProgressBar.setProgress, and
ProgressBar.setIndeterminate
If indeterminate is true, then the values for max and progress are ignored.
| |||||||||||
Call a method taking one short on a view in the layout for this RemoteViews.
| |||||||||||
Call a method taking one String on a view in the layout for this RemoteViews.
| |||||||||||
Equivalent to calling setTextColor(int).
| |||||||||||
Equivalent to calling TextView.setText
| |||||||||||
Call a method taking one Uri on a view in the layout for this RemoteViews.
| |||||||||||
Equivalent to calling View.setVisibility
| |||||||||||
Flatten this object in to a Parcel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface android.os.Parcelable
| |||||||||||
From interface android.view.LayoutInflater.Filter
|
Parcelable.Creator that instantiates RemoteViews objects
Create a new RemoteViews object that will display the views contained in the specified layout file.
packageName | Name of the package that contains the layout resource |
---|---|
layoutId | The id of the layout resource |
Reads a RemoteViews object from a parcel.
Inflates the view hierarchy represented by this object and applies all of the actions.
Caller beware: this may throw
context | Default context to use |
---|---|
parent | Parent that the resulting view hierarchy will be attached to. This method does not attach the hierarchy. The caller should do so when appropriate. |
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Hook to allow clients of the LayoutInflater to restrict the set of Views that are allowed to be inflated.
clazz | The class object for the View that is about to be inflated |
---|
Applies all of the actions to the provided view.
Caller beware: this may throw
v | The view to apply the actions to. This should be the result of the apply(Context, ViewGroup) call. |
---|
Call a method taking one Bitmap on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one boolean on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one byte on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one char on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one CharSequence on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Equivalent to calling Chronometer.setBase, Chronometer.setFormat, and Chronometer.start() or Chronometer.stop().
viewId | The id of the view whose text should change |
---|---|
base | The time at which the timer would have read 0:00. This time should be based off of SystemClock.elapsedRealtime(). |
format | The Chronometer format string, or null to simply display the timer value. |
started | True if you want the clock to be started, false if not. |
Call a method taking one double on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one float on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Equivalent to calling ImageView.setImageBitmap
viewId | The id of the view whose drawable should change |
---|---|
bitmap | The new Bitmap for the drawable |
Equivalent to calling ImageView.setImageResource
viewId | The id of the view whose drawable should change |
---|---|
srcId | The new resource id for the drawable |
Equivalent to calling ImageView.setImageURI
viewId | The id of the view whose drawable should change |
---|---|
uri | The Uri for the image |
Call a method taking one int on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one long on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Equivalent to calling setOnClickListener(android.view.View.OnClickListener) to launch the provided PendingIntent.
viewId | The id of the view that will trigger the PendingIntent when clicked |
---|---|
pendingIntent | The PendingIntent to send when user clicks |
Equivalent to calling ProgressBar.setMax, ProgressBar.setProgress, and ProgressBar.setIndeterminate If indeterminate is true, then the values for max and progress are ignored.
viewId | The id of the view whose text should change |
---|---|
max | The 100% value for the progress bar |
progress | The current value of the progress bar. |
indeterminate | True if the progress bar is indeterminate, false if not. |
Call a method taking one short on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Call a method taking one String on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Equivalent to calling setTextColor(int).
viewId | The id of the view whose text should change |
---|---|
color | Sets the text color for all the states (normal, selected, focused) to be this color. |
Equivalent to calling TextView.setText
viewId | The id of the view whose text should change |
---|---|
text | The new text for the view |
Call a method taking one Uri on a view in the layout for this RemoteViews.
viewId | The id of the view whose text should change |
---|---|
methodName | The name of the method to call. |
value | The value to pass to the method. |
Equivalent to calling View.setVisibility
viewId | The id of the view whose visibility should change |
---|---|
visibility | The new visibility for the view |
Flatten this object in to a Parcel.
dest | The Parcel in which the object should be written. |
---|---|
flags | Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |