mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Disable swipeLayout after long press
This commit is contained in:
parent
367e0d642b
commit
6bbea63a8e
@ -138,10 +138,16 @@ public class ZimFileSelectFragment extends BaseFragment
|
||||
|
||||
if (checked) { // If the item was selected
|
||||
selectedViewPosition.add(position);
|
||||
swipeRefreshLayout.setEnabled(
|
||||
false); //disabled to stop selected items getting deselected (issue #1019)
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
mode.setTitle("" + selectedViewPosition.size()); // Update title of the CAB
|
||||
} else { // If the item was deselected
|
||||
selectedViewPosition.remove(Integer.valueOf(position));
|
||||
mode.setTitle("" + selectedViewPosition.size()); // Update title of the CAB
|
||||
if (selectedViewPosition.isEmpty()) {
|
||||
swipeRefreshLayout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,6 +253,7 @@ public class ZimFileSelectFragment extends BaseFragment
|
||||
@Override
|
||||
public void onDestroyActionMode(ActionMode mode) {
|
||||
// Upon closure of the CAB, empty the array list of selected list item positions
|
||||
swipeRefreshLayout.setEnabled(true);
|
||||
selectedViewPosition.clear();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user