fix profile list header arrow direction when editing mode is ended
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 28 Feb 2019 17:41:38 +0000 (19:41 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 28 Feb 2019 17:46:27 +0000 (19:46 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index 95b3587..51ddf6e 100644 (file)
@@ -250,6 +250,7 @@ public class MainActivity extends CrashReportingActivity {
                     profileListHeadCancel.setVisibility(View.VISIBLE);
                 }
                 else {
+                    profileListHeadArrow.setRotation(180f);
                     profileListHeadArrow.setVisibility(View.VISIBLE);
                     profileListHeadCancel.setVisibility(View.GONE);
                     profileListHeadMore.setVisibility(View.GONE);
@@ -507,12 +508,13 @@ public class MainActivity extends CrashReportingActivity {
 
             }
         });
+        mProfileListAdapter.stopEditingProfiles();
+
         profileListContainer.startAnimation(animation);
+        profileListHeadArrow.setRotation(0f);
         profileListHeadArrow
                 .startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate_180_back));
         profileListHeadMore.setVisibility(View.GONE);
-
-        mProfileListAdapter.stopEditingProfiles();
     }
     public void onProfileRowClicked(View v) {
         Data.setCurrentProfile((MobileLedgerProfile) v.getTag());