Manabu-GT / ExpandableTextView

Android's TextView that can expand/collapse like the Google Play's app description
Apache License 2.0
4.08k stars 791 forks source link

replaced TextView with HtmlTextView, collapse not working #46

Open emadbagheri96 opened 7 years ago

emadbagheri96 commented 7 years ago

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

momokosa commented 6 years ago

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. @