共用方式為


RemoteViews 類別

定義

類別,描述可在另一個進程中顯示的檢視階層。

[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
繼承
RemoteViews
屬性
實作

備註

類別,描述可在另一個進程中顯示的檢視階層。 階層會從版面配置資源檔擴充,而這個類別會提供一些基本作業來修改擴充階層的內容。

RemoteViews 只限於支援下列版面配置:

<ul><li>android.widget.AdapterViewFlipper</li>>android.widget.FrameLayout<< li/android.widget.GridLayout><><li li/<><><>android.widget.LinearLayout<><android.widget.GridView<>android.widget.ListView>li/li li/>android.widget.RelativeLayout><<>><android.widget.StackViewandroid.widget.ViewFlipper><><<li li/ul><>

以及下列小工具:

<ul><li>android.widget.AnalogClock</li>><android.widget.Button< li/li><<>android.widget.Chronometer li/><<android.widget.ImageButton>li li/li>android.widget.ProgressBar<>android.widget.ImageView<<<>> li/ul><>android.widget.TextClock<><>android.widget.TextView<><>

從 API 31 開始,也可以使用下列小工具與版面配置:

<ul><li>android.widget.CheckBox</li><<>android.widget.RadioButton li/li><android.widget.RadioGroup<> li/li>android.widget.Switch><</li/li></ul>

不支援這些類別的子系。

android.widget.RemoteViewsJava 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

建構函式

RemoteViews(IDictionary<SizeF,RemoteViews>)

建立新的 RemoteViews 物件,以最接近的大小規格擴充版面配置。

RemoteViews(IntPtr, JniHandleOwnership)

建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。

RemoteViews(Parcel)

從包裹讀取 RemoteViews 物件。

RemoteViews(RemoteViews)

建立另一個 RemoteViews 的複本。

RemoteViews(RemoteViews, RemoteViews)

根據目前的組態,建立新的 RemoteViews 物件,以擴充為指定的登陸空間或直向 RemoteViews。

RemoteViews(String, Int32)

建立新的 RemoteViews 物件,以顯示指定版面配置檔中包含的檢視。

RemoteViews(String, Int32, Int32)

建立新的 RemoteViews 物件,以顯示包含在指定版面配置檔案中的檢視,並將根檢視的標識碼變更為指定的檢視。

欄位

ExtraChecked

目前檢查其檢查狀態變更的檢視是否為額外意圖。

ExtraSharedElementBounds

包含所有共用元素界限的額外意圖。

MarginBottom
已淘汰.

此值會套用至 marginBottom。

MarginEnd
已淘汰.

此值會套用至 marginEnd。

MarginLeft
已淘汰.

此值會套用至 marginLeft。

MarginRight
已淘汰.

值會套用至 marginRight。

MarginStart
已淘汰.

此值會套用至 marginStart。

MarginTop
已淘汰.

此值會套用至 marginTop。

屬性

Class

傳回這個 Object的運行時間類別。

(繼承來源 Object)
Creator

可包裹。

Handle

基礎Android實例的句柄。

(繼承來源 Object)
JniIdentityHashCode

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
JniPeerMembers

類別,描述可在另一個進程中顯示的檢視階層。

LayoutId

傳回與此 RemoteViews 相關聯的根配置標識碼。

Package
PeerReference

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
ThresholdClass

此 API 支援適用於 Android 的 Mono 基礎結構,並不適合直接從您的程式代碼使用。

ThresholdType

此 API 支援適用於 Android 的 Mono 基礎結構,並不適合直接從您的程式代碼使用。

ViewId

如果使用 設定 RemoteViews#RemoteViews(String, int, int),取得 XML 配置的最上層檢視標識碼。

方法

AddStableView(Int32, RemoteViews, Int32)

相當於在擴充指定的 RemoteViews之後呼叫 ViewGroup#addView(View)

AddView(Int32, RemoteViews)

相當於在擴充指定的 RemoteViews之後呼叫 ViewGroup#addView(View)

Apply(Context, ViewGroup)

擴充這個 物件所代表的檢視階層,並套用所有動作。

Clone()

會傳回 RemoteViews 物件的深層複本。

DescribeContents()

描述此 Parcelable 封送處理表示中包含的特殊物件種類。

Dispose()

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
Dispose(Boolean)

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
Equals(Object)

指出其他物件是否「等於」這個物件。

(繼承來源 Object)
GetHashCode()

傳回此物件的雜湊碼值。

(繼承來源 Object)
JavaFinalize()

當垃圾收集決定不再參考物件時,垃圾收集行程在 物件上呼叫。

(繼承來源 Object)
Notify()

喚醒正在等候此物件監視器的單一線程。

(繼承來源 Object)
NotifyAll()

喚醒正在等候此物件監視器的所有線程。

(繼承來源 Object)
OnLoadClass(Class)

用來限制可擴充的檢視

Reapply(Context, View)

將所有動作套用至提供的檢視。

RemoveAllViews(Int32)

相當於通話 ViewGroup#removeAllViews()

SetAccessibilityTraversalAfter(Int32, Int32)

相當於通話 android.view.View#setAccessibilityTraversalAfter(int)

SetAccessibilityTraversalBefore(Int32, Int32)

相當於通話 android.view.View#setAccessibilityTraversalBefore(int)

SetBitmap(Int32, String, Bitmap)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個點陣圖的方法。

SetBlendMode(Int32, String, BlendMode)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 BlendMode 的方法。

SetBoolean(Int32, String, Boolean)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個布爾值的方法。

SetBundle(Int32, String, Bundle)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個套件組合的方法。

SetByte(Int32, String, SByte)

在此 RemoteViews 的版面配置中,呼叫在檢視上採用一個字節的方法。

SetChar(Int32, String, Char)

在此 RemoteViews 的版面配置中,呼叫在檢視上採用一個字元的方法。

SetCharSequence(Int32, String, ICharSequence)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 CharSequence 的方法。

SetCharSequence(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 CharSequence 的方法。

SetCharSequence(Int32, String, String)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 CharSequence 的方法。

SetCharSequenceAttr(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 CharSequence 的方法。

SetChronometer(Int32, Int64, String, Boolean)

相當於通叫 Chronometer#setBase Chronometer.setBaseChronometer#setFormat Chronometer.setFormatChronometer#start Chronometer.start()Chronometer#stop Chronometer.stop()

SetChronometerCountDown(Int32, Boolean)

相當於指定的 viewId 在計時計上呼叫 Chronometer#setCountDown(boolean) Chronometer.setCountDown

SetColor(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫採用一個 int、色彩的方法。

SetColorAttr(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫採用一個 int、色彩的方法。

SetColorInt(Int32, String, Int32, Int32)

在此 RemoteViews 的版面配置中,呼叫採用一個 int、色彩的方法。

SetColorStateList(Int32, String, ColorStateList)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 ColorStateList 的方法。

SetColorStateList(Int32, String, ColorStateList, ColorStateList)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 ColorStateList 的方法。

SetColorStateList(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 ColorStateList 的方法。

SetColorStateListAttr(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 ColorStateList 的方法。

SetCompoundButtonChecked(Int32, Boolean)

相當於通話 android.widget.CompoundButton#setChecked(boolean)

SetContentDescription(Int32, ICharSequence)

相當於呼叫 View。

SetContentDescription(Int32, String)

相當於呼叫 View。

SetDisplayedChild(Int32, Int32)

相當於呼叫 AdapterViewAnimator#setDisplayedChild(int)

SetDouble(Int32, String, Double)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一倍的方法。

SetEmptyView(Int32, Int32)

相當於呼叫 AdapterView#setEmptyView(View)

SetFloat(Int32, String, Single)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個浮點數的方法。

SetFloatDimen(Int32, String, Int32)

在這個 RemoteViews 的版面配置中,呼叫採用一個浮點數、以像素為單位的大小的方法。

SetFloatDimen(Int32, String, Single, Int32)

在這個 RemoteViews 的版面配置中,呼叫採用一個浮點數、以像素為單位的大小的方法。

SetFloatDimenAttr(Int32, String, Int32)

在這個 RemoteViews 的版面配置中,呼叫採用一個浮點數、以像素為單位的大小的方法。

SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
SetIcon(Int32, String, Icon)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個圖示的方法。

SetIcon(Int32, String, Icon, Icon)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個圖示的方法。

SetImageViewBitmap(Int32, Bitmap)

相當於呼叫 ImageView#setImageBitmap(Bitmap)

SetImageViewIcon(Int32, Icon)

相當於呼叫 ImageView#setImageIcon(Icon)

SetImageViewResource(Int32, Int32)

相當於呼叫 ImageView#setImageResource(int)

SetImageViewUri(Int32, Uri)

相當於呼叫 ImageView#setImageURI(Uri)

SetInt(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 int 的方法。

SetIntDimen(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫採用一個 int、以圖元為單位大小的方法。

SetIntDimen(Int32, String, Single, Int32)

在此 RemoteViews 的版面配置中,呼叫採用一個 int、以圖元為單位大小的方法。

SetIntDimenAttr(Int32, String, Int32)

在此 RemoteViews 的版面配置中,呼叫採用一個 int、以圖元為單位大小的方法。

SetIntent(Int32, String, Intent)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個意圖的方法。

SetLabelFor(Int32, Int32)

相當於通話 View#setLabelFor(int)

SetLightBackgroundLayoutId(Int32)

提供替代的版面配置標識碼,可用來擴充此檢視。

SetLong(Int32, String, Int64)

呼叫方法,此 RemoteViews 的版面配置中檢視需要一段長的時間。

SetOnCheckedChangeResponse(Int32, RemoteViews+RemoteResponse)

相當於呼叫 android.widget.CompoundButton#setOnCheckedChangeListener( android.widget.CompoundButton.OnCheckedChangeListener) 以啟動提供的 RemoteResponse

SetOnClickFillInIntent(Int32, Intent)

使用集合時(例如

SetOnClickPendingIntent(Int32, PendingIntent)

相當於呼叫 android.view.View#setOnClickListener(android.view.View.OnClickListener) 以啟動提供的 PendingIntent

SetOnClickResponse(Int32, RemoteViews+RemoteResponse)

對等呼叫 android.view.View#setOnClickListener(android.view.View.OnClickListener) 以啟動提供的 RemoteResponse

SetPendingIntentTemplate(Int32, PendingIntent)

使用集合時(例如

SetProgressBar(Int32, Int32, Int32, Boolean)

相當於呼叫 ProgressBar#setMax ProgressBar.setMaxProgressBar#setProgress ProgressBar.setProgressProgressBar#setIndeterminate ProgressBar.setIndeterminate

        If indeterminate is true, then the values for max and progress are ignored.
SetRadioGroupChecked(Int32, Int32)

相當於通話 android.widget.RadioGroup#check(int)

SetRelativeScrollPosition(Int32, Int32)

相當於通話 ListView#smoothScrollByOffset(int)

SetRemoteAdapter(Int32, Int32, Intent)
已淘汰.

相當於通話 android.widget.AbsListView#setRemoteViewsAdapter(Intent)

SetRemoteAdapter(Int32, Intent)

相當於通話 android.widget.AbsListView#setRemoteViewsAdapter(Intent)

SetRemoteAdapter(Int32, RemoteViews+RemoteCollectionItems)

相當於通話 android.widget.AbsListView#setRemoteViewsAdapter(Intent)

SetScrollPosition(Int32, Int32)

相當於通話 ListView#smoothScrollToPosition(int)

SetShort(Int32, String, Int16)

在此 RemoteViews 的版面配置中呼叫一個簡短檢視的方法。

SetString(Int32, String, String)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 String 的方法。

SetTextColor(Int32, Color)

相當於通話 android.widget.TextView#setTextColor(int)

SetTextViewCompoundDrawables(Int32, Int32, Int32, Int32, Int32)

相當於通話 TextView#setCompoundDrawablesWithIntrinsicBounds(int, int, int, int)

SetTextViewCompoundDrawablesRelative(Int32, Int32, Int32, Int32, Int32)

相當於通話 TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(int, int, int, int)

SetTextViewText(Int32, ICharSequence)

相當於呼叫 TextView#setText(CharSequence)

SetTextViewText(Int32, String)

相當於呼叫 TextView#setText(CharSequence)

SetTextViewTextSize(Int32, Int32, Single)

相當於呼叫 TextView#setTextSize(int, float)

SetUri(Int32, String, Uri)

在此 RemoteViews 的版面配置中,呼叫在檢視上取得一個 URI 的方法。

SetViewLayoutHeight(Int32, Single, Int32)

相當於設定 android.view.ViewGroup.LayoutParams#height ,不同之處在於您可以在任何維度單位中提供值。

SetViewLayoutHeightAttr(Int32, Int32)

相當於使用目前主題中指定屬性的值進行設定 android.view.ViewGroup.LayoutParams#height

SetViewLayoutHeightDimen(Int32, Int32)

相當於使用 的結果Resources#getDimensionPixelSize(int)進行設定android.view.ViewGroup.LayoutParams#height

SetViewLayoutMargin(Int32, Int32, Single, Int32)

相當於通話 MarginLayoutParams#setMarginEnd

SetViewLayoutMarginAttr(Int32, Int32, Int32)

相當於通話 MarginLayoutParams#setMarginEnd

SetViewLayoutMarginDimen(Int32, Int32, Int32)

相當於通話 MarginLayoutParams#setMarginEnd

SetViewLayoutWidth(Int32, Single, Int32)

相當於設定 android.view.ViewGroup.LayoutParams#width ,不同之處在於您可以在任何維度單位中提供值。

SetViewLayoutWidthAttr(Int32, Int32)

相當於使用目前主題中指定屬性的值進行設定 android.view.ViewGroup.LayoutParams#width

SetViewLayoutWidthDimen(Int32, Int32)

相當於使用 的結果Resources#getDimensionPixelSize(int)進行設定android.view.ViewGroup.LayoutParams#width

SetViewOutlinePreferredRadius(Int32, Single, Int32)

在檢視上設定 OutlineProvider,其邊角半徑是使用 TypedValue#applyDimension(int, float, DisplayMetrics)計算的維度。

SetViewOutlinePreferredRadiusAttr(Int32, Int32)

在檢視上設定 OutlineProvider,其邊角半徑是具有 attrId的維度屬性。

SetViewOutlinePreferredRadiusDimen(Int32, Int32)

在檢視上設定 OutlineProvider,其邊角半徑是具有 resId的維度資源。

SetViewPadding(Int32, Int32, Int32, Int32, Int32)

相當於通話 android.view.View#setPadding(int, int, int, int)

SetViewVisibility(Int32, ViewStates)

相當於呼叫 View#setVisibility(int)

ShowNext(Int32)

相當於呼叫 AdapterViewAnimator#showNext()

ShowPrevious(Int32)

相當於呼叫 AdapterViewAnimator#showPrevious()

ToArray<T>()

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
ToString()

傳回物件的字串表示。

(繼承來源 Object)
UnregisterFromRuntime()

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
Wait()

讓目前線程等候直到喚醒為止,通常是藉由em <notified/em>或<em>interrupted</em> 來喚醒它。<>

(繼承來源 Object)
Wait(Int64)

讓目前的線程等到喚醒為止,通常是因為 <em>notified</em> 或 <em>interrupted</em>,或直到經過一定數量的實時為止。

(繼承來源 Object)
Wait(Int64, Int32)

讓目前的線程等到喚醒為止,通常是因為 <em>notified</em> 或 <em>interrupted</em>,或直到經過一定數量的實時為止。

(繼承來源 Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

將中的這個物件扁平化為 Parcel。

明確介面實作

IJavaPeerable.Disposed()

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
IJavaPeerable.DisposeUnlessReferenced()

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
IJavaPeerable.Finalized()

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
IJavaPeerable.JniManagedPeerState

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

類別,描述可在另一個進程中顯示的檢視階層。

(繼承來源 Object)

擴充方法

JavaCast<TResult>(IJavaObject)

執行 Android 執行時間檢查的類型轉換。

JavaCast<TResult>(IJavaObject)

類別,描述可在另一個進程中顯示的檢視階層。

GetJniTypeName(IJavaPeerable)

類別,描述可在另一個進程中顯示的檢視階層。

適用於