Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced TextView with HtmlTextView, collapse not working #46

Open
emadbagheri96 opened this issue Sep 25, 2016 · 1 comment
Open

replaced TextView with HtmlTextView, collapse not working #46

emadbagheri96 opened this issue Sep 25, 2016 · 1 comment

Comments

@emadbagheri96
Copy link

hi
i just replaced the TextView in the lib with this HtmlTextView which extends TextView itself. expanding works fine but collapsig wont work.
where is the problem?
thanks in advance

@emadbagheri96 emadbagheri96 changed the title replaced TextView with HtmlTextView but collapse not working replaced TextView with HtmlTextView, collapse not working Sep 25, 2016
@momokosa
Copy link

momokosa commented Dec 18, 2017

String strHtml = "<b>"content with html</b>"
Spanned spanned = Html.fromHtml(strHtml );

// sample code snippet to set the text content on the ExpandableTextView
ExpandableTextView expTv1 = (ExpandableTextView) view.findViewById(R.id.expand_text_view)
.findViewById(R.id.expand_text_view);

// IMPORTANT - call setText on the ExpandableTextView to set the text content to display
expTv1.setText(Html.fromHtml(String.valueOf(spanned)));

Hope to help you. @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants