spanned Questions

2

I am trying to set span on a SpannableStringBuilder using flag SPAN_EXCLUSIVE_EXCLUSIVE and I am facing problem on further editing the text to which I am setting span. Expected behaviour 1: Origin...
Wellread asked 22/5, 2017 at 6:14

7

Solved

I want to save a Spanned object persistently. (I'm saving the String it's based on persistently now, but it takes over 1 second to run Html.fromHtml() on it, noticeably slowing the UI.) I see thin...
Bearden asked 12/5, 2012 at 18:50

2

Solved

Is there any way to use spanned colors directly from a string without using any Java/Kotlin code? For example to bold text I can use "<b> $someString </b>" But what is the way...
Postmaster asked 6/7, 2020 at 16:32

3

Solved

i have 3 strings localizations <string name="tests" formatted="true">Test<annotation font="bold"> testBold %1$s</annotation> end</string> <string name="tests" formatted=...
Stephanystephen asked 9/8, 2018 at 8:21

1

I am receiving error reports in Crashlytics for NPEs in SpannableStringInternal but could not reproduce the issue on any phone or determine the source of it. I'm calling for the Internet to help me...
Noun asked 29/11, 2017 at 14:45

4

Solved

Background I'm trying to use a simple SpannableString on a TextView, based on an UnderDotSpan class I've found (here). The original UnderDotSpan just puts a dot of a specific size and color below...
Vendible asked 25/12, 2017 at 10:34

1

Solved

How can I check if two Spanned objects are equal (they have the same content and spans applied)? I rather not implement the equals(Spanned span) method. :)
Expunge asked 17/10, 2013 at 9:29

1

Solved

If I have a SpannedString (or SpannableString) like this SpannableString spannableString = new SpannableString("Hello World!"); ForegroundColorSpan foregroundSpan = new ForegroundColorSpan(Color...
Marilyn asked 7/4, 2017 at 5:49

1

Solved

I have used this StyleSpanRemover to remove style from selected text, but i have a problem. I want to have a bold button that toggle bold style of selected text. it means if the selected text (or ...
Maniacal asked 30/3, 2016 at 11:25

1

Solved

I need to design an editor for my project that allow user to style some part of the text. I have used an EditText and bold selected text by adding following codes in onClickListener of a button. S...
Souvaine asked 29/3, 2016 at 17:15

4

Solved

I am trying to place html into a TextView. Everything works perfectly, this is my code. String htmlTxt = "<p>Hellllo</p>"; // the html is form an API Spanned html = Html.fromHtml(htmlT...
Boer asked 6/3, 2012 at 18:6

5

Solved

I'm trying to load a block of HTML into a TextView, including images, using URLImageParser p = new URLImageParser(articleBody, this); Spanned htmlSpan = Html.fromHtml(parsedString, p, null); pa...
Redintegrate asked 24/10, 2011 at 0:28

3

Solved

I use the same title with this question, because I think my question is very similar to that one, I read and tested the accepted answer very carefully, however the accepted answer doesn't work for ...

1

Solved

Everytime Edittext onAfterTextChange method, i check if some special string(which comes from functionlist variable) is entered then change that string's special color. Code is below for(String s:...
Serrulation asked 21/12, 2014 at 18:54

1

I use the following code to sift through a Spanned String saving all bold text as a string in an array: StyleSpan[] spans = storyText.getSpans(0, storyText.length(), StyleSpan.class); List<Str...
Deltoro asked 2/8, 2014 at 17:39

2

I have an EditText I want to zoom it, and scroll with setScaleX/setScaleY and it works fine - text is being edited in the right position. But when I try to select text - it draws selection handle...
Hampshire asked 5/3, 2014 at 14:57

2

Solved

I have been reading up on the docs for the Spanned/Spannable class for a project that I am working on. I have been puzzled by the definition and usage of the spans that contain MARK and POINT. A M...
Harem asked 13/5, 2013 at 21:35

1

I have a spanned text that I need to cast to Spannable. Thats what I try to do in my code: Spannable buffer = (Spannable) text; This code is giving me a "can't cast Spannable to Spanned". Is it pos...
Dufour asked 2/7, 2013 at 7:18

2

Solved

My empirical experiment shows that if I setSpan(o, start, end) from start to end of a string, where end is String.length() - 1, the last character isn't covered. When I changed end to exactly Stri...
Artless asked 11/5, 2011 at 18:38
1

© 2022 - 2024 — McMap. All rights reserved.