3

I used custom read more and read less functionality on textview but all Html tag are not working and convert to paragraph.

Add "View More" at the end of textview after 3 lines

mytxt_hpofferdetails.setText(Html.fromHtml(s,Html.FROM_HTML_MODE_COMPACT));

makeTextViewResizable(mytxt_hpofferdetails, 3, "Read More", true);

Alpit Panchal
  • 362
  • 1
  • 3
  • 13
  • And how we can guess what your problem is? without looking the code – Rahul Khurana Aug 13 '19 at 06:52
  • what you tried please post – Ganesh Gudghe Aug 13 '19 at 07:00
  • I have HTML string and display in Textview it's working fine but I want to implement more functionality like "ReadMore" and "ReadLess" in the same Textview that time all string display like a paragraph. "
    1. Get 15% off on OPD consultation.
    2. Get 10% off on Lab & Radiology tests.
    3. Get 10% off on In patient billings.
    4. Get 20% off on Health check-up packages."
    – Alpit Panchal Aug 13 '19 at 07:01
  • Add relevant code what you have done to achieve your Read More and Read Less functionality. – nitinkumarp Aug 13 '19 at 07:03
  • https://stackoverflow.com/questions/19675331/add-view-more-at-the-end-of-textview-after-3-lines I followed the above method for "ReadMore" and "ReadLess" using HTML formate mytxt_hpofferdetails.setText(Html.fromHtml(s,Html.FROM_HTML_MODE_COMPACT)); makeTextViewResizable(mytxt_hpofferdetails, 3, "Read More", true); – Alpit Panchal Aug 13 '19 at 08:18

0 Answers0