RemoteViews.SetIcon 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetIcon(Int32, String, Icon) |
呼叫一個方法,在 RemoteViews 的版面中取一個圖示。 |
| SetIcon(Int32, String, Icon, Icon) |
呼叫一個方法,在 RemoteViews 的版面中取一個圖示。 |
SetIcon(Int32, String, Icon)
呼叫一個方法,在 RemoteViews 的版面中取一個圖示。
[Android.Runtime.Register("setIcon", "(ILjava/lang/String;Landroid/graphics/drawable/Icon;)V", "GetSetIcon_ILjava_lang_String_Landroid_graphics_drawable_Icon_Handler", ApiSince=23)]
public virtual void SetIcon(int viewId, string? methodName, Android.Graphics.Drawables.Icon? value);
[<Android.Runtime.Register("setIcon", "(ILjava/lang/String;Landroid/graphics/drawable/Icon;)V", "GetSetIcon_ILjava_lang_String_Landroid_graphics_drawable_Icon_Handler", ApiSince=23)>]
abstract member SetIcon : int * string * Android.Graphics.Drawables.Icon -> unit
override this.SetIcon : int * string * Android.Graphics.Drawables.Icon -> unit
參數
- viewId
- Int32
就是用來呼叫該方法的視圖的 ID。
- methodName
- String
呼叫的方法名稱。
- value
- Icon
然後 android.graphics.drawable.Icon 通過這個方法。
- 屬性
備註
Java 文件 android.widget.RemoteViews.setIcon(int, java.lang.String, android.graphics.drawable.Icon)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
SetIcon(Int32, String, Icon, Icon)
呼叫一個方法,在 RemoteViews 的版面中取一個圖示。
[Android.Runtime.Register("setIcon", "(ILjava/lang/String;Landroid/graphics/drawable/Icon;Landroid/graphics/drawable/Icon;)V", "GetSetIcon_ILjava_lang_String_Landroid_graphics_drawable_Icon_Landroid_graphics_drawable_Icon_Handler", ApiSince=31)]
public virtual void SetIcon(int viewId, string methodName, Android.Graphics.Drawables.Icon? notNight, Android.Graphics.Drawables.Icon? night);
[<Android.Runtime.Register("setIcon", "(ILjava/lang/String;Landroid/graphics/drawable/Icon;Landroid/graphics/drawable/Icon;)V", "GetSetIcon_ILjava_lang_String_Landroid_graphics_drawable_Icon_Landroid_graphics_drawable_Icon_Handler", ApiSince=31)>]
abstract member SetIcon : int * string * Android.Graphics.Drawables.Icon * Android.Graphics.Drawables.Icon -> unit
override this.SetIcon : int * string * Android.Graphics.Drawables.Icon * Android.Graphics.Drawables.Icon -> unit
參數
- viewId
- Int32
就是用來呼叫該方法的視圖的 ID。
- methodName
- String
呼叫的方法名稱。
- notNight
- Icon
當視圖設定為 時,要傳遞給方法的值 Configuration#UI_MODE_NIGHT_NO
- night
- Icon
當視圖設定為 時,要傳遞給方法的值 Configuration#UI_MODE_NIGHT_YES
- 屬性
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。