[app] Better fab scroll behavior
This commit is contained in:
parent
6d098e9ba8
commit
237a746762
|
|
@ -352,18 +352,6 @@ public class ModulesFragment extends BaseFragment implements ModuleUtil.ModuleLi
|
|||
binding.recyclerView.setAdapter(fragment.adapters.get(position));
|
||||
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(requireActivity());
|
||||
binding.recyclerView.setLayoutManager(layoutManager);
|
||||
if (users != null && users.size() != 1) {
|
||||
binding.recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
||||
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
|
||||
fragment.binding.fab.show();
|
||||
} else {
|
||||
fragment.binding.fab.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,5 +83,6 @@
|
|||
android:contentDescription="@string/add_module_to_user"
|
||||
android:src="@drawable/ic_baseline_add_24"
|
||||
android:visibility="gone"
|
||||
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
|
||||
app:layout_fitsSystemWindowsInsets="bottom" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
Loading…
Reference in New Issue