Bigger plus

This commit is contained in:
M66B
2021-05-18 17:52:06 +02:00
parent 63ed536287
commit bb5e226c26
2 changed files with 27 additions and 13 deletions

View File

@@ -202,7 +202,7 @@ public class FragmentAccounts extends FragmentBase {
});
animator = ObjectAnimator.ofFloat(fab, "alpha", 0.5f, 1.0f);
animator.setDuration(500L);
animator.setDuration(750L);
animator.setRepeatCount(ValueAnimator.INFINITE);
animator.setRepeatMode(ValueAnimator.REVERSE);
animator.addUpdateListener(new ObjectAnimator.AnimatorUpdateListener() {
@@ -238,7 +238,8 @@ public class FragmentAccounts extends FragmentBase {
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
DB db = DB.getInstance(getContext());
final Context context = getContext();
final DB db = DB.getInstance(context);
// Observe accounts
db.account().liveAccountsEx(settings)
@@ -261,10 +262,15 @@ public class FragmentAccounts extends FragmentBase {
pbWait.setVisibility(View.GONE);
grpReady.setVisibility(View.VISIBLE);
if (accounts.size() == 0)
animator.start();
else
animator.end();
if (accounts.size() == 0) {
fab.setCustomSize(Helper.dp2pixels(context, 3 * 56 / 2));
if (!animator.isStarted())
animator.start();
} else {
fab.clearCustomSize();
if (animator.isStarted())
animator.end();
}
}
});
}