RemoteViews Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A class that describes a view hierarchy that can be displayed in another process.
[Android.Runtime.Register("android/widget/RemoteViews", DoNotGenerateAcw=true)]
public class RemoteViews : Java.Lang.Object, Android.OS.IParcelable, Android.Views.LayoutInflater.IFilter, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/widget/RemoteViews", DoNotGenerateAcw=true)>]
type RemoteViews = class
inherit Object
interface IParcelable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
interface LayoutInflater.IFilter
- Inheritance
- Attributes
- Implements
Remarks
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:
<ul> <li>android.widget.AdapterViewFlipper
</li> <li>android.widget.FrameLayout
</li> <li>android.widget.GridLayout
</li> <li>android.widget.GridView
</li> <li>android.widget.LinearLayout
</li> <li>android.widget.ListView
</li> <li>android.widget.RelativeLayout
</li> <li>android.widget.StackView
</li> <li>android.widget.ViewFlipper
</li> </ul>
And the following widgets:
<ul> <li>android.widget.AnalogClock
</li> <li>android.widget.Button
</li> <li>android.widget.Chronometer
</li> <li>android.widget.ImageButton
</li> <li>android.widget.ImageView
</li> <li>android.widget.ProgressBar
</li> <li>android.widget.TextClock
</li> <li>android.widget.TextView
</li> </ul>
As of API 31, the following widgets and layouts may also be used:
<ul> <li>android.widget.CheckBox
</li> <li>android.widget.RadioButton
</li> <li>android.widget.RadioGroup
</li> <li>android.widget.Switch
</li> </ul>
Descendants of these classes are not supported.
Java documentation for android.widget.RemoteViews
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
RemoteViews(IDictionary<SizeF,RemoteViews>) |
Create a new RemoteViews object that will inflate the layout with the closest size specification. |
RemoteViews(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
RemoteViews(Parcel) |
Reads a RemoteViews object from a parcel. |
RemoteViews(RemoteViews, RemoteViews) |
Create a new RemoteViews object that will inflate as the specified landspace or portrait RemoteViews, depending on the current configuration. |
RemoteViews(RemoteViews) |
Creates a copy of another RemoteViews. |
RemoteViews(String, Int32, Int32) |
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. |
RemoteViews(String, Int32) |
Create a new RemoteViews object that will display the views contained in the specified layout file. |
Fields
ExtraChecked |
The intent extra for whether the view whose checked state changed is currently checked. |
ExtraSharedElementBounds |
The intent extra that contains the bounds for all shared elements. |
MarginBottom |
Obsolete.
The value will apply to the marginBottom. |
MarginEnd |
Obsolete.
The value will apply to the marginEnd. |
MarginLeft |
Obsolete.
The value will apply to the marginLeft. |
MarginRight |
Obsolete.
The value will apply to the marginRight. |
MarginStart |
Obsolete.
The value will apply to the marginStart. |
MarginTop |
Obsolete.
The value will apply to the marginTop. |
Properties
Class |
Returns the runtime class of this |
Creator |
Parcelable. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
LayoutId |
Returns the layout id of the root layout associated with this RemoteViews. |
Package | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ViewId |
Get the ID of the top-level view of the XML layout, if set using
|
Methods
AddStableView(Int32, RemoteViews, Int32) |
Equivalent to calling |
AddView(Int32, RemoteViews) |
Equivalent to calling |
Apply(Context, ViewGroup) |
Inflates the view hierarchy represented by this object and applies all of the actions. |
Clone() |
Returns a deep copy of the RemoteViews object. |
DescribeContents() |
Describe the kinds of special objects contained in this Parcelable's marshalled representation. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
OnLoadClass(Class) |
Used to restrict the views which can be inflated |
Reapply(Context, View) |
Applies all of the actions to the provided view. |
RemoveAllViews(Int32) |
Equivalent to calling |
SetAccessibilityTraversalAfter(Int32, Int32) |
Equivalent to calling |
SetAccessibilityTraversalBefore(Int32, Int32) |
Equivalent to calling |
SetBitmap(Int32, String, Bitmap) |
Call a method taking one Bitmap on a view in the layout for this RemoteViews. |
SetBlendMode(Int32, String, BlendMode) |
Call a method taking one BlendMode on a view in the layout for this RemoteViews. |
SetBoolean(Int32, String, Boolean) |
Call a method taking one boolean on a view in the layout for this RemoteViews. |
SetBundle(Int32, String, Bundle) |
Call a method taking one Bundle on a view in the layout for this RemoteViews. |
SetByte(Int32, String, SByte) |
Call a method taking one byte on a view in the layout for this RemoteViews. |
SetChar(Int32, String, Char) |
Call a method taking one char on a view in the layout for this RemoteViews. |
SetCharSequence(Int32, String, ICharSequence) |
Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
SetCharSequence(Int32, String, Int32) |
Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
SetCharSequence(Int32, String, String) |
Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
SetCharSequenceAttr(Int32, String, Int32) |
Call a method taking one CharSequence on a view in the layout for this RemoteViews. |
SetChronometer(Int32, Int64, String, Boolean) |
Equivalent to calling |
SetChronometerCountDown(Int32, Boolean) |
Equivalent to calling |
SetColor(Int32, String, Int32) |
Call a method taking one int, a color, on a view in the layout for this RemoteViews. |
SetColorAttr(Int32, String, Int32) |
Call a method taking one int, a color, on a view in the layout for this RemoteViews. |
SetColorInt(Int32, String, Int32, Int32) |
Call a method taking one int, a color, on a view in the layout for this RemoteViews. |
SetColorStateList(Int32, String, ColorStateList, ColorStateList) |
Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
SetColorStateList(Int32, String, ColorStateList) |
Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
SetColorStateList(Int32, String, Int32) |
Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
SetColorStateListAttr(Int32, String, Int32) |
Call a method taking one ColorStateList on a view in the layout for this RemoteViews. |
SetCompoundButtonChecked(Int32, Boolean) |
Equivalent to calling |
SetContentDescription(Int32, ICharSequence) |
Equivalent to calling View. |
SetContentDescription(Int32, String) |
Equivalent to calling View. |
SetDisplayedChild(Int32, Int32) |
Equivalent to calling |
SetDouble(Int32, String, Double) |
Call a method taking one double on a view in the layout for this RemoteViews. |
SetEmptyView(Int32, Int32) |
Equivalent to calling |
SetFloat(Int32, String, Single) |
Call a method taking one float on a view in the layout for this RemoteViews. |
SetFloatDimen(Int32, String, Int32) |
Call a method taking one float, a size in pixels, on a view in the layout for this RemoteViews. |
SetFloatDimen(Int32, String, Single, Int32) |
Call a method taking one float, a size in pixels, on a view in the layout for this RemoteViews. |
SetFloatDimenAttr(Int32, String, Int32) |
Call a method taking one float, a size in pixels, on a view in the layout for this RemoteViews. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetIcon(Int32, String, Icon, Icon) |
Call a method taking one Icon on a view in the layout for this RemoteViews. |
SetIcon(Int32, String, Icon) |
Call a method taking one Icon on a view in the layout for this RemoteViews. |
SetImageViewBitmap(Int32, Bitmap) |
Equivalent to calling |
SetImageViewIcon(Int32, Icon) |
Equivalent to calling |
SetImageViewResource(Int32, Int32) |
Equivalent to calling |
SetImageViewUri(Int32, Uri) |
Equivalent to calling |
SetInt(Int32, String, Int32) |
Call a method taking one int on a view in the layout for this RemoteViews. |
SetIntDimen(Int32, String, Int32) |
Call a method taking one int, a size in pixels, on a view in the layout for this RemoteViews. |
SetIntDimen(Int32, String, Single, Int32) |
Call a method taking one int, a size in pixels, on a view in the layout for this RemoteViews. |
SetIntDimenAttr(Int32, String, Int32) |
Call a method taking one int, a size in pixels, on a view in the layout for this RemoteViews. |
SetIntent(Int32, String, Intent) |
Call a method taking one Intent on a view in the layout for this RemoteViews. |
SetLabelFor(Int32, Int32) |
Equivalent to calling |
SetLightBackgroundLayoutId(Int32) |
Provides an alternate layout ID, which can be used to inflate this view. |
SetLong(Int32, String, Int64) |
Call a method taking one long on a view in the layout for this RemoteViews. |
SetOnCheckedChangeResponse(Int32, RemoteViews+RemoteResponse) |
Equivalent to calling
|
SetOnClickFillInIntent(Int32, Intent) |
When using collections (eg. |
SetOnClickPendingIntent(Int32, PendingIntent) |
Equivalent to calling
|
SetOnClickResponse(Int32, RemoteViews+RemoteResponse) |
Equivalent of calling
|
SetPendingIntentTemplate(Int32, PendingIntent) |
When using collections (eg. |
SetProgressBar(Int32, Int32, Int32, Boolean) |
Equivalent to calling
|
SetRadioGroupChecked(Int32, Int32) |
Equivalent to calling |
SetRelativeScrollPosition(Int32, Int32) |
Equivalent to calling |
SetRemoteAdapter(Int32, Int32, Intent) |
Obsolete.
Equivalent to calling |
SetRemoteAdapter(Int32, Intent) |
Equivalent to calling |
SetRemoteAdapter(Int32, RemoteViews+RemoteCollectionItems) |
Equivalent to calling |
SetScrollPosition(Int32, Int32) |
Equivalent to calling |
SetShort(Int32, String, Int16) |
Call a method taking one short on a view in the layout for this RemoteViews. |
SetString(Int32, String, String) |
Call a method taking one String on a view in the layout for this RemoteViews. |
SetTextColor(Int32, Color) |
Equivalent to calling |
SetTextViewCompoundDrawables(Int32, Int32, Int32, Int32, Int32) |
Equivalent to calling
|
SetTextViewCompoundDrawablesRelative(Int32, Int32, Int32, Int32, Int32) |
Equivalent to calling |
SetTextViewText(Int32, ICharSequence) |
Equivalent to calling |
SetTextViewText(Int32, String) |
Equivalent to calling |
SetTextViewTextSize(Int32, Int32, Single) |
Equivalent to calling |
SetUri(Int32, String, Uri) |
Call a method taking one Uri on a view in the layout for this RemoteViews. |
SetViewLayoutHeight(Int32, Single, Int32) |
Equivalent to setting |
SetViewLayoutHeightAttr(Int32, Int32) |
Equivalent to setting |
SetViewLayoutHeightDimen(Int32, Int32) |
Equivalent to setting |
SetViewLayoutMargin(Int32, Int32, Single, Int32) |
Equivalent to calling |
SetViewLayoutMarginAttr(Int32, Int32, Int32) |
Equivalent to calling |
SetViewLayoutMarginDimen(Int32, Int32, Int32) |
Equivalent to calling |
SetViewLayoutWidth(Int32, Single, Int32) |
Equivalent to setting |
SetViewLayoutWidthAttr(Int32, Int32) |
Equivalent to setting |
SetViewLayoutWidthDimen(Int32, Int32) |
Equivalent to setting |
SetViewOutlinePreferredRadius(Int32, Single, Int32) |
Sets an OutlineProvider on the view whose corner radius is a dimension calculated using
|
SetViewOutlinePreferredRadiusAttr(Int32, Int32) |
Sets an OutlineProvider on the view whose corner radius is a dimension attribute with
|
SetViewOutlinePreferredRadiusDimen(Int32, Int32) |
Sets an OutlineProvider on the view whose corner radius is a dimension resource with
|
SetViewPadding(Int32, Int32, Int32, Int32, Int32) |
Equivalent to calling |
SetViewVisibility(Int32, ViewStates) |
Equivalent to calling |
ShowNext(Int32) |
Equivalent to calling |
ShowPrevious(Int32) |
Equivalent to calling |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
WriteToParcel(Parcel, ParcelableWriteFlags) |
Flatten this object in to a Parcel. |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |