다음을 통해 공유


AttributedString.AddAttribute Method

Definition

Overloads

AddAttribute(AttributedCharacterIteratorAttribute, Object)

Adds an attribute to the entire string.

AddAttribute(AttributedCharacterIteratorAttribute, Object, Int32, Int32)

Adds an attribute to the entire string.

AddAttribute(AttributedCharacterIteratorAttribute, Object)

Adds an attribute to the entire string.

[Android.Runtime.Register("addAttribute", "(Ljava/text/AttributedCharacterIterator$Attribute;Ljava/lang/Object;)V", "GetAddAttribute_Ljava_text_AttributedCharacterIterator_Attribute_Ljava_lang_Object_Handler")]
public virtual void AddAttribute (Java.Text.AttributedCharacterIteratorAttribute? attribute, Java.Lang.Object? value);
[<Android.Runtime.Register("addAttribute", "(Ljava/text/AttributedCharacterIterator$Attribute;Ljava/lang/Object;)V", "GetAddAttribute_Ljava_text_AttributedCharacterIterator_Attribute_Ljava_lang_Object_Handler")>]
abstract member AddAttribute : Java.Text.AttributedCharacterIteratorAttribute * Java.Lang.Object -> unit
override this.AddAttribute : Java.Text.AttributedCharacterIteratorAttribute * Java.Lang.Object -> unit

Parameters

attribute
AttributedCharacterIteratorAttribute

the attribute key

value
Object

the value of the attribute; may be null

Attributes

Exceptions

if the length of this attributed string is 0.

if attribute is null.

Remarks

Java documentation for java.text.AttributedString.addAttribute(java.text.Attribute, java.lang.Object).

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

AddAttribute(AttributedCharacterIteratorAttribute, Object, Int32, Int32)

Adds an attribute to the entire string.

[Android.Runtime.Register("addAttribute", "(Ljava/text/AttributedCharacterIterator$Attribute;Ljava/lang/Object;II)V", "GetAddAttribute_Ljava_text_AttributedCharacterIterator_Attribute_Ljava_lang_Object_IIHandler")]
public virtual void AddAttribute (Java.Text.AttributedCharacterIteratorAttribute? attribute, Java.Lang.Object? value, int beginIndex, int endIndex);
[<Android.Runtime.Register("addAttribute", "(Ljava/text/AttributedCharacterIterator$Attribute;Ljava/lang/Object;II)V", "GetAddAttribute_Ljava_text_AttributedCharacterIterator_Attribute_Ljava_lang_Object_IIHandler")>]
abstract member AddAttribute : Java.Text.AttributedCharacterIteratorAttribute * Java.Lang.Object * int * int -> unit
override this.AddAttribute : Java.Text.AttributedCharacterIteratorAttribute * Java.Lang.Object * int * int -> unit

Parameters

attribute
AttributedCharacterIteratorAttribute

the attribute key

value
Object

the value of the attribute; may be null

beginIndex
Int32
endIndex
Int32
Attributes

Exceptions

if start , end is greater than the length of this string, or if start >= end.

if attribute is null.

Remarks

Java documentation for java.text.AttributedString.addAttribute(java.text.Attribute, java.lang.Object).

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