From 885b5d781a5d545476cf9099e599544981d588d2 Mon Sep 17 00:00:00 2001 From: sk Date: Mon, 16 Jan 2023 19:23:39 +0100 Subject: [PATCH] tweak timeline title animation --- .../android/fragments/HomeTabFragment.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java index 86e5b67a2..bf169373e 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java @@ -266,7 +266,7 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab switcher.setPivotX(V.dp(28)); // padding + half of icon switcher.setPivotY(switcher.getHeight() / 2f); - timelineTitle.setPivotX(0); + timelineTitle.setPivotX(timelineTitle.getWidth() - V.dp(8)); timelineTitle.setPivotY(timelineTitle.getHeight() / 2f); } }); @@ -407,9 +407,7 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab ObjectAnimator.ofFloat(toolbarShowNewPostsBtn, View.ALPHA, 0f), ObjectAnimator.ofFloat(toolbarShowNewPostsBtn, View.SCALE_X, .8f), ObjectAnimator.ofFloat(toolbarShowNewPostsBtn, View.SCALE_Y, .8f), - ObjectAnimator.ofFloat(collapsedChevron, View.ALPHA, 0f), - ObjectAnimator.ofFloat(collapsedChevron, View.SCALE_X, .8f), - ObjectAnimator.ofFloat(collapsedChevron, View.SCALE_Y, .8f) + ObjectAnimator.ofFloat(collapsedChevron, View.ALPHA, 0f) ); set.setDuration(GlobalUserPreferences.reduceMotion ? 0 : 300); set.setInterpolator(CubicBezierInterpolator.DEFAULT); @@ -442,9 +440,7 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab ObjectAnimator.ofFloat(toolbarShowNewPostsBtn, View.ALPHA, 1f), ObjectAnimator.ofFloat(toolbarShowNewPostsBtn, View.SCALE_X, 1f), ObjectAnimator.ofFloat(toolbarShowNewPostsBtn, View.SCALE_Y, 1f), - ObjectAnimator.ofFloat(collapsedChevron, View.ALPHA, 1f), - ObjectAnimator.ofFloat(collapsedChevron, View.SCALE_X, 1f), - ObjectAnimator.ofFloat(collapsedChevron, View.SCALE_Y, 1f) + ObjectAnimator.ofFloat(collapsedChevron, View.ALPHA, 1f) ); set.setDuration(GlobalUserPreferences.reduceMotion ? 0 : 300); set.setInterpolator(CubicBezierInterpolator.DEFAULT);