profileListHeadArrow.clearAnimation();
profileListHeadArrow.setVisibility(View.GONE);
profileListHeadMore.setVisibility(View.GONE);
+ profileListHeadMore
+ .startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_out));
profileListHeadCancel.setVisibility(View.VISIBLE);
+ profileListHeadCancel
+ .startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in));
}
else {
profileListHeadArrow.setRotation(180f);
profileListHeadArrow.setVisibility(View.VISIBLE);
profileListHeadCancel.setVisibility(View.GONE);
+ profileListHeadCancel
+ .startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_out));
profileListHeadMore.setVisibility(View.GONE);
- profileListHeadMore
- .setVisibility(profileListExpanded ? View.VISIBLE : View.GONE);
+ if (profileListExpanded) {
+ profileListHeadMore.setVisibility(View.VISIBLE);
+ profileListHeadMore
+ .startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in));
+ }
+ else profileListHeadMore.setVisibility(View.GONE);
}
};
mProfileListAdapter.addEditingProfilesObserver(editingProfilesObserver);
findViewById(R.id.nav_profile_list_head_layout)
.setOnClickListener(this::navProfilesHeadClicked);
findViewById(R.id.nav_profiles_label).setOnClickListener(this::navProfilesHeadClicked);
+ boolean initialStart = Data.profile.get() == null;
setupProfile();
- onProfileChanged(null);
+ if (!initialStart) onProfileChanged(null);
updateLastUpdateTextFromDB();
}
findViewById(R.id.pager_layout)
.setVisibility(haveProfile ? View.VISIBLE : View.VISIBLE);
- Data.transactions.clear();
- debug("transactions", "requesting list reload");
- TransactionListViewModel.scheduleTransactionListReload();
-
- Data.accounts.clear();
- AccountSummaryViewModel.scheduleAccountListReload();
-
if (profile == null) MainActivity.this.setTitle(R.string.app_name);
else MainActivity.this.setTitle(profile.getName());
MainActivity.this.updateLastUpdateTextFromDB();
}
drawer.closeDrawers();
+ Data.transactions.clear();
+ debug("transactions", "requesting list reload");
+ TransactionListViewModel.scheduleTransactionListReload();
+
+ Data.accounts.clear();
+ AccountSummaryViewModel.scheduleAccountListReload();
+
if (profile == null) {
mToolbar.setSubtitle(null);
fab.hide();
profileListHeadArrow.setRotation(0f);
profileListHeadArrow
.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate_180_back));
- profileListHeadMore.setVisibility(View.GONE);
+ final Animation moreAnimation = AnimationUtils.loadAnimation(this, R.anim.fade_out);
+ moreAnimation.setAnimationListener(new Animation.AnimationListener() {
+ @Override
+ public void onAnimationStart(Animation animation) {}
+ @Override
+ public void onAnimationEnd(Animation animation) {
+ profileListHeadMore.setVisibility(View.GONE);
+ }
+ @Override
+ public void onAnimationRepeat(Animation animation) {}
+ });
+ profileListHeadMore.startAnimation(moreAnimation);
}
public void onAccountSummaryRowViewClicked(View view) {
ViewGroup row;