Fab is hidden automatically

pull/996/head
Alex Baker 5 years ago
parent 5b9a59326e
commit 05cf6b8b12

@ -199,13 +199,9 @@ public final class TaskEditFragment extends InjectingFragment
binding.appbarlayout.addOnOffsetChangedListener(
(appBarLayout, verticalOffset) -> {
if (verticalOffset == 0) {
binding.fab.setVisibility(View.VISIBLE);
title.setVisibility(View.VISIBLE);
binding.collapsingtoolbarlayout.setTitleEnabled(false);
} else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
binding.fab.setVisibility(View.INVISIBLE);
} else {
binding.fab.setVisibility(View.VISIBLE);
} else if (Math.abs(verticalOffset) < appBarLayout.getTotalScrollRange()) {
title.setVisibility(View.INVISIBLE);
binding.collapsingtoolbarlayout.setTitle(title.getText());
binding.collapsingtoolbarlayout.setTitleEnabled(true);

Loading…
Cancel
Save