use of com.amaze.filemanager.ui.drag.TabFragmentBottomDragListener in project AmazeFileManager by TeamAmaze.
the class MainActivity method initBottomDragListener.
private void initBottomDragListener(boolean destroy) {
View bottomPlaceholder = findViewById(R.id.placeholder_drag_bottom);
if (destroy) {
bottomPlaceholder.setOnDragListener(null);
bottomPlaceholder.setVisibility(View.GONE);
} else {
bottomPlaceholder.setVisibility(View.VISIBLE);
bottomPlaceholder.setOnDragListener(new TabFragmentBottomDragListener(() -> {
getCurrentMainFragment().smoothScrollListView(false);
return null;
}, () -> {
getCurrentMainFragment().stopSmoothScrollListView();
return null;
}));
}
}
use of com.amaze.filemanager.ui.drag.TabFragmentBottomDragListener in project AmazeFileManager by TeamAmaze.
the class MainFragment method initTopAndEmptyAreaDragListeners.
public void initTopAndEmptyAreaDragListeners(boolean destroy) {
if (destroy) {
mToolbarContainer.setOnDragListener(null);
listView.stopScroll();
listView.setOnDragListener(null);
nofilesview.setOnDragListener(null);
} else {
mToolbarContainer.setOnDragListener(new TabFragmentBottomDragListener(() -> {
smoothScrollListView(true);
return null;
}, () -> {
stopSmoothScrollListView();
return null;
}));
listView.setOnDragListener(new RecyclerAdapterDragListener(adapter, null, mainFragmentViewModel.getDragAndDropPreference(), this));
nofilesview.setOnDragListener(new RecyclerAdapterDragListener(adapter, null, mainFragmentViewModel.getDragAndDropPreference(), this));
}
}
Aggregations