spannable Questions
1
I have a SearchView within a Toolbar, that sits up above a RecyclerView list of CardViews. The SearchView works correctly to filter the list based on text inputs. However, the code in the ListAdapt...
Merlinmerlina asked 1/10, 2024 at 1:56
19
I have as string from an outside source that contains HTML tags in this format:
"Hello, I am <b> bold</b> text"
Before Compose I would have CDATA at the start of my HTML Strin...
Histaminase asked 5/3, 2021 at 15:0
12
Solved
I have an ImageSpan inside of a piece of text. What I've noticed is that the surrounding text is always drawn at the bottom of the text line -- to be more precise, the size of the text line grows w...
2
I have a String with multiple Links. I am using SpannableText and It is working perfect except accessibility talk back.
Is there any way to give accessibility to Links?
6
Solved
Suppose you have the following string:
String s = "The cold hand reaches for the %1$s %2$s Ellesse's";
String old = "old";
String tan = "tan";
String formatted = String.format(s,old,tan); //"The...
Pilpul asked 5/1, 2014 at 17:41
5
Solved
I was trying to do something similar to Instagram below -
But i want this curves like Instagram -
Now i am stuck in one more problem -
When i types,. text does not goes automatically to next...
Verbosity asked 4/1, 2018 at 13:50
4
Solved
i am working on an app in which user choose an image from gallery and it will be added in editText, now i want if user click on image in editText it should open in fullScreen, i used below code :-
...
Rakish asked 16/8, 2015 at 21:34
1
Solved
As we know, AnnotatedString in JetpackCompose has provided some API of Android's SpannedString.
but I didn't find any way/workaround to inline ImageSpan to a Text (except using AndroidView)
Delve asked 22/11, 2021 at 14:51
3
Solved
I am looking for an example of how to build and display Android SpannableString with ImageSpan. Something like inline display of smileys.
Thanks a lot.
10
Solved
I have Spannable object which I want to set its font by a custom font I have loaded before.
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/font_Name.ttf");
Spannable span1 = /*Spannabl...
Malda asked 7/7, 2011 at 14:34
5
Solved
I divide a spannable object into 3 parts, do different operations, and then I need to merge them.
Spannable str = editText.getText();
Spannable selectionSpannable = new SpannableStringBuilder(str,...
Uchida asked 5/1, 2011 at 15:10
6
I am using this code to remove formatting of a spannable text from start till end. The problem is that it is working successfully, but the last character in the text is still bold (or italics/under...
10
Solved
I have a Spannable Object with a Clickable Object set to it. When the Spannable String is displayed in the TextView it has blue text and a blue underline (indicating to the user that this Text is C...
4
Solved
I'm setting Span to part of the text. Span itself works well. However, the text is created by String.format from Resources and I do not know start and end of part in the text I'm going to set Span ...
3
Solved
Tweet o = tweets.get(position);
TextView tt = (TextView) v.findViewById(R.id.toptext);
//TextView bt = (TextView) v.findViewById(R.id.bottomtext);
EditText bt =(EditText)findViewById(R.id.bottom...
1
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 o...
1
I've got an EditText that can have custom spans and I don't want them to be part of the spell check. I know I could use the flag android:inputType=textNoSuggestions to completely disable the sugges...
Mastership asked 14/10, 2014 at 12:29
4
Solved
SpannableStringBuilder sb = new SpannableStringBuilder("Hello World");
ForegroundColorSpan fcs = new ForegroundColorSpan(R.color.text_blue);
sb.setSpan(fcs, 5, 11,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE...
3
Solved
I got a edittext and it has multiple coloured text like that code below. Is there any way to store text and colours and show them again? I used to use SharedPreference to store strings integers etc...
Hardden asked 29/1, 2014 at 23:7
2
I'd like to have Spannable that looks like error in IDEs - underline with another color.
I've tried to create ColorUnderlineSpan class that extends android UnderlineSpan, but it makes all the text...
Didache asked 14/11, 2013 at 11:54
4
Solved
Background
The support library (docs here) allows you to use TTF fonts files in the "res/font" folder, either in XML :
app:fontFamily="@font/lato_black"
or via code:
val typeface = ResourcesC...
Woodenhead asked 26/4, 2018 at 12:59
3
I am building a rich text editor.
I have implemented text formatting like bold italic etc and also paragraph formatting like blockQuote. Now I would like to add images in editor and text should wr...
Fillagree asked 20/3, 2018 at 16:40
1
I set span for spannableText and set it to TextView. After i want get width and height of this text. But the result does not take into account the change in the size of the text due to the set span...
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...
3
Solved
Is this possible to set different textSize in one TextView? I know that I can change text style using:
TextView textView = (TextView) findViewById(R.id.textView);
Spannable span = new SpannableStr...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.