Add another word in Android TextView

I have one sentence with 3 TextView in my RecyclerView. The picture is like below : In that picture, I have one sentence in 3 TextView, there are "1" "HOT, MORE CHILLI" and "Pizza". This is my RecyclerView Binding code : try

TextView setTextIsSelectable (true) crashing application

I wanted to make my data in textview selectable for copy paste. For this, I am setting textIsSelectable flag to true in my textview as following: textView.setText("Hello"); textView.setTextIsSelectable(true); I am getting following exception: ja

Filtered Spannable text does not work in my case

Hello I have follow this link How to highlight filtered text in RecyclerView when using SearchView widget to make custom filtered list in recyclerview. But it doesn't work to my case, what's wrong with my code? I''ll really apreciate if you can look

Edit TextView in clickable words in a custom ListView

I have a custom List in which different buttons are present on each List. my aim is to make a single text view <TextView android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" androi

Change the text color when the user types hash tags

I am working on an application where the user can post content to a feed. In my edit text (used for composing) the text colour is grey. However when the user types a hash tag e.g. #help I need to colour that text black as they type, so when the user

How to handle the onClick event on imageSpan in editText?

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 :- public void addToEdt(Bitmap bitmap){ SpannableString

How to recover BackgroundColorSpan for selected text in android

I am trying to set BackgroundColorSpan to selected text in my Edit-text. So when i select any text and click on button it will set Background color to that particular text and then i am saving that note to my SDCard with .html format and then again i

Align the text around ImageSpan Vertical Center

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 with the image but the baseline of the text does not s

ActionBar title with compound that can be called

is it possible to the add a compound drawable (something like drawableLeft) to the standard action bar title without using a custom view? Atm i am using a SpannableString for the title (in order to use a custom typeface). If I can't set a compund dra

Android TextView Exhibitor

So I'm trying to add superscipt/subscript to a TextView, basically trying to make a fraction be displayed as 1/2. Not sure where I'm going wrong, and I'm new with Android, so any help is appreciated. Thanks! SpannableStringBuilder numSpan = new Spann

Change the color font only in part of the text view

i want to change only a part of textview color.. I've tried in this way but nothing change TextView textView = (TextView)findViewById(R.id.Temperature); textView.setText("Temperature: "+ "<small> <font color='#59c3fa'>" + t

Spannable string error

I am trying to display some text in an alert dialog box as a hyperlink. Part of the process requires me to use SpannableString to format some text. The problem is that my application experiences a runtime error on the SpannableString part of my code.

How to convert SpannedString to Spannable

Hello I have set some text in a textview. TextView tweet = (TextView) vi.findViewById(R.id.text); tweet.setText(Html.fromHtml(sb.toString())); Then I need to convert the text of the TextView into Spannble. So I did this like: Spannable s = (Spannable

Using linked spaces in visualization

I have a textview created in a class B programaticly. When class A calls it. It adds text say "I went to the shop" and i need the word "the" to be a link. This i have done using this in CLASS B sb.setSpan(new MyClickableSpan(Word), sta

Make TextView fit into the layout on Android

I have a FrameLayout which is square. I have a TextView inside the layout and an option for the user to increase/decrease the textSize. I want to limit the text increase option, when text is big enough to fill the entire FrameLayout. So if I start wi

Spannable on Android for textView

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.bottomtext); bt.setText(o.author); Spannable spn = (Spannable)

Part of textview in Android to be clickable

I have to display some text in textview. I just want the a part of the text to be clickable and the rest of the text to be normal. Here is my code: TextView mTextView = (TextView) findViewById(R.id.txt); String mText = "some text.Link to click.Some m

Symbol to HTML feature code

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

TextView with different textSize

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 SpannableString(textView.getText()); span.setSpan(arg0, 1, 10, arg

Android: How to combine Spannable.setSpan with String.format?

I'm setting Span to part of 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 to. I tryed to use custom HTML tags in strings.xml, but ei