fix: 普通帖/视频帖详情页相关优化—0424测试 https://jira.shanqu.cc/browse/GHZS-2223

This commit is contained in:
叶子维
2023-04-24 16:08:04 +08:00
parent 15d6fd98b5
commit fe75be35fb
4 changed files with 5 additions and 45 deletions

View File

@ -188,7 +188,7 @@ class VideoDescTopViewHolder(
private fun initAnimation(entity: ForumVideoEntity) {
binding.root.post {
mShrinkHeight = if (mShrinkHeight == 0) {
getTextViewHeight(binding.titleTv, 1)
getTextViewHeight(binding.titleTv, 2)
} else mShrinkHeight
mExpandHeight = if (mExpandHeight == 0) {
@ -199,7 +199,7 @@ class VideoDescTopViewHolder(
binding.titleTv.maxLines = Int.MAX_VALUE
updateTitleContainerHeight(mExpandHeight)
} else {
binding.titleTv.maxLines = 1
binding.titleTv.maxLines = 2
updateTitleContainerHeight(mShrinkHeight)
}
@ -228,7 +228,7 @@ class VideoDescTopViewHolder(
}
animator.doOnEnd {
if (mIsExpand) {
binding.titleTv.maxLines = 1
binding.titleTv.maxLines = 2
}
mIsExpand = !mIsExpand
binding.expandMoreIv.rotation = if (mIsExpand) 180f else 0f