Skip to content

Commit

Permalink
Merge pull request shrikanth7698#20 from karangoel16/hyper_external_w…
Browse files Browse the repository at this point in the history
…ork_optimization

Moved to set instead
  • Loading branch information
karangoel16 authored Oct 20, 2019
2 parents 85358fc + b01d2ee commit ed0045e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,15 @@ class CollapsibleCalendar : UICalendar, View.OnClickListener {
}
val topHeight = tempHeight
mHandler.post {
mScrollViewBody.layoutParams.height = targetHeight
mScrollViewBody.requestLayout()
val xTranslate = ObjectAnimator.ofInt(mScrollViewBody, "scrollX", 0)
val yTranslate = ObjectAnimator.ofInt(mScrollViewBody, "scrollY", topHeight)
val animators = AnimatorSet()
animators.playTogether(xTranslate, yTranslate);
val temp = ((targetHeight / context.getResources().getDisplayMetrics().density)).toLong()
animators.duration = if (temp < 0) 500 else temp
animators.start()
mScrollViewBody.layoutParams.height = targetHeight
mScrollViewBody.requestLayout()
}

//mHandler.post { mScrollViewBody.smoothScrollTo(0, topHeight) }
Expand Down

0 comments on commit ed0045e

Please sign in to comment.