Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is markup objects in context of Android Span?

What is markup objects in context of Android Span?

android.text.SpanWatcher

When an object of this type is attached to a Spannable, its methods will be called to notify it that other markup objects have been added, changed, or removed.

What is the mean of markup objects here?

HTML 

HyperText Markup Language

HyperText Hypertext is text which contains links to other texts.

Markup ?

Please let me know what is Markup mean...

EDIT

So the markup object is Span...thanks to pskink

like image 748
Amit Yadav Avatar asked Nov 22 '22 21:11

Amit Yadav


1 Answers

"To style text in Android, use spans! Change the color of a few characters, make them clickable, scale the size of the text or even draw custom bullet points with spans. Spans can change the TextPaint properties, draw on a Canvas, or even change text layout and affect elements like the line height. Spans are markup objects that can be attached to and detached from text; they can be applied to whole paragraphs or to parts of the text."

"Spans allow you to implement multi-style text with finer grained customisation. For example, you can define paragraphs of your text to have a bullet point by applying a BulletSpan."

Source: https://medium.com/androiddevelopers/spantastic-text-styling-with-spans-17b0c16b4568

like image 79
Sher Sanginov Avatar answered Nov 24 '22 12:11

Sher Sanginov