Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set multiple on click listeners on different words of textview?

Just how the facebook app does it. Multiple clickable texts in one textView.

I tried the FlowLayout and multiple texviews but still the texview shifts to another line when the text exceeds the width. Multiple clickable texts in one texview

like image 976
Sourav Chandra Avatar asked Sep 26 '22 17:09

Sourav Chandra


1 Answers

Spannable String are used in Android to highlight the particular portion of text with different click event in a Single TextView.

You can check #SO Demo for this

  1. How to set the part of the text view is clickable

  2. Android: ClickableSpan in clickable TextView

I hope it will helps you .

like image 157
IntelliJ Amiya Avatar answered Nov 15 '22 11:11

IntelliJ Amiya