ExpandableTextView
ExpandableTextView copied to clipboard
TextView 内容足够长,超出一屏, mCollapsedHeight计算的有问题
点击会失效
去除动画 OK
It's may not the calculate mCollapsedHeight cause the problem.
I think is the method clearAnimation(); cause the problem, try to remove this code in front of the startAnimation(animation);
How to solve this problem? I have the same problem!
It's may not the calculate mCollapsedHeight cause the problem. I think is the method clearAnimation(); cause the problem, try to remove this code in front of the startAnimation(animation);
------------------ 原始邮件 ------------------ 发件人: "Mars"<[email protected]>; 发送时间: 2019年11月26日(星期二) 下午4:00 收件人: "Manabu-GT/ExpandableTextView"<[email protected]>; 抄送: "夌艸"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [Manabu-GT/ExpandableTextView] TextView 内容足够长,超出一屏, mCollapsedHeight计算的有问题 (#55)
How to solve this problem? I have the same problem!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
@ltg1308101101 I have tried to remove clearAnimation(), but it didm't work!
去掉动画效果以后果然好了
使用ValueAnimator动画重写 if (mCollapsed) { valueAnimator = ValueAnimator.ofInt(mStartHeight, mCollapsedHeight); } else { valueAnimator = ValueAnimator.ofInt(mStartHeight, mStartHeight + mTextHeightWithMaxLines - mTv.getHeight()); }
其他逻辑可以重用