MediaSelectionBorderTest
Simulate what web Editor has for handling media out side the editing area;
The idea is to have an Editing area which clips the media but not it’s border, so if media goes outside the EditingArea, it’s border still visible and can be selected and move back into editing area;
The structure of the views is as below:
- The
SelectionRectangleis a separate view; - The
MediaViewis a separate view; SelectionRectangleandMediaViewconnect together viadelegate(listener);- All the gestures (tap, move, scale …) goes through
SelectionRectangleand it will decides when to pass this events toMediaView; - The screen contains two main view, one is
MediaEditArea(which holdsMediaView) and another isSelectionEditArea(which holdsSelectionRectangle); MediaEditAreaclips all of it’s subView (clipToBounds = true);SelectionEditAreadoes not clip any of it’s subView (clipToBounds = false);SelectionEditAreahas a clear background color;



