feat(PollOptions): adjust animation curve

This commit is contained in:
FineFindus 2024-05-12 21:29:50 +02:00
parent 54202f3e8d
commit ad9b5f028d
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ public class PollOptionStatusDisplayItem extends StatusDisplayItem{
int targetLevel=shown ? Math.round(10000f*item.votesFraction) : 0;
ObjectAnimator animator=ObjectAnimator.ofInt(bg, "level", startLevel, targetLevel);
animator.setDuration(ANIMATION_DURATION);
animator.setInterpolator(new DecelerateInterpolator());
button.setBackground(bg);
if(shown){
itemView.setSelected(item.poll.ownVotes!=null && item.poll.ownVotes.contains(item.optionIndex));