次の方法で共有


AppWidgetHostView.SetColorResources(SparseIntArray) Method

Definition

Set the dynamically overloaded color resources.

[Android.Runtime.Register("setColorResources", "(Landroid/util/SparseIntArray;)V", "GetSetColorResources_Landroid_util_SparseIntArray_Handler", ApiSince=31)]
public virtual void SetColorResources (Android.Util.SparseIntArray colorMapping);
[<Android.Runtime.Register("setColorResources", "(Landroid/util/SparseIntArray;)V", "GetSetColorResources_Landroid_util_SparseIntArray_Handler", ApiSince=31)>]
abstract member SetColorResources : Android.Util.SparseIntArray -> unit
override this.SetColorResources : Android.Util.SparseIntArray -> unit

Parameters

colorMapping
SparseIntArray
Attributes

Remarks

Set the dynamically overloaded color resources.

colorMapping maps a predefined set of color resources to their ARGB representation. Any entry not in the predefined set of colors will be ignored.

Calling this method will trigger a full re-inflation of the App Widget.

The color resources that can be overloaded are the ones whose name is prefixed with system_neutral or system_accent, for example android.R.color#system_neutral1_500.

Java documentation for android.appwidget.AppWidgetHostView.setColorResources(android.util.SparseIntArray).

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.

Applies to