Loading src/com/android/documentsui/DirectoryFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -573,6 +573,9 @@ public class DirectoryFragment extends Fragment { } mRecView.setLayoutManager(layout); // TODO: Once b/23691541 is resolved, use a listener within MultiSelectManager instead of // imperatively calling this function. mSelectionManager.handleLayoutChanged(); // setting layout manager automatically invalidates existing ViewHolders. mThumbSize = new Point(thumbSize, thumbSize); } Loading src/com/android/documentsui/MultiSelectManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,10 @@ public final class MultiSelectManager { notifySelectionChanged(); } public void handleLayoutChanged() { mBandSelectManager.handleLayoutChanged(); } /** * Clears the selection, without notifying anyone. */ Loading Loading @@ -1191,6 +1195,18 @@ public final class MultiSelectManager { mModel.addOnSelectionChangedListener(this); } /** * Handle a change in layout by cleaning up and getting rid of the old model and creating * a new model which will track the new layout. */ public void handleLayoutChanged() { mModel.removeOnSelectionChangedListener(this); mModel.stopListening(); mModel = new BandSelectModel((RuntimeRecyclerViewHelper) mHelper); mModel.addOnSelectionChangedListener(this); } /** * Processes a MotionEvent by starting, ending, or resizing the band select overlay. * @param e Loading Loading
src/com/android/documentsui/DirectoryFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -573,6 +573,9 @@ public class DirectoryFragment extends Fragment { } mRecView.setLayoutManager(layout); // TODO: Once b/23691541 is resolved, use a listener within MultiSelectManager instead of // imperatively calling this function. mSelectionManager.handleLayoutChanged(); // setting layout manager automatically invalidates existing ViewHolders. mThumbSize = new Point(thumbSize, thumbSize); } Loading
src/com/android/documentsui/MultiSelectManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,10 @@ public final class MultiSelectManager { notifySelectionChanged(); } public void handleLayoutChanged() { mBandSelectManager.handleLayoutChanged(); } /** * Clears the selection, without notifying anyone. */ Loading Loading @@ -1191,6 +1195,18 @@ public final class MultiSelectManager { mModel.addOnSelectionChangedListener(this); } /** * Handle a change in layout by cleaning up and getting rid of the old model and creating * a new model which will track the new layout. */ public void handleLayoutChanged() { mModel.removeOnSelectionChangedListener(this); mModel.stopListening(); mModel = new BandSelectModel((RuntimeRecyclerViewHelper) mHelper); mModel.addOnSelectionChangedListener(this); } /** * Processes a MotionEvent by starting, ending, or resizing the band select overlay. * @param e Loading