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

setVisibility(VISIBLE)时会展开全部,并且不显示收起的文字 #28

Open
whk0710 opened this issue Sep 11, 2019 · 1 comment

Comments

@whk0710
Copy link

whk0710 commented Sep 11, 2019

No description provided.

@1218683832
Copy link

你好,你的问题已解决!
原因在ListView或RecyclerView等可复用性容器中使用ExpandableTextView时,首个ExpandableTextView不可见到可见在getNewTextByConfig() mLayoutWidth值为0,也就是说会直接return mOrigText;
解决代码:
在复用性容器中使用
expandableTextView.post(()->{
expandableTextView.updateForRecyclerView(!TextUtils.isEmpty(item.getWordRecord()) ? item.getWordRecord() : "", expandableTextView.getMeasuredWidth());
});

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