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

TextView 内容足够长,超出一屏, mCollapsedHeight计算的有问题 #55

Open conanbo opened 6 years ago

conanbo commented 6 years ago

点击会失效

ltg1308101101 commented 6 years ago

去除动画 OK

iBotasky commented 6 years ago

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);

aiynmm commented 4 years ago

How to solve this problem? I have the same problem!

ltg1308101101 commented 4 years ago

  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"<notifications@github.com>; 发送时间: 2019年11月26日(星期二) 下午4:00 收件人: "Manabu-GT/ExpandableTextView"<ExpandableTextView@noreply.github.com>; 抄送: "夌艸"<453962462@qq.com>;"Comment"<comment@noreply.github.com>; 主题: 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.

aiynmm commented 4 years ago

@ltg1308101101 I have tried to remove clearAnimation(), but it didm't work!

sdnliumei commented 4 years ago

去掉动画效果以后果然好了

zhangyubao commented 3 years ago

使用ValueAnimator动画重写 if (mCollapsed) { valueAnimator = ValueAnimator.ofInt(mStartHeight, mCollapsedHeight); } else { valueAnimator = ValueAnimator.ofInt(mStartHeight, mStartHeight + mTextHeightWithMaxLines - mTv.getHeight()); }

其他逻辑可以重用