<pre>
TextVIew.getLineHeight();
TextView.getLineCount();
private voiddoAnimation(intstartHeight,intendHeight) {
ValueAnimator animator = ValueAnimator.ofInt(startHeight, endHeight);
animator.setDuration(600);
animator.setTarget(mDescribeDetailTv);
animator.addUpdateListener(newValueAnimator.AnimatorUpdateListener() {
@Override
public voidonAnimationUpdate(ValueAnimator animation) {
intheight = (int) animation.getAnimatedValue();
ViewGroup.LayoutParams params =mDescribeDetailTv.getLayoutParams();
params.height= height;
mDescribeDetailTv.setLayoutParams(params);
}
});
animator.start();
}
</pre>
网友评论