Questions tagged [spannable]

An Android Spannable is an interface for text to which markup objects can be applied.

302 questions
1
vote
2 answers

is Spannable text customizable? Android

String aux = getInserzionista(offerta.getIdInserzionista()); sotto_titolo.setText("Offerta dal " + aux); int inizio = 12; int fine = 11+aux.length(); sotto_titolo.setMovementMethod(LinkMovementMethod.getInstance()); …
Andrea
  • 57
  • 2
  • 8
1
vote
2 answers

Converting a symbol to HTML entity code in Android

Are there any classes that can take a symbol in a string that is typed in an editText box and replace it with the HTML entity code? Not take the HTML entity code and display the symbol. For example: if a string is "2∏" is there anything prebuilt…
ControlAltDelete
  • 3,576
  • 5
  • 32
  • 50
1
vote
0 answers

How to Make Text in a TextSwitcher Fade In Not All Aogether?

I'm trying to create an android program that features text fading in but not all at the same time. For example, I want the sentence "The boy is tall" to fade in first with "the boy" and then have "is tall" fade in next to that. I've been working…
1
vote
1 answer

Application stopped unexpectedly: Fatal Exception: MAIN

I want to use Spannanle. below is my activity file: package com.Myapp; import android.app.Activity; import android.graphics.Color; import android.graphics.Typeface; import android.os.Bundle; import android.text.Spannable; import…
gsb
  • 5,520
  • 8
  • 49
  • 76
0
votes
1 answer

Build text wth image inside in Xamarin.Forms

I am trying to build a text, that contains a .png inside. To be more clear I want something like this: "text text text image text text text" I tried using StackLayout or Grid, but it does't help because the text is too long and it goes over more…
0
votes
0 answers

android Editable remove span when user edits text the span is for

I have a MultiAutoCompleteTextView which presents a popup list when the user enters @ and a character. When the user enters characters, the list will contain any of my test strings that matches the characters entered. When the user selects an item…
se22as
  • 2,282
  • 5
  • 32
  • 54
0
votes
0 answers

How to add margin/padding to ImageSpan in the SpannableStringBuilder?

I'm trying to create a custom TextView by inheriting AppCompatTextView and giving the option to add an icon after the text. Here's my class: class IconTextView(context: Context) : AppCompatTextView(context) { private fun addIcon(drawable:…
Renegade
  • 642
  • 1
  • 10
  • 19
0
votes
0 answers

Trying to store a SpannedString using HTML format

I am trying to store a SpannedString into an Sqlite3 database, unfortunately, there is no direct way to put it in a ContentValues object. From several other posts, I gathered that the solution is to convert the Spannable string to HTML before…
ilomambo
  • 8,290
  • 12
  • 57
  • 106
0
votes
1 answer

Java/Android scientific number to html

I'm a newbie at programming and maybe there is a solution to this problem I just don't know about. I have a TextView with values. As some of the values are really small they are shown as scientific numbers. But I don't like the 2e-02 expression I'd…
Darokthar
  • 1,033
  • 12
  • 18
0
votes
0 answers

How to set the first character background color with match_parent height in TextView?

Here is the TextView that I am working with:
Taha Sami
  • 1,565
  • 1
  • 16
  • 43
0
votes
0 answers

How to make a part of image in textview as clickable using Kotlin?

I found that I can add a image by using android:drawableRight then how can I make image as clickable in textview?
0
votes
1 answer

Adding a MetricAffectingSpan to an EditText causes it to scroll to the cursor location

I contribute to a text editor app and have observed the following behavior: When I add or remove a MetricAffectingSpan (have tested with LineHeightSpan and TextAppearanceSpan), the edit text jumps to the current cursor location. The jump appears to…
hs1
  • 51
  • 1
  • 4
0
votes
2 answers

How do I use EditableFactory in Xamarin Forms?

My EditorFactory is crashing under Google Play testing. The class is embedded in a Renderer I have wrote to extend the Xamarin Forms Editor control. Error: FATAL EXCEPTION: Thread-3 Process: com.MyApp.MyApp, PID:…
jho
  • 199
  • 1
  • 8
0
votes
1 answer

change text color with spannable

In the below code which is for bluetooth messaging with arduino i am trying to change color on some static strings. 1.On the start button listener i have a message"Connection opened" which i am changing color using the xml file and creating there a…
Nikolas
  • 13
  • 4
0
votes
1 answer

SpannableStringBuilder , ClickSpan not working , clickspan to multiple strings android

I'm trying to Implement Multiple Click on a Single TextView using spannable builder , I tried multiple ways to implement click on spannable string but failed , please guide me what I have done/or doing worng here.
Atif AbbAsi
  • 5,633
  • 7
  • 26
  • 47