ExpandableTextView icon indicating copy to clipboard operation
ExpandableTextView copied to clipboard

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

Open conanbo opened this issue 8 years ago • 7 comments

点击会失效

conanbo avatar Nov 02 '17 09:11 conanbo

去除动画 OK

ltg1308101101 avatar Feb 24 '18 09:02 ltg1308101101

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

iBotasky avatar Feb 24 '18 09:02 iBotasky

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

aiynmm avatar Nov 26 '19 08:11 aiynmm

  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 avatar Nov 26 '19 08:11 ltg1308101101

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

aiynmm avatar Nov 26 '19 08:11 aiynmm

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

sdnliumei avatar Dec 20 '19 05:12 sdnliumei

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

其他逻辑可以重用

zhangyubao avatar Nov 16 '20 11:11 zhangyubao