Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/widget/RemoteViews#nestedclasses) \| [Constants](https://developer.android.com/reference/android/widget/RemoteViews#constants) \| [Inherited Constants](https://developer.android.com/reference/android/widget/RemoteViews#inhconstants) \| [Fields](https://developer.android.com/reference/android/widget/RemoteViews#lfields) \| [Ctors](https://developer.android.com/reference/android/widget/RemoteViews#pubctors) \| [Methods](https://developer.android.com/reference/android/widget/RemoteViews#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/widget/RemoteViews#inhmethods)

# RemoteViews

*** ** * ** ***


`
public


class
RemoteViews
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/view/LayoutInflater.Filter,

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.widget.RemoteViews |

<br />

*** ** * ** ***

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.

`RemoteViews` is limited to support for the following layouts:

- `https://developer.android.com/reference/android/widget/AdapterViewFlipper`
- `https://developer.android.com/reference/android/widget/FrameLayout`
- `https://developer.android.com/reference/android/widget/GridLayout`
- `https://developer.android.com/reference/android/widget/GridView`
- `https://developer.android.com/reference/android/widget/LinearLayout`
- `https://developer.android.com/reference/android/widget/ListView`
- `https://developer.android.com/reference/android/widget/RelativeLayout`
- `https://developer.android.com/reference/android/widget/StackView`
- `https://developer.android.com/reference/android/widget/ViewFlipper`

And the following widgets:

- `https://developer.android.com/reference/android/widget/AnalogClock`
- `https://developer.android.com/reference/android/widget/Button`
- `https://developer.android.com/reference/android/widget/Chronometer`
- `https://developer.android.com/reference/android/widget/ImageButton`
- `https://developer.android.com/reference/android/widget/ImageView`
- `https://developer.android.com/reference/android/widget/ProgressBar`
- `https://developer.android.com/reference/android/widget/TextClock`
- `https://developer.android.com/reference/android/widget/TextView`

As of API 31, the following widgets and layouts may also be used:

- `https://developer.android.com/reference/android/widget/CheckBox`
- `https://developer.android.com/reference/android/widget/RadioButton`
- `https://developer.android.com/reference/android/widget/RadioGroup`
- `https://developer.android.com/reference/android/widget/Switch`

Descendants of these classes are not supported.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/widget/RemoteViews.ActionException` Exception to send when something goes wrong executing an action |
| ` class` | `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` A data parcel that carries the instructions to draw the RemoteViews, as an alternative to XML layout. |
| ` class` | `https://developer.android.com/reference/android/widget/RemoteViews.RemoteCollectionItems` Representation of a fixed list of items to be displayed in a RemoteViews collection. |
| ` class` | `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` Class representing a response to an action performed on any element of a RemoteViews. |
| ` class` | `https://developer.android.com/reference/android/widget/RemoteViews.RemoteViewOutlineProvider` OutlineProvider for a view with a radius set by `https://developer.android.com/reference/android/widget/RemoteViews#setViewOutlinePreferredRadius(int,%20float,%20int)`. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/widget/RemoteViews#EXTRA_CHECKED` The intent extra for whether the view whose checked state changed is currently checked. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/widget/RemoteViews#EXTRA_SHARED_ELEMENT_BOUNDS` The intent extra that contains the bounds for all shared elements. |
| `int` | `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_BOTTOM` The value will apply to the marginBottom. |
| `int` | `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` The value will apply to the marginEnd. |
| `int` | `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_LEFT` The value will apply to the marginLeft. |
| `int` | `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_RIGHT` The value will apply to the marginRight. |
| `int` | `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_START` The value will apply to the marginStart. |
| `int` | `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_TOP` The value will apply to the marginTop. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written
is a return value, that is the result of a function such as
"`Parcelable someFunction()`",
"`void someFunction(out Parcelable)`", or
"`void someFunction(inout Parcelable)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/widget/RemoteViews>` | `https://developer.android.com/reference/android/widget/RemoteViews#CREATOR` Parcelable.Creator that instantiates RemoteViews objects |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.os.Parcel)(https://developer.android.com/reference/android/os/Parcel parcel) ` Reads a RemoteViews object from a parcel. |
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.widget.RemoteViews)(https://developer.android.com/reference/android/widget/RemoteViews src) ` Creates a copy of another RemoteViews. |
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.widget.RemoteViews,%20android.widget.RemoteViews)(https://developer.android.com/reference/android/widget/RemoteViews landscape, https://developer.android.com/reference/android/widget/RemoteViews portrait) ` Create a new RemoteViews object that will inflate as the specified landspace or portrait RemoteViews, depending on the current configuration. |
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.widget.RemoteViews.DrawInstructions)(https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions drawInstructions) ` Instantiates a RemoteViews object using `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions`, which serves as an alternative to XML layout. |
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String packageName, int layoutId) ` Create a new RemoteViews object that will display the views contained in the specified layout file. |
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.lang.String,%20int,%20int)(https://developer.android.com/reference/java/lang/String packageName, int layoutId, int viewId) ` Create a new RemoteViews object that will display the views contained in the specified layout file and change the id of the root view to the specified one. |
| ` https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.util.Map<android.util.SizeF,android.widget.RemoteViews>)(https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/util/SizeF, https://developer.android.com/reference/android/widget/RemoteViews> remoteViews) ` Create a new RemoteViews object that will inflate the layout with the closest size specification. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#addStableView(int,%20android.widget.RemoteViews,%20int)(int viewId, https://developer.android.com/reference/android/widget/RemoteViews nestedView, int stableId) ` Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View)` after inflating the given `https://developer.android.com/reference/android/widget/RemoteViews`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#addView(int,%20android.widget.RemoteViews)(int viewId, https://developer.android.com/reference/android/widget/RemoteViews nestedView) ` Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View)` after inflating the given `https://developer.android.com/reference/android/widget/RemoteViews`. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/RemoteViews#apply(android.content.Context,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/view/ViewGroup parent) ` Inflates the view hierarchy represented by this object and applies all of the actions. |
| ` https://developer.android.com/reference/android/widget/RemoteViews` | ` https://developer.android.com/reference/android/widget/RemoteViews#clone()() ` *This method was deprecated in API level 28. use `https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.widget.RemoteViews)` instead.* |
| ` int` | ` https://developer.android.com/reference/android/widget/RemoteViews#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` | ` https://developer.android.com/reference/android/widget/RemoteViews#getDrawInstructions()() ` Returns the `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` associated with this RemoteViews, if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/RemoteViews#getLayoutId()() ` Returns the layout id of the root layout associated with this RemoteViews. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/widget/RemoteViews#getPackage()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/RemoteViews#getViewId()() ` Get the ID of the top-level view of the XML layout, if set using `https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.lang.String,%20int,%20int)`. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/RemoteViews#onLoadClass(java.lang.Class)(https://developer.android.com/reference/java/lang/Class<T> clazz) ` *This method is deprecated. Used by system to enforce safe inflation of `https://developer.android.com/reference/android/widget/RemoteViews`. Apps should not override this method. Changing of this method will NOT affect the process where RemoteViews is rendered.* |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#reapply(android.content.Context,%20android.view.View)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/view/View v) ` Applies all of the actions to the provided view. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#removeAllViews(int)(int viewId) ` Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup#removeAllViews()`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setAccessibilityTraversalAfter(int,%20int)(int viewId, int nextId) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setAccessibilityTraversalAfter(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setAccessibilityTraversalBefore(int,%20int)(int viewId, int nextId) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setAccessibilityTraversalBefore(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setAppWidgetEventTag(int,%20int)(int viewId, int tag) ` Set a view tag associating a View with an ID to be used for widget interaction usage events (`https://developer.android.com/reference/android/appwidget/AppWidgetEvent`). |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setBitmap(int,%20java.lang.String,%20android.graphics.Bitmap)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/graphics/Bitmap value) ` Call a method taking one Bitmap on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setBlendMode(int,%20java.lang.String,%20android.graphics.BlendMode)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/graphics/BlendMode value) ` Call a method taking one BlendMode on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setBoolean(int,%20java.lang.String,%20boolean)(int viewId, https://developer.android.com/reference/java/lang/String methodName, boolean value) ` Call a method taking one boolean on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setBundle(int,%20java.lang.String,%20android.os.Bundle)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/os/Bundle value) ` Call a method taking one Bundle on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setByte(int,%20java.lang.String,%20byte)(int viewId, https://developer.android.com/reference/java/lang/String methodName, byte value) ` Call a method taking one byte on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setChar(int,%20java.lang.String,%20char)(int viewId, https://developer.android.com/reference/java/lang/String methodName, char value) ` Call a method taking one char on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setCharSequence(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int stringResource) ` Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setCharSequence(int,%20java.lang.String,%20java.lang.CharSequence)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/java/lang/CharSequence value) ` Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setCharSequenceAttr(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int stringAttribute) ` Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setChronometer(int,%20long,%20java.lang.String,%20boolean)(int viewId, long base, https://developer.android.com/reference/java/lang/String format, boolean started) ` Equivalent to calling `https://developer.android.com/reference/android/widget/Chronometer#setBase(long)`, `https://developer.android.com/reference/android/widget/Chronometer#setFormat(java.lang.String)`, and `https://developer.android.com/reference/android/widget/Chronometer#start()` or `https://developer.android.com/reference/android/widget/Chronometer#stop()`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setChronometerCountDown(int,%20boolean)(int viewId, boolean isCountDown) ` Equivalent to calling `https://developer.android.com/reference/android/widget/Chronometer#setCountDown(boolean)` on the chronometer with the given viewId. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColor(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int colorResource) ` Call a method taking one int, a color, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColorAttr(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int colorAttribute) ` Call a method taking one int, a color, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColorInt(int,%20java.lang.String,%20int,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int notNight, int night) ` Call a method taking one int, a color, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColorStateList(int,%20java.lang.String,%20android.content.res.ColorStateList,%20android.content.res.ColorStateList)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/content/res/ColorStateList notNight, https://developer.android.com/reference/android/content/res/ColorStateList night) ` Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColorStateList(int,%20java.lang.String,%20android.content.res.ColorStateList)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/content/res/ColorStateList value) ` Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColorStateList(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int colorResource) ` Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setColorStateListAttr(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int colorAttr) ` Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setCompoundButtonChecked(int,%20boolean)(int viewId, boolean checked) ` Equivalent to calling `https://developer.android.com/reference/android/widget/CompoundButton#setChecked(boolean)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setContentDescription(int,%20java.lang.CharSequence)(int viewId, https://developer.android.com/reference/java/lang/CharSequence contentDescription) ` Equivalent to calling View.setContentDescription(CharSequence). |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setDisplayedChild(int,%20int)(int viewId, int childIndex) ` Equivalent to calling `https://developer.android.com/reference/android/widget/AdapterViewAnimator#setDisplayedChild(int)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setDouble(int,%20java.lang.String,%20double)(int viewId, https://developer.android.com/reference/java/lang/String methodName, double value) ` Call a method taking one double on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setEmptyView(int,%20int)(int viewId, int emptyViewId) ` Equivalent to calling `https://developer.android.com/reference/android/widget/AdapterView#setEmptyView(android.view.View)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setFloat(int,%20java.lang.String,%20float)(int viewId, https://developer.android.com/reference/java/lang/String methodName, float value) ` Call a method taking one float on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setFloatDimen(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int dimenResource) ` Call a method taking one float, a size in pixels, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setFloatDimen(int,%20java.lang.String,%20float,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, float value, int unit) ` Call a method taking one float, a size in pixels, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setFloatDimenAttr(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int dimenAttr) ` Call a method taking one float, a size in pixels, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setIcon(int,%20java.lang.String,%20android.graphics.drawable.Icon)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/graphics/drawable/Icon value) ` Call a method taking one Icon on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setIcon(int,%20java.lang.String,%20android.graphics.drawable.Icon,%20android.graphics.drawable.Icon)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/graphics/drawable/Icon notNight, https://developer.android.com/reference/android/graphics/drawable/Icon night) ` Call a method taking one Icon on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setImageViewBitmap(int,%20android.graphics.Bitmap)(int viewId, https://developer.android.com/reference/android/graphics/Bitmap bitmap) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageBitmap(android.graphics.Bitmap)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setImageViewIcon(int,%20android.graphics.drawable.Icon)(int viewId, https://developer.android.com/reference/android/graphics/drawable/Icon icon) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageIcon(android.graphics.drawable.Icon)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setImageViewResource(int,%20int)(int viewId, int srcId) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageResource(int)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setImageViewUri(int,%20android.net.Uri)(int viewId, https://developer.android.com/reference/android/net/Uri uri) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageURI(android.net.Uri)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setInt(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int value) ` Call a method taking one int on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setIntDimen(int,%20java.lang.String,%20float,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, float value, int unit) ` Call a method taking one int, a size in pixels, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setIntDimen(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int dimenResource) ` Call a method taking one int, a size in pixels, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setIntDimenAttr(int,%20java.lang.String,%20int)(int viewId, https://developer.android.com/reference/java/lang/String methodName, int dimenAttr) ` Call a method taking one int, a size in pixels, on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setIntent(int,%20java.lang.String,%20android.content.Intent)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/content/Intent value) ` Call a method taking one Intent on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setLabelFor(int,%20int)(int viewId, int labeledId) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setLabelFor(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setLightBackgroundLayoutId(int)(int layoutId) ` Provides an alternate layout ID, which can be used to inflate this view. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setLong(int,%20java.lang.String,%20long)(int viewId, https://developer.android.com/reference/java/lang/String methodName, long value) ` Call a method taking one long on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setOnCheckedChangeResponse(int,%20android.widget.RemoteViews.RemoteResponse)(int viewId, https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse response) ` Equivalent to calling `https://developer.android.com/reference/android/widget/CompoundButton#setOnCheckedChangeListener(android.widget.CompoundButton.OnCheckedChangeListener)` to launch the provided `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setOnClickFillInIntent(int,%20android.content.Intent)(int viewId, https://developer.android.com/reference/android/content/Intent fillInIntent) ` When using collections (eg. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setOnClickPendingIntent(int,%20android.app.PendingIntent)(int viewId, https://developer.android.com/reference/android/app/PendingIntent pendingIntent) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setOnClickListener(android.view.View.OnClickListener)` to launch the provided `https://developer.android.com/reference/android/app/PendingIntent`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setOnClickResponse(int,%20android.widget.RemoteViews.RemoteResponse)(int viewId, https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse response) ` Equivalent of calling `https://developer.android.com/reference/android/view/View#setOnClickListener(android.view.View.OnClickListener)` to launch the provided `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setOnStylusHandwritingPendingIntent(int,%20android.app.PendingIntent)(int viewId, https://developer.android.com/reference/android/app/PendingIntent pendingIntent) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setHandwritingDelegatorCallback(java.lang.Runnable)` to send the provided `https://developer.android.com/reference/android/app/PendingIntent`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setPendingIntentTemplate(int,%20android.app.PendingIntent)(int viewId, https://developer.android.com/reference/android/app/PendingIntent pendingIntentTemplate) ` When using collections (eg. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setProgressBar(int,%20int,%20int,%20boolean)(int viewId, int max, int progress, boolean indeterminate) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ProgressBar#setMax(int)`, `https://developer.android.com/reference/android/widget/ProgressBar#setProgress(int)`, and `https://developer.android.com/reference/android/widget/ProgressBar#setIndeterminate(boolean)` If indeterminate is true, then the values for max and progress are ignored. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setRadioGroupChecked(int,%20int)(int viewId, int checkedId) ` Equivalent to calling `https://developer.android.com/reference/android/widget/RadioGroup#check(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setRelativeScrollPosition(int,%20int)(int viewId, int offset) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ListView#smoothScrollByOffset(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20int,%20android.content.Intent)(int appWidgetId, int viewId, https://developer.android.com/reference/android/content/Intent intent) ` *This method was deprecated in API level 15. This method has been deprecated. See `https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.content.Intent)`* |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.content.Intent)(int viewId, https://developer.android.com/reference/android/content/Intent intent) ` *This method was deprecated in API level 35. use `https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.widget.RemoteViews.RemoteCollectionItems)` instead* |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.widget.RemoteViews.RemoteCollectionItems)(int viewId, https://developer.android.com/reference/android/widget/RemoteViews.RemoteCollectionItems items) ` Creates a simple Adapter for the viewId specified. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setScrollPosition(int,%20int)(int viewId, int position) ` Equivalent to calling `https://developer.android.com/reference/android/widget/ListView#smoothScrollToPosition(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setShort(int,%20java.lang.String,%20short)(int viewId, https://developer.android.com/reference/java/lang/String methodName, short value) ` Call a method taking one short on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setString(int,%20java.lang.String,%20java.lang.String)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/java/lang/String value) ` Call a method taking one String on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setTextColor(int,%20int)(int viewId, int color) ` Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setTextColor(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setTextViewCompoundDrawables(int,%20int,%20int,%20int,%20int)(int viewId, int left, int top, int right, int bottom) ` Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setTextViewCompoundDrawablesRelative(int,%20int,%20int,%20int,%20int)(int viewId, int start, int top, int end, int bottom) ` Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(int,%20int,%20int,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setTextViewText(int,%20java.lang.CharSequence)(int viewId, https://developer.android.com/reference/java/lang/CharSequence text) ` Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setTextViewTextSize(int,%20int,%20float)(int viewId, int units, float size) ` Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setTextSize(int,%20float)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setUri(int,%20java.lang.String,%20android.net.Uri)(int viewId, https://developer.android.com/reference/java/lang/String methodName, https://developer.android.com/reference/android/net/Uri value) ` Call a method taking one Uri on a view in the layout for this RemoteViews. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutHeight(int,%20float,%20int)(int viewId, float height, int units) ` Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height` except that you may provide the value in any dimension units. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutHeightAttr(int,%20int)(int viewId, int heightAttr) ` Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height` with the value of the given attribute in the current theme. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutHeightDimen(int,%20int)(int viewId, int heightDimen) ` Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height` with the result of `https://developer.android.com/reference/android/content/res/Resources#getDimensionPixelSize(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutMargin(int,%20int,%20float,%20int)(int viewId, int type, float value, int units) ` Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams#setMarginEnd(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutMarginAttr(int,%20int,%20int)(int viewId, int type, int attr) ` Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams#setMarginEnd(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutMarginDimen(int,%20int,%20int)(int viewId, int type, int dimen) ` Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams#setMarginEnd(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutWidth(int,%20float,%20int)(int viewId, float width, int units) ` Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width` except that you may provide the value in any dimension units. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutWidthAttr(int,%20int)(int viewId, int widthAttr) ` Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width` with the value of the given attribute in the current theme. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewLayoutWidthDimen(int,%20int)(int viewId, int widthDimen) ` Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width` with the result of `https://developer.android.com/reference/android/content/res/Resources#getDimensionPixelSize(int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewOutlinePreferredRadius(int,%20float,%20int)(int viewId, float radius, int units) ` Sets an OutlineProvider on the view whose corner radius is a dimension calculated using `https://developer.android.com/reference/android/util/TypedValue#applyDimension(int,%20float,%20android.util.DisplayMetrics)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewOutlinePreferredRadiusAttr(int,%20int)(int viewId, int attrId) ` Sets an OutlineProvider on the view whose corner radius is a dimension attribute with `attrId`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewOutlinePreferredRadiusDimen(int,%20int)(int viewId, int resId) ` Sets an OutlineProvider on the view whose corner radius is a dimension resource with `resId`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewPadding(int,%20float,%20float,%20float,%20float,%20int)(int viewId, float left, float top, float right, float bottom, int units) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewPadding(int,%20int,%20int,%20int,%20int)(int viewId, int left, int top, int right, int bottom) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#setViewVisibility(int,%20int)(int viewId, int visibility) ` Equivalent to calling `https://developer.android.com/reference/android/view/View#setVisibility(int)` |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#showNext(int)(int viewId) ` *This method was deprecated in API level 33. As RemoteViews may be reapplied frequently, it is preferable to call `https://developer.android.com/reference/android/widget/RemoteViews#setDisplayedChild(int,%20int)` to ensure that the adapter index does not change unexpectedly.* |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#showPrevious(int)(int viewId) ` *This method was deprecated in API level 33. As RemoteViews may be reapplied frequently, it is preferable to call `https://developer.android.com/reference/android/widget/RemoteViews#setDisplayedChild(int,%20int)` to ensure that the adapter index does not change unexpectedly.* |
| ` void` | ` https://developer.android.com/reference/android/widget/RemoteViews#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/view/LayoutInflater.Filter

` `
abstract


boolean` `
https://developer.android.com/reference/android/view/LayoutInflater.Filter#onLoadClass(java.lang.Class)(https://developer.android.com/reference/java/lang/Class<T> clazz)
`

Hook to allow clients of the LayoutInflater to restrict the set of Views
that are allowed to be inflated.


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### EXTRA_CHECKED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_CHECKED
```

The intent extra for whether the view whose checked state changed is currently checked.

<br />

Constant Value:

"android.widget.extra.CHECKED"


### EXTRA_SHARED_ELEMENT_BOUNDS

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_SHARED_ELEMENT_BOUNDS
```

The intent extra that contains the bounds for all shared elements.

<br />

Constant Value:

"android.widget.extra.SHARED_ELEMENT_BOUNDS"


### MARGIN_BOTTOM

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MARGIN_BOTTOM
```

The value will apply to the marginBottom.

<br />

Constant Value:

3
(0x00000003)


### MARGIN_END

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MARGIN_END
```

The value will apply to the marginEnd.

<br />

Constant Value:

5
(0x00000005)


### MARGIN_LEFT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MARGIN_LEFT
```

The value will apply to the marginLeft.

<br />

Constant Value:

0
(0x00000000)


### MARGIN_RIGHT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MARGIN_RIGHT
```

The value will apply to the marginRight.

<br />

Constant Value:

2
(0x00000002)


### MARGIN_START

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MARGIN_START
```

The value will apply to the marginStart.

<br />

Constant Value:

4
(0x00000004)


### MARGIN_TOP

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MARGIN_TOP
```

The value will apply to the marginTop.

<br />

Constant Value:

1
(0x00000001)


## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<RemoteViews> CREATOR
```

Parcelable.Creator that instantiates RemoteViews objects

<br />

## Public constructors

### RemoteViews

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (Parcel parcel)
```

Reads a RemoteViews object from a parcel.

<br />

| Parameters ||
|---|---|
| `parcel` | `Parcel`: the parcel object <br /> |

### RemoteViews

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (RemoteViews src)
```

Creates a copy of another RemoteViews.

<br />

| Parameters ||
|---|---|
| `src` | `RemoteViews` <br /> |

### RemoteViews

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (RemoteViews landscape, 
                RemoteViews portrait)
```

Create a new RemoteViews object that will inflate as the specified
landspace or portrait RemoteViews, depending on the current configuration.

<br />

| Parameters ||
|---|---|
| `landscape` | `RemoteViews`: The RemoteViews to inflate in landscape configuration <br /> |
| `portrait` | `RemoteViews`: The RemoteViews to inflate in portrait configuration <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if either landscape or portrait are null or if they are not from the same application |

### RemoteViews

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (RemoteViews.DrawInstructions drawInstructions)
```

Instantiates a RemoteViews object using `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions`, which serves as an
alternative to XML layout. `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` objects contains the instructions which
can be interpreted and rendered accordingly in the host process.

**Size Limits \& Mixing Restrictions:**

- A `RemoteViews` created with `DrawInstructions` must not contain nested child `RemoteViews` (e.g. added via `https://developer.android.com/reference/android/widget/RemoteViews#addView(int,%20android.widget.RemoteViews)`), and it cannot be added as a nested child of another classic XML-based `RemoteViews` using `https://developer.android.com/reference/android/widget/RemoteViews#addView(int,%20android.widget.RemoteViews)`.
- It cannot be included as an item in remote collections (e.g., added to `https://developer.android.com/reference/android/widget/RemoteViews.RemoteCollectionItems`).
- Sized `RemoteViews` (`https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.util.Map<android.util.SizeF,android.widget.RemoteViews>)`) and landscape/portrait configurations (`https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.widget.RemoteViews,%20android.widget.RemoteViews)`) are supported as long as they are not mixed; all individual configurations must either be classic XML-based `RemoteViews` or all must contain `DrawInstructions`.
- The total raw byte size of the `DrawInstructions` payload must not exceed the strict limit of 21MB (defined by `AppWidgetServiceImpl.MAX_REMOTE_COMPOSE_SIZE`). Exceeding this limit or violating the mixing rules will cause an `IllegalArgumentException` to be thrown at runtime.

<br />

<br />

| Parameters ||
|---|---|
| `drawInstructions` | `RemoteViews.DrawInstructions`: The `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` object. This value cannot be `null`. <br /> |

### RemoteViews

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (String packageName, 
                int layoutId)
```

Create a new RemoteViews object that will display the views contained
in the specified layout file.

<br />

| Parameters ||
|---|---|
| `packageName` | `String`: Name of the package that contains the layout resource <br /> |
| `layoutId` | `int`: The id of the layout resource <br /> |

### RemoteViews

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (String packageName, 
                int layoutId, 
                int viewId)
```

Create a new RemoteViews object that will display the views contained
in the specified layout file and change the id of the root view to the specified one.

<br />

| Parameters ||
|---|---|
| `packageName` | `String`: Name of the package that contains the layout resource. This value cannot be `null`. <br /> |
| `layoutId` | `int`: The id of the layout resource <br /> |
| `viewId` | `int` <br /> |

### RemoteViews

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews (Map<SizeF, RemoteViews> remoteViews)
```

Create a new RemoteViews object that will inflate the layout with the closest size
specification.

The default remote views in that case is always the one with the smallest area.

If the `https://developer.android.com/reference/android/widget/RemoteViews` host provides the size of the view, the layout with the largest
area that fits entirely in the provided size will be used (i.e. the width and height of
the layout must be less than the size of the view, with a 1dp margin to account for
rounding). If no layout fits in the view, the layout with the smallest area will be used.

<br />

| Parameters ||
|---|---|
| `remoteViews` | `Map`: Mapping of size to layout. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the map is empty, there are more than MAX_INIT_VIEW_COUNT layouts or the remote views are not all from the same application. |

## Public methods

### addStableView

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addStableView (int viewId, 
                RemoteViews nestedView, 
                int stableId)
```

Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View)` after inflating the given
`https://developer.android.com/reference/android/widget/RemoteViews`. If the `https://developer.android.com/reference/android/widget/RemoteViews` may be re-inflated or updated,
`https://developer.android.com/reference/android/widget/RemoteViews#removeAllViews(int)` must be called on the same `viewId
` before the first call to this method for the behavior of this method to be predictable.

The `stableId` will be used to identify a potential view to recycled when the remote
view is inflated. Views can be re-used if inserted in the same order, potentially with
some views appearing / disappearing. To be recycled the view must not change the layout
used to inflate it or its view id (see `https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.lang.String,%20int,%20int)`).

Note: if a view is re-used, all the actions will be re-applied on it. However, its properties
are not reset, so what was applied in previous round will have an effect. As a view may be
re-created at any time by the host, the RemoteViews should not rely on keeping information
from previous applications and always re-set all the properties they need.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the parent `https://developer.android.com/reference/android/view/ViewGroup` to add child into. <br /> |
| `nestedView` | `RemoteViews`: `https://developer.android.com/reference/android/widget/RemoteViews` that describes the child. This value cannot be `null`. <br /> |
| `stableId` | `int`: An id that is stable across different versions of RemoteViews. <br /> |

### addView

Added in [API level 7](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addView (int viewId, 
                RemoteViews nestedView)
```

Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View)` after inflating the
given `https://developer.android.com/reference/android/widget/RemoteViews`. This allows users to build "nested"
`https://developer.android.com/reference/android/widget/RemoteViews`. In cases where consumers of `https://developer.android.com/reference/android/widget/RemoteViews` may
recycle layouts, use `https://developer.android.com/reference/android/widget/RemoteViews#removeAllViews(int)` to clear any existing
children.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the parent `https://developer.android.com/reference/android/view/ViewGroup` to add child into. <br /> |
| `nestedView` | `RemoteViews`: `https://developer.android.com/reference/android/widget/RemoteViews` that describes the child. <br /> |

### apply

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View apply (Context context, 
                ViewGroup parent)
```

Inflates the view hierarchy represented by this object and applies
all of the actions.

**Caller beware: this may throw**

<br />

| Parameters ||
|---|---|
| `context` | `Context`: Default context to use <br /> |
| `parent` | `ViewGroup`: Parent that the resulting view hierarchy will be attached to. This method does **not** attach the hierarchy. The caller should do so when appropriate. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | The inflated view hierarchy <br /> |

### clone

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RemoteViews clone ()
```


**This method was deprecated
in API level 28.**   

use `https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(android.widget.RemoteViews)` instead.

Returns a deep copy of the RemoteViews object. The RemoteView may not be
attached to another RemoteView -- it must be the root of a hierarchy.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/widget/RemoteViews` | a clone of this instance. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if this is not the root of a RemoteView hierarchy |

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getDrawInstructions

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public RemoteViews.DrawInstructions getDrawInstructions ()
```

Returns the `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` associated with this RemoteViews, if any.

If this `RemoteViews` is a container holding multiple responsive layouts (such as
sized layouts created for different screen dimensions or landscape/portrait variants), this
method returns the draw instructions of the smallest child view (for sized layouts) or the
portrait child view (for orientation layouts).

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` | The `https://developer.android.com/reference/android/widget/RemoteViews.DrawInstructions` object, or `null` if this `RemoteViews` does not contain draw instructions. <br /> |

### getLayoutId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLayoutId ()
```

Returns the layout id of the root layout associated with this RemoteViews. In the case
that the RemoteViews has both a landscape and portrait root, this will return the layout
id associated with the portrait layout.

<br />

| Returns ||
|---|---|
| `int` | the layout id. <br /> |

### getPackage

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getPackage ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getViewId

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getViewId ()
```

Get the ID of the top-level view of the XML layout, if set using
`https://developer.android.com/reference/android/widget/RemoteViews#RemoteViews(java.lang.String,%20int,%20int)`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### onLoadClass

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onLoadClass (Class<T> clazz)
```


**This method is deprecated.**   

Used by system to enforce safe inflation of `https://developer.android.com/reference/android/widget/RemoteViews`. Apps should not
override this method. Changing of this method will NOT affect the process where RemoteViews
is rendered.

Used to restrict the views which can be inflated

<br />

| Parameters ||
|---|---|
| `clazz` | `Class`: The class object for the View that is about to be inflated <br /> |

| Returns ||
|---|---|
| `boolean` | True if this class is allowed to be inflated, or false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/LayoutInflater.Filter#onLoadClass(java.lang.Class)`

### reapply

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void reapply (Context context, 
                View v)
```

Applies all of the actions to the provided view.

**Caller beware: this may throw**

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `v` | `View`: The view to apply the actions to. This should be the result of the `https://developer.android.com/reference/android/widget/RemoteViews#apply(android.content.Context,%20android.view.ViewGroup)` call. <br /> |

### removeAllViews

Added in [API level 7](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeAllViews (int viewId)
```

Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup#removeAllViews()`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the parent `https://developer.android.com/reference/android/view/ViewGroup` to remove all children from. <br /> |

### setAccessibilityTraversalAfter

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityTraversalAfter (int viewId, 
                int nextId)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setAccessibilityTraversalAfter(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose after view in accessibility traversal to set. <br /> |
| `nextId` | `int`: The id of the next in the accessibility traversal. <br /> |

### setAccessibilityTraversalBefore

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityTraversalBefore (int viewId, 
                int nextId)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setAccessibilityTraversalBefore(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose before view in accessibility traversal to set. <br /> |
| `nextId` | `int`: The id of the next in the accessibility traversal. <br /> |

### setAppWidgetEventTag

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void setAppWidgetEventTag (int viewId, 
                int tag)
```

Set a view tag associating a View with an ID to be used for widget interaction usage events
(`https://developer.android.com/reference/android/appwidget/AppWidgetEvent`). When this RemoteViews is applied to a bound
widget, any clicks or scrolls on the tagged view will be reported to
`https://developer.android.com/reference/android/appwidget/AppWidgetManager` using this tag.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: ID of the View whose tag will be set <br /> |
| `tag` | `int`: The integer tag to use for the event <br /> |

**See also:**

- `https://developer.android.com/reference/android/appwidget/AppWidgetEvent#getClickedIds()`
- `https://developer.android.com/reference/android/appwidget/AppWidgetEvent#getScrolledIds()`
- `https://developer.android.com/reference/android/appwidget/AppWidgetManager#queryAppWidgetEvents(long,%20long)`

### setBitmap

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBitmap (int viewId, 
                String methodName, 
                Bitmap value)
```

Call a method taking one Bitmap on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `Bitmap`: The value to pass to the method. <br /> |

### setBlendMode

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBlendMode (int viewId, 
                String methodName, 
                BlendMode value)
```

Call a method taking one BlendMode on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `value` | `BlendMode`: The value to pass to the method. This value may be `null`. <br /> |

### setBoolean

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBoolean (int viewId, 
                String methodName, 
                boolean value)
```

Call a method taking one boolean on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `boolean`: The value to pass to the method. <br /> |

### setBundle

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBundle (int viewId, 
                String methodName, 
                Bundle value)
```

Call a method taking one Bundle on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `Bundle`: The value to pass to the method. <br /> |

### setByte

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setByte (int viewId, 
                String methodName, 
                byte value)
```

Call a method taking one byte on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `byte`: The value to pass to the method. <br /> |

### setChar

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setChar (int viewId, 
                String methodName, 
                char value)
```

Call a method taking one char on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `char`: The value to pass to the method. <br /> |

### setCharSequence

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCharSequence (int viewId, 
                String methodName, 
                int stringResource)
```

Call a method taking one CharSequence on a view in the layout for this RemoteViews.

The CharSequence will be resolved from the resources at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is
(re-)applied.

Undefined resources will result in an exception, except 0 which will resolve to null.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `stringResource` | `int`: The resource to resolve and pass as argument to the method. <br /> |

### setCharSequence

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCharSequence (int viewId, 
                String methodName, 
                CharSequence value)
```

Call a method taking one CharSequence on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `CharSequence`: The value to pass to the method. <br /> |

### setCharSequenceAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCharSequenceAttr (int viewId, 
                String methodName, 
                int stringAttribute)
```

Call a method taking one CharSequence on a view in the layout for this RemoteViews.

The CharSequence will be resolved from the theme attribute at the time the
`https://developer.android.com/reference/android/widget/RemoteViews` is (re-)applied.

Unresolvable attributes will result in an exception, except 0 which will resolve to null.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `stringAttribute` | `int`: The attribute to resolve and pass as argument to the method. <br /> |

### setChronometer

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setChronometer (int viewId, 
                long base, 
                String format, 
                boolean started)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/Chronometer#setBase(long)`,
`https://developer.android.com/reference/android/widget/Chronometer#setFormat(java.lang.String)`,
and `https://developer.android.com/reference/android/widget/Chronometer#start()` or
`https://developer.android.com/reference/android/widget/Chronometer#stop()`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the `https://developer.android.com/reference/android/widget/Chronometer` to change <br /> |
| `base` | `long`: The time at which the timer would have read 0:00. This time should be based off of `https://developer.android.com/reference/android/os/SystemClock#elapsedRealtime()`. <br /> |
| `format` | `String`: The Chronometer format string, or null to simply display the timer value. <br /> |
| `started` | `boolean`: True if you want the clock to be started, false if not. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/RemoteViews#setChronometerCountDown(int,%20boolean)`

### setChronometerCountDown

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setChronometerCountDown (int viewId, 
                boolean isCountDown)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/Chronometer#setCountDown(boolean)` on
the chronometer with the given viewId.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the `https://developer.android.com/reference/android/widget/Chronometer` to change <br /> |
| `isCountDown` | `boolean`: True if you want the chronometer to count down to base instead of counting up. <br /> |

### setColor

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColor (int viewId, 
                String methodName, 
                int colorResource)
```

Call a method taking one int, a color, on a view in the layout for this RemoteViews.

The Color will be resolved from the resources at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is (re-)
applied.

Undefined resources will result in an exception, except 0 which will resolve to 0.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `colorResource` | `int`: The resource to resolve and pass as argument to the method. <br /> |

### setColorAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColorAttr (int viewId, 
                String methodName, 
                int colorAttribute)
```

Call a method taking one int, a color, on a view in the layout for this RemoteViews.

The Color will be resolved from the theme attribute at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is
(re-)applied.

Unresolvable attributes will result in an exception, except 0 which will resolve to 0.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `colorAttribute` | `int`: The theme attribute to resolve and pass as argument to the method. <br /> |

### setColorInt

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColorInt (int viewId, 
                String methodName, 
                int notNight, 
                int night)
```

Call a method taking one int, a color, on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `notNight` | `int`: The value to pass to the method when the view's configuration is set to `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_NO` <br /> |
| `night` | `int`: The value to pass to the method when the view's configuration is set to `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_YES` <br /> |

### setColorStateList

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColorStateList (int viewId, 
                String methodName, 
                ColorStateList notNight, 
                ColorStateList night)
```

Call a method taking one ColorStateList on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `notNight` | `ColorStateList`: The value to pass to the method when the view's configuration is set to `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_NO` This value may be `null`. <br /> |
| `night` | `ColorStateList`: The value to pass to the method when the view's configuration is set to `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_YES` This value may be `null`. <br /> |

### setColorStateList

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColorStateList (int viewId, 
                String methodName, 
                ColorStateList value)
```

Call a method taking one ColorStateList on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `value` | `ColorStateList`: The value to pass to the method. This value may be `null`. <br /> |

### setColorStateList

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColorStateList (int viewId, 
                String methodName, 
                int colorResource)
```

Call a method taking one ColorStateList on a view in the layout for this RemoteViews.

The ColorStateList will be resolved from the resources at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is
(re-)applied.

Undefined resources will result in an exception, except 0 which will resolve to null.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `colorResource` | `int`: The resource to resolve and pass as argument to the method. <br /> |

### setColorStateListAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setColorStateListAttr (int viewId, 
                String methodName, 
                int colorAttr)
```

Call a method taking one ColorStateList on a view in the layout for this RemoteViews.

The ColorStateList will be resolved from the theme attribute at the time the
`https://developer.android.com/reference/android/widget/RemoteViews` is (re-)applied.

Unresolvable attributes will result in an exception, except 0 which will resolve to null.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `colorAttr` | `int`: The theme attribute to resolve and pass as argument to the method. <br /> |

### setCompoundButtonChecked

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundButtonChecked (int viewId, 
                boolean checked)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/CompoundButton#setChecked(boolean)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose property to set. <br /> |
| `checked` | `boolean`: true to check the button, false to uncheck it. <br /> |

### setContentDescription

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setContentDescription (int viewId, 
                CharSequence contentDescription)
```

Equivalent to calling View.setContentDescription(CharSequence).

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose content description should change. <br /> |
| `contentDescription` | `CharSequence`: The new content description for the view. <br /> |

### setDisplayedChild

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDisplayedChild (int viewId, 
                int childIndex)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/AdapterViewAnimator#setDisplayedChild(int)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call `https://developer.android.com/reference/android/widget/AdapterViewAnimator#setDisplayedChild(int)` <br /> |
| `childIndex` | `int` <br /> |

### setDouble

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDouble (int viewId, 
                String methodName, 
                double value)
```

Call a method taking one double on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `double`: The value to pass to the method. <br /> |

### setEmptyView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setEmptyView (int viewId, 
                int emptyViewId)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/AdapterView#setEmptyView(android.view.View)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to set the empty view <br /> |
| `emptyViewId` | `int`: The view id of the empty view <br /> |

### setFloat

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFloat (int viewId, 
                String methodName, 
                float value)
```

Call a method taking one float on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `float`: The value to pass to the method. <br /> |

### setFloatDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFloatDimen (int viewId, 
                String methodName, 
                int dimenResource)
```

Call a method taking one float, a size in pixels, on a view in the layout for this
RemoteViews.

The dimension will be resolved from the resources at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is
(re-)applied.

Undefined resources will result in an exception, except 0 which will resolve to 0f.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `dimenResource` | `int`: The resource to resolve and pass as argument to the method. <br /> |

### setFloatDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFloatDimen (int viewId, 
                String methodName, 
                float value, 
                int unit)
```

Call a method taking one float, a size in pixels, on a view in the layout for this
RemoteViews.

The dimension will be resolved from the resources at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is
(re-)applied.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `value` | `float`: The value of the dimension. <br /> |
| `unit` | `int`: The unit in which the value is specified. Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setFloatDimenAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFloatDimenAttr (int viewId, 
                String methodName, 
                int dimenAttr)
```

Call a method taking one float, a size in pixels, on a view in the layout for this
RemoteViews.

The dimension will be resolved from the theme attribute at the time the `https://developer.android.com/reference/android/widget/RemoteViews`
is (re-)applied.

Unresolvable attributes will result in an exception, except 0 which will resolve to 0f.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `dimenAttr` | `int`: The attribute to resolve and pass as argument to the method. <br /> |

### setIcon

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIcon (int viewId, 
                String methodName, 
                Icon value)
```

Call a method taking one Icon on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `Icon`: The `https://developer.android.com/reference/android/graphics/drawable/Icon` to pass the method. <br /> |

### setIcon

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIcon (int viewId, 
                String methodName, 
                Icon notNight, 
                Icon night)
```

Call a method taking one Icon on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `notNight` | `Icon`: The value to pass to the method when the view's configuration is set to `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_NO` This value may be `null`. <br /> |
| `night` | `Icon`: The value to pass to the method when the view's configuration is set to `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_YES` This value may be `null`. <br /> |

### setImageViewBitmap

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImageViewBitmap (int viewId, 
                Bitmap bitmap)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageBitmap(android.graphics.Bitmap)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose bitmap should change <br /> |
| `bitmap` | `Bitmap`: The new Bitmap for the drawable <br /> |

### setImageViewIcon

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImageViewIcon (int viewId, 
                Icon icon)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageIcon(android.graphics.drawable.Icon)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose bitmap should change <br /> |
| `icon` | `Icon`: The new Icon for the ImageView <br /> |

### setImageViewResource

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImageViewResource (int viewId, 
                int srcId)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageResource(int)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose drawable should change <br /> |
| `srcId` | `int`: The new resource id for the drawable <br /> |

### setImageViewUri

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImageViewUri (int viewId, 
                Uri uri)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ImageView#setImageURI(android.net.Uri)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose drawable should change <br /> |
| `uri` | `Uri`: The Uri for the image <br /> |

### setInt

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setInt (int viewId, 
                String methodName, 
                int value)
```

Call a method taking one int on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `int`: The value to pass to the method. <br /> |

### setIntDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIntDimen (int viewId, 
                String methodName, 
                float value, 
                int unit)
```

Call a method taking one int, a size in pixels, on a view in the layout for this
RemoteViews.

The dimension will be resolved from the specified dimension at the time of inflation.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `value` | `float`: The value of the dimension. <br /> |
| `unit` | `int`: The unit in which the value is specified. Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setIntDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIntDimen (int viewId, 
                String methodName, 
                int dimenResource)
```

Call a method taking one int, a size in pixels, on a view in the layout for this
RemoteViews.

The dimension will be resolved from the resources at the time the `https://developer.android.com/reference/android/widget/RemoteViews` is
(re-)applied.

Undefined resources will result in an exception, except 0 which will resolve to 0.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `dimenResource` | `int`: The resource to resolve and pass as argument to the method. <br /> |

### setIntDimenAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIntDimenAttr (int viewId, 
                String methodName, 
                int dimenAttr)
```

Call a method taking one int, a size in pixels, on a view in the layout for this
RemoteViews.

The dimension will be resolved from the theme attribute at the time the
`https://developer.android.com/reference/android/widget/RemoteViews` is (re-)applied.

Unresolvable attributes will result in an exception, except 0 which will resolve to 0.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. This value cannot be `null`. <br /> |
| `dimenAttr` | `int`: The attribute to resolve and pass as argument to the method. <br /> |

### setIntent

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIntent (int viewId, 
                String methodName, 
                Intent value)
```

Call a method taking one Intent on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `Intent`: The `https://developer.android.com/reference/android/content/Intent` to pass the method. <br /> |

### setLabelFor

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLabelFor (int viewId, 
                int labeledId)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setLabelFor(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose property to set. <br /> |
| `labeledId` | `int`: The id of a view for which this view serves as a label. <br /> |

### setLightBackgroundLayoutId

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLightBackgroundLayoutId (int layoutId)
```

Provides an alternate layout ID, which can be used to inflate this view. This layout will be
used by the host when the widgets displayed on a light-background where foreground elements
and text can safely draw using a dark color without any additional background protection.

<br />

| Parameters ||
|---|---|
| `layoutId` | `int` <br /> |

### setLong

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLong (int viewId, 
                String methodName, 
                long value)
```

Call a method taking one long on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `long`: The value to pass to the method. <br /> |

### setOnCheckedChangeResponse

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnCheckedChangeResponse (int viewId, 
                RemoteViews.RemoteResponse response)
```

Equivalent to calling
`https://developer.android.com/reference/android/widget/CompoundButton#setOnCheckedChangeListener(android.widget.CompoundButton.OnCheckedChangeListener)`
to launch the provided `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse`.

The intent will be filled with the current checked state of the view at the key
`https://developer.android.com/reference/android/widget/RemoteViews#EXTRA_CHECKED`.

The `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` will not be launched in response to check changes arising from
`https://developer.android.com/reference/android/widget/RemoteViews#setCompoundButtonChecked(int,%20boolean)` or `https://developer.android.com/reference/android/widget/RemoteViews#setRadioGroupChecked(int,%20int)`
usages.

The `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` must be created using
`https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse#fromFillInIntent(android.content.Intent)` in conjunction with
`https://developer.android.com/reference/android/widget/RemoteViews#setPendingIntentTemplate(int,%20android.app.PendingIntent)` for items inside
collections (eg. `https://developer.android.com/reference/android/widget/ListView`, `https://developer.android.com/reference/android/widget/StackView` etc.).

Otherwise, create the `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` using
`https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse#fromPendingIntent(android.app.PendingIntent)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view that will trigger the `https://developer.android.com/reference/android/app/PendingIntent` when checked state changes. <br /> |
| `response` | `RemoteViews.RemoteResponse`: The `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` to send when the checked state changes. This value cannot be `null`. <br /> |

### setOnClickFillInIntent

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnClickFillInIntent (int viewId, 
                Intent fillInIntent)
```

When using collections (eg. `https://developer.android.com/reference/android/widget/ListView`, `https://developer.android.com/reference/android/widget/StackView` etc.) in widgets, it is very
costly to set PendingIntents on the individual items, and is hence not recommended. Instead
a single PendingIntent template can be set on the collection, see `https://developer.android.com/reference/android/widget/RemoteViews#setPendingIntentTemplate(int,%20android.app.PendingIntent)`, and the individual on-click
action of a given item can be distinguished by setting a fillInIntent on that item. The
fillInIntent is then combined with the PendingIntent template in order to determine the final
intent which will be executed when the item is clicked. This works as follows: any fields
which are left blank in the PendingIntent template, but are provided by the fillInIntent
will be overwritten, and the resulting PendingIntent will be used. The rest
of the PendingIntent template will then be filled in with the associated fields that are
set in fillInIntent. See `https://developer.android.com/reference/android/content/Intent#fillIn(android.content.Intent,%20int)` for more details.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to set the fillInIntent <br /> |
| `fillInIntent` | `Intent`: The intent which will be combined with the parent's PendingIntent in order to determine the on-click behavior of the view specified by viewId <br /> |

### setOnClickPendingIntent

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnClickPendingIntent (int viewId, 
                PendingIntent pendingIntent)
```

Equivalent to calling
`https://developer.android.com/reference/android/view/View#setOnClickListener(android.view.View.OnClickListener)`
to launch the provided `https://developer.android.com/reference/android/app/PendingIntent`. The source bounds
(`https://developer.android.com/reference/android/content/Intent#getSourceBounds()`) of the intent will be set to the bounds of the clicked
view in screen space.
Note that any activity options associated with the mPendingIntent may get overridden
before starting the intent.

When setting the on-click action of items within collections (eg. `https://developer.android.com/reference/android/widget/ListView`,
`https://developer.android.com/reference/android/widget/StackView` etc.), this method will not work. Instead, use `https://developer.android.com/reference/android/widget/RemoteViews#setPendingIntentTemplate(int,%20android.app.PendingIntent)` in conjunction with
`https://developer.android.com/reference/android/widget/RemoteViews#setOnClickFillInIntent(int,%20android.content.Intent)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view that will trigger the `https://developer.android.com/reference/android/app/PendingIntent` when clicked <br /> |
| `pendingIntent` | `PendingIntent`: The `https://developer.android.com/reference/android/app/PendingIntent` to send when user clicks <br /> |

### setOnClickResponse

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnClickResponse (int viewId, 
                RemoteViews.RemoteResponse response)
```

Equivalent of calling
`https://developer.android.com/reference/android/view/View#setOnClickListener(android.view.View.OnClickListener)`
to launch the provided `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view that will trigger the `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` when clicked <br /> |
| `response` | `RemoteViews.RemoteResponse`: The `https://developer.android.com/reference/android/widget/RemoteViews.RemoteResponse` to send when user clicks. This value cannot be `null`. <br /> |

### setOnStylusHandwritingPendingIntent

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnStylusHandwritingPendingIntent (int viewId, 
                PendingIntent pendingIntent)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setHandwritingDelegatorCallback(java.lang.Runnable)` to send the
provided `https://developer.android.com/reference/android/app/PendingIntent`.

A common use case is a remote view which looks like a text editor but does not actually
support text editing itself, and clicking on the remote view launches an activity containing
an EditText. To support handwriting initiation in this case, this method can be called on the
remote view to configure it as a handwriting delegator, meaning that stylus movement on the
remote view triggers a `https://developer.android.com/reference/android/app/PendingIntent` and starts handwriting mode for the delegate
EditText. The `https://developer.android.com/reference/android/app/PendingIntent` is typically the same as the one passed to `https://developer.android.com/reference/android/widget/RemoteViews#setOnClickPendingIntent(int,%20android.app.PendingIntent)` which launches the activity containing the EditText. The EditText
should call `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)` to set it as a delegate, and also use
`https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatorPackage(java.lang.String)` or `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#HANDWRITING_DELEGATE_FLAG_HOME_DELEGATOR_ALLOWED`
if necessary to support delegators from the package displaying the remote view.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: identifier of the view that will trigger the `https://developer.android.com/reference/android/app/PendingIntent` when a stylus `https://developer.android.com/reference/android/view/MotionEvent` occurs within the view's bounds <br /> |
| `pendingIntent` | `PendingIntent`: the `https://developer.android.com/reference/android/app/PendingIntent` to send, or `null` to clear the handwriting delegation <br /> |

### setPendingIntentTemplate

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPendingIntentTemplate (int viewId, 
                PendingIntent pendingIntentTemplate)
```

When using collections (eg. `https://developer.android.com/reference/android/widget/ListView`, `https://developer.android.com/reference/android/widget/StackView` etc.) in widgets, it is very
costly to set PendingIntents on the individual items, and is hence not recommended. Instead
this method should be used to set a single PendingIntent template on the collection, and
individual items can differentiate their on-click behavior using
`https://developer.android.com/reference/android/widget/RemoteViews#setOnClickFillInIntent(int,%20android.content.Intent)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the collection who's children will use this PendingIntent template when clicked <br /> |
| `pendingIntentTemplate` | `PendingIntent`: The `https://developer.android.com/reference/android/app/PendingIntent` to be combined with extras specified by a child of viewId and executed when that child is clicked <br /> |

### setProgressBar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setProgressBar (int viewId, 
                int max, 
                int progress, 
                boolean indeterminate)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ProgressBar#setMax(int)`,
`https://developer.android.com/reference/android/widget/ProgressBar#setProgress(int)`, and
`https://developer.android.com/reference/android/widget/ProgressBar#setIndeterminate(boolean)`

If indeterminate is true, then the values for max and progress are ignored.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the `https://developer.android.com/reference/android/widget/ProgressBar` to change <br /> |
| `max` | `int`: The 100% value for the progress bar <br /> |
| `progress` | `int`: The current value of the progress bar. <br /> |
| `indeterminate` | `boolean`: True if the progress bar is indeterminate, false if not. <br /> |

### setRadioGroupChecked

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRadioGroupChecked (int viewId, 
                int checkedId)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/RadioGroup#check(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose property to set. <br /> |
| `checkedId` | `int`: The unique id of the radio button to select in the group. <br /> |

### setRelativeScrollPosition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRelativeScrollPosition (int viewId, 
                int offset)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ListView#smoothScrollByOffset(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `offset` | `int`: Scroll by this adapter position offset <br /> |

### setRemoteAdapter

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRemoteAdapter (int appWidgetId, 
                int viewId, 
                Intent intent)
```


**This method was deprecated
in API level 15.**   

This method has been deprecated. See
`https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.content.Intent)`

Equivalent to calling `https://developer.android.com/reference/android/widget/AbsListView#setRemoteViewsAdapter(android.content.Intent)`.

<br />

| Parameters ||
|---|---|
| `appWidgetId` | `int`: The id of the app widget which contains the specified view. (This parameter is ignored in this deprecated method) <br /> |
| `viewId` | `int`: The id of the `https://developer.android.com/reference/android/widget/AdapterView` <br /> |
| `intent` | `Intent`: The intent of the service which will be providing data to the RemoteViewsAdapter <br /> |

### setRemoteAdapter

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRemoteAdapter (int viewId, 
                Intent intent)
```


**This method was deprecated
in API level 35.**   

use
`https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.widget.RemoteViews.RemoteCollectionItems)` instead

Equivalent to calling `https://developer.android.com/reference/android/widget/AbsListView#setRemoteViewsAdapter(android.content.Intent)`.
Can only be used for App Widgets.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the `https://developer.android.com/reference/android/widget/AdapterView` <br /> |
| `intent` | `Intent`: The intent of the service which will be providing data to the RemoteViewsAdapter <br /> |

### setRemoteAdapter

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRemoteAdapter (int viewId, 
                RemoteViews.RemoteCollectionItems items)
```

Creates a simple Adapter for the viewId specified. The viewId must point to an AdapterView,
ie. `https://developer.android.com/reference/android/widget/ListView`, `https://developer.android.com/reference/android/widget/GridView`, `https://developer.android.com/reference/android/widget/StackView` or `https://developer.android.com/reference/android/widget/AdapterViewAnimator`.
This is a simpler but less flexible approach to populating collection widgets. Its use is
encouraged for most scenarios, as long as the total memory within the list of RemoteViews
is relatively small (ie. doesn't contain large or numerous Bitmaps, see `https://developer.android.com/reference/android/widget/RemoteViews#setImageViewBitmap(int,%20android.graphics.Bitmap)`). In the case of numerous images, the use of API is still
possible by setting image URIs instead of Bitmaps, see `https://developer.android.com/reference/android/widget/RemoteViews#setImageViewUri(int,%20android.net.Uri)`.

This API is supported in the compatibility library for previous API levels, see
RemoteViewsCompat.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the `https://developer.android.com/reference/android/widget/AdapterView`. <br /> |
| `items` | `RemoteViews.RemoteCollectionItems`: The items to display in the `https://developer.android.com/reference/android/widget/AdapterView`. This value cannot be `null`. <br /> |

### setScrollPosition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollPosition (int viewId, 
                int position)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/ListView#smoothScrollToPosition(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `position` | `int`: Scroll to this adapter position <br /> |

### setShort

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setShort (int viewId, 
                String methodName, 
                short value)
```

Call a method taking one short on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `short`: The value to pass to the method. <br /> |

### setString

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setString (int viewId, 
                String methodName, 
                String value)
```

Call a method taking one String on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `String`: The value to pass to the method. <br /> |

### setTextColor

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextColor (int viewId, 
                int color)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setTextColor(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose text color should change <br /> |
| `color` | `int`: Sets the text color for all the states (normal, selected, focused) to be this color. <br /> |

### setTextViewCompoundDrawables

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextViewCompoundDrawables (int viewId, 
                int left, 
                int top, 
                int right, 
                int bottom)
```

Equivalent to calling
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose text should change <br /> |
| `left` | `int`: The id of a drawable to place to the left of the text, or 0 <br /> |
| `top` | `int`: The id of a drawable to place above the text, or 0 <br /> |
| `right` | `int`: The id of a drawable to place to the right of the text, or 0 <br /> |
| `bottom` | `int`: The id of a drawable to place below the text, or 0 <br /> |

### setTextViewCompoundDrawablesRelative

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextViewCompoundDrawablesRelative (int viewId, 
                int start, 
                int top, 
                int end, 
                int bottom)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(int,%20int,%20int,%20int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose text should change <br /> |
| `start` | `int`: The id of a drawable to place before the text (relative to the layout direction), or 0 <br /> |
| `top` | `int`: The id of a drawable to place above the text, or 0 <br /> |
| `end` | `int`: The id of a drawable to place after the text, or 0 <br /> |
| `bottom` | `int`: The id of a drawable to place below the text, or 0 <br /> |

### setTextViewText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextViewText (int viewId, 
                CharSequence text)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose text should change <br /> |
| `text` | `CharSequence`: The new text for the view <br /> |

### setTextViewTextSize

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextViewTextSize (int viewId, 
                int units, 
                float size)
```

Equivalent to calling `https://developer.android.com/reference/android/widget/TextView#setTextSize(int,%20float)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose text size should change <br /> |
| `units` | `int`: The units of size (e.g. COMPLEX_UNIT_SP) <br /> |
| `size` | `float`: The size of the text <br /> |

### setUri

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setUri (int viewId, 
                String methodName, 
                Uri value)
```

Call a method taking one Uri on a view in the layout for this RemoteViews.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call the method. <br /> |
| `methodName` | `String`: The name of the method to call. <br /> |
| `value` | `Uri`: The value to pass to the method. <br /> |

### setViewLayoutHeight

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutHeight (int viewId, 
                float height, 
                int units)
```

Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height` except that you may
provide the value in any dimension units.

NOTE: It is recommended to use `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` only for 0,
`https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#WRAP_CONTENT`, or `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#MATCH_PARENT`.
Otherwise, prefer using scalable units like `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP`.
As of Android 17, the `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` values set by this function will be
automatically scaled when the RemoteViews is used on a display with a different density.
.

<br />

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `height` | `float`: height of the view in the given units <br /> |
| `units` | `int`: The unit type of the value e.g. `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setViewLayoutHeightAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutHeightAttr (int viewId, 
                int heightAttr)
```

Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height` with
the value of the given attribute in the current theme.

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `heightAttr` | `int`: a dimen attribute to read the height from. <br /> |

### setViewLayoutHeightDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutHeightDimen (int viewId, 
                int heightDimen)
```

Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height` with
the result of `https://developer.android.com/reference/android/content/res/Resources#getDimensionPixelSize(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `heightDimen` | `int`: a dimen resource to read the height from. <br /> |

### setViewLayoutMargin

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutMargin (int viewId, 
                int type, 
                float value, 
                int units)
```

Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams#setMarginEnd(int)`.
Only works if the `https://developer.android.com/reference/android/view/View#getLayoutParams()` supports margins.

NOTE: It is recommended to use `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` only for 0.
Otherwise, prefer using scalable units like `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP`.
As of Android 17, the `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` values set by this function will be
automatically scaled when the RemoteViews is used on a display with a different density.
.

<br />

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `type` | `int`: The margin being set e.g. `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` Value is one of the following: - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_LEFT` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_TOP` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_RIGHT` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_BOTTOM` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_START` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` |
| `value` | `float`: a value for the margin the given units. <br /> |
| `units` | `int`: The unit type of the value e.g. `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setViewLayoutMarginAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutMarginAttr (int viewId, 
                int type, 
                int attr)
```

Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams#setMarginEnd(int)`.
Only works if the `https://developer.android.com/reference/android/view/View#getLayoutParams()` supports margins.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `type` | `int`: The margin being set e.g. `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` Value is one of the following: - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_LEFT` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_TOP` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_RIGHT` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_BOTTOM` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_START` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` |
| `attr` | `int`: a dimension attribute to apply to the margin, or 0 to clear the margin. <br /> |

### setViewLayoutMarginDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutMarginDimen (int viewId, 
                int type, 
                int dimen)
```

Equivalent to calling `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams#setMarginEnd(int)`.
Only works if the `https://developer.android.com/reference/android/view/View#getLayoutParams()` supports margins.

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `type` | `int`: The margin being set e.g. `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` Value is one of the following: - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_LEFT` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_TOP` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_RIGHT` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_BOTTOM` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_START` - `https://developer.android.com/reference/android/widget/RemoteViews#MARGIN_END` |
| `dimen` | `int`: a dimension resource to apply to the margin, or 0 to clear the margin. <br /> |

### setViewLayoutWidth

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutWidth (int viewId, 
                float width, 
                int units)
```

Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width` except that you may
provide the value in any dimension units.

NOTE: It is recommended to use `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` only for 0,
`https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#WRAP_CONTENT`, or `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#MATCH_PARENT`.
Otherwise, prefer using scalable units like `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP`.
As of Android 17, the `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` values set by this function will be
automatically scaled when the RemoteViews is used on a display with a different density.
.

<br />

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `width` | `float`: Width of the view in the given units <br /> |
| `units` | `int`: The unit type of the value e.g. `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setViewLayoutWidthAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutWidthAttr (int viewId, 
                int widthAttr)
```

Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width` with
the value of the given attribute in the current theme.

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `widthAttr` | `int`: the dimension attribute for the view's width <br /> |

### setViewLayoutWidthDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewLayoutWidthDimen (int viewId, 
                int widthDimen)
```

Equivalent to setting `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width` with
the result of `https://developer.android.com/reference/android/content/res/Resources#getDimensionPixelSize(int)`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `widthDimen` | `int`: the dimension resource for the view's width <br /> |

### setViewOutlinePreferredRadius

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewOutlinePreferredRadius (int viewId, 
                float radius, 
                int units)
```

Sets an OutlineProvider on the view whose corner radius is a dimension calculated using
`https://developer.android.com/reference/android/util/TypedValue#applyDimension(int,%20float,%20android.util.DisplayMetrics)`.

NOTE: It is recommended to use `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` only for 0.
Otherwise, prefer using scalable units like `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP`.
As of Android 17, the `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` values set by this function will be
automatically scaled when the RemoteViews is used on a display with a different density.
.

<br />

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `radius` | `float` <br /> |
| `units` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setViewOutlinePreferredRadiusAttr

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewOutlinePreferredRadiusAttr (int viewId, 
                int attrId)
```

Sets an OutlineProvider on the view whose corner radius is a dimension attribute with
`attrId`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `attrId` | `int` <br /> |

### setViewOutlinePreferredRadiusDimen

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewOutlinePreferredRadiusDimen (int viewId, 
                int resId)
```

Sets an OutlineProvider on the view whose corner radius is a dimension resource with
`resId`.

<br />

| Parameters ||
|---|---|
| `viewId` | `int` <br /> |
| `resId` | `int` <br /> |

### setViewPadding

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewPadding (int viewId, 
                float left, 
                float top, 
                float right, 
                float bottom, 
                int units)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)`. This overload
supports using values with complex units that are resolved when this RemoteViews is
displayed.

Prefer using scalable units like `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP`. As of Android 17,
the `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` values set by this function will be automatically
scaled when the RemoteViews is used on a display with a different density.
.

<br />

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `left` | `float`: the left padding value in the given units <br /> |
| `top` | `float`: the top padding value in the given units <br /> |
| `right` | `float`: the right padding value in the given units <br /> |
| `bottom` | `float`: the bottom padding value in the given units <br /> |
| `units` | `int`: The unit type of the value, e.g. `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |

### setViewPadding

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewPadding (int viewId, 
                int left, 
                int top, 
                int right, 
                int bottom)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)`.

Prefer using the `https://developer.android.com/reference/android/widget/RemoteViews#setViewPadding(int,%20float,%20float,%20float,%20float,%20int)`
overload that accepts scalable units like `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP`. As of Android
17, the pixel values set by this function will be automatically scaled when the RemoteViews
is used on a display with a different density.

<br />

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view to change <br /> |
| `left` | `int`: the left padding in pixels. The units of this value are pixels. <br /> |
| `top` | `int`: the top padding in pixels. The units of this value are pixels. <br /> |
| `right` | `int`: the right padding in pixels. The units of this value are pixels. <br /> |
| `bottom` | `int`: the bottom padding in pixels. The units of this value are pixels. <br /> |

### setViewVisibility

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewVisibility (int viewId, 
                int visibility)
```

Equivalent to calling `https://developer.android.com/reference/android/view/View#setVisibility(int)`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view whose visibility should change <br /> |
| `visibility` | `int`: The new visibility for the view. Value is one of the following: - `https://developer.android.com/reference/android/view/View#VISIBLE` - `https://developer.android.com/reference/android/view/View#INVISIBLE` - `https://developer.android.com/reference/android/view/View#GONE` |

### showNext

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void showNext (int viewId)
```


**This method was deprecated
in API level 33.**   

As RemoteViews may be reapplied frequently, it is preferable to call
`https://developer.android.com/reference/android/widget/RemoteViews#setDisplayedChild(int,%20int)` to ensure that the adapter index does not change
unexpectedly.

Equivalent to calling `https://developer.android.com/reference/android/widget/AdapterViewAnimator#showNext()`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call `https://developer.android.com/reference/android/widget/AdapterViewAnimator#showNext()` <br /> |

### showPrevious

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void showPrevious (int viewId)
```


**This method was deprecated
in API level 33.**   

As RemoteViews may be reapplied frequently, it is preferable to call
`https://developer.android.com/reference/android/widget/RemoteViews#setDisplayedChild(int,%20int)` to ensure that the adapter index does not change
unexpectedly.

Equivalent to calling `https://developer.android.com/reference/android/widget/AdapterViewAnimator#showPrevious()`

<br />

| Parameters ||
|---|---|
| `viewId` | `int`: The id of the view on which to call `https://developer.android.com/reference/android/widget/AdapterViewAnimator#showPrevious()` <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |