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

Fix part of #140: Topic play animation #486

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Nit renaming
  • Loading branch information
Rajat Talesra committed Nov 29, 2019
commit faf8229ff12d2eacc94fd2fa6f910efeaf51ef8a
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@ class StorySummaryAdapter(

val chapterList = storySummaryViewModel.storySummary.chapterList
binding.chapterRecyclerView.adapter = ChapterSummaryAdapter(chapterList, chapterSummarySelector)

if (currentExpandedChapterListIndex != null && currentExpandedChapterListIndex == position) {
val aniRotate = AnimationUtils.loadAnimation(context, R.anim.rotation_clockwise_180)
binding.chapterListDropDownIcon.startAnimation(aniRotate)
val rotate = AnimationUtils.loadAnimation(context, R.anim.rotation_clockwise_180)
binding.chapterListDropDownIcon.startAnimation(rotate)
expand(binding.chapterListContainer)
} else {
val aniRotate = AnimationUtils.loadAnimation(context, R.anim.rotation_anti_clockwise_180)
binding.chapterListDropDownIcon.startAnimation(aniRotate)
val rotate = AnimationUtils.loadAnimation(context, R.anim.rotation_anti_clockwise_180)
binding.chapterListDropDownIcon.startAnimation(rotate)
collapse(binding.chapterListContainer)
}

Expand Down