TextView.SetTextColor Method

Definition

Overloads

SetTextColor(ColorStateList)

Sets the text color.

SetTextColor(Color)

Sets the text color for all the states (normal, selected, focused) to be this color.

SetTextColor(ColorStateList)

Sets the text color.

[Android.Runtime.Register("setTextColor", "(Landroid/content/res/ColorStateList;)V", "GetSetTextColor_Landroid_content_res_ColorStateList_Handler")]
public virtual void SetTextColor (Android.Content.Res.ColorStateList? colors);

Parameters

Attributes

Remarks

Sets the text color.

Java documentation for android.widget.TextView.setTextColor(android.content.res.ColorStateList).

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.

See also

Applies to

.NET for Android .NET for Android API 35 i .NET for Android .NET for Android API 34
Produkt Wersje
.NET for Android .NET for Android API 34, .NET for Android API 35

SetTextColor(Color)

Sets the text color for all the states (normal, selected, focused) to be this color.

[Android.Runtime.Register("setTextColor", "(I)V", "GetSetTextColor_IHandler")]
public virtual void SetTextColor (Android.Graphics.Color color);

Parameters

color
Color

A color value in the form 0xAARRGGBB. Do not pass a resource ID. To get a color value from a resource ID, call androidx.core.content.ContextCompat#getColor(Context, int) getColor.

Attributes

Remarks

Sets the text color for all the states (normal, selected, focused) to be this color.

Java documentation for android.widget.TextView.setTextColor(int).

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.

See also

Applies to

.NET for Android .NET for Android API 35 i .NET for Android .NET for Android API 34
Produkt Wersje
.NET for Android .NET for Android API 34, .NET for Android API 35