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

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

Open
conanbo opened this issue Nov 2, 2017 · 7 comments

Comments

@conanbo
Copy link

conanbo commented Nov 2, 2017

点击会失效

@ltg1308101101
Copy link

去除动画 OK

@iBotasky
Copy link

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
Copy link

aiynmm commented Nov 26, 2019

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

@ltg1308101101
Copy link

ltg1308101101 commented Nov 26, 2019 via email

@aiynmm
Copy link

aiynmm commented Nov 26, 2019

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

@sdnliumei
Copy link

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

@zhangyubao
Copy link

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

其他逻辑可以重用

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

6 participants