Resources.GetColor Resources.GetColor Method

Definition

Overloads

GetColor(Int32) GetColor(Int32)

Returns a color integer associated with a particular resource ID.

GetColor(Int32, Resources+Theme) GetColor(Int32, Resources+Theme)

GetColor(Int32) GetColor(Int32)

Warning

This API is now obsolete.

Returns a color integer associated with a particular resource ID.

[Android.Runtime.Register("getColor", "(I)I", "GetGetColor_IHandler")]
[System.Obsolete("deprecated")]
public virtual Android.Graphics.Color GetColor (int id);
abstract member GetColor : int -> Android.Graphics.Color
override this.GetColor : int -> Android.Graphics.Color

Parameters

id
Int32 Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns

Exceptions

Throws NotFoundException if the given ID does not exist.

Remarks

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.

GetColor(Int32, Resources+Theme) GetColor(Int32, Resources+Theme)

[Android.Runtime.Register("getColor", "(ILandroid/content/res/Resources$Theme;)I", "GetGetColor_ILandroid_content_res_Resources_Theme_Handler", ApiSince=23)]
public virtual Android.Graphics.Color GetColor (int id, Android.Content.Res.Resources.Theme theme);
abstract member GetColor : int * Android.Content.Res.Resources.Theme -> Android.Graphics.Color
override this.GetColor : int * Android.Content.Res.Resources.Theme -> Android.Graphics.Color

Parameters

Returns

Remarks

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