]> git.ktnx.net Git - mobile-ledger.git/commitdiff
reset rotation angle before animating rotation
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 Mar 2019 20:52:44 +0000 (22:52 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 Mar 2019 20:54:58 +0000 (22:54 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index 877740731df959a7c7a5114c8740bda69e41d888..f446e1ab7ccd9ca17922265188b450a7973b9658 100644 (file)
@@ -571,6 +571,7 @@ public class MainActivity extends ProfileThemedActivity {
 
             if (wasExpanded) {
                 Log.d("accounts", String.format("Collapsing account '%s'", acc.getName()));
+                view.setRotation(0);
                 animator.rotationBy(180);
 
                 // removing all child accounts from the view
@@ -604,6 +605,7 @@ public class MainActivity extends ProfileThemedActivity {
             }
             else {
                 Log.d("accounts", String.format("Expanding account '%s'", acc.getName()));
+                view.setRotation(180);
                 animator.rotationBy(-180);
                 ArrayList<LedgerAccount> accounts = Data.accounts.get();
                 List<LedgerAccount> children = Data.profile.get().loadVisibleChildAccountsOf(acc);