Open frakc opened 7 years ago
fixed with removing oldviews
public class MediumTextView extends ElementView {
public MediumTextView(Context context) {
super(context, null);
}
public MediumTextView(Context context, AttributeSet attrs) {
super(context, attrs, null);
}
@Override public void render() {
setOrientation(VERTICAL);
}
String html = null;
public void setText(String html) {
if (!html.equals(this.html)) {
this.html = html;
removeAllViews();
Document document = Jsoup.parse(html);
Element element = document.body();
setElement(element);
Utils.appendView(this, getElement().children());
invalidate();
}
}
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
}
}
Greate lib but i found that on repeating scrolling some paragraphs are duplicated. eg on fist scroll over all content (20 items) everything is ok on second each paragraph (except last one) of each item appeared twise on third run each paragraph (except last one) of each item appeared 3 times and so on