File tree Expand file tree Collapse file tree 5 files changed +16
-0
lines changed
java/com/theartofdev/edmodo/cropper/sample Expand file tree Collapse file tree 5 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ final class CropImageViewOptions {
3535
3636 public boolean fixAspectRatio ;
3737
38+ public boolean multitouch ;
39+
3840 public boolean showCropOverlay ;
3941
4042 public boolean showProgressBar ;
Original file line number Diff line number Diff line change @@ -233,6 +233,11 @@ public void onDrawerOptionClicked(View view) {
233233 mCurrentFragment .resetCropRect ();
234234 mDrawerLayout .closeDrawers ();
235235 break ;
236+ case R .id .drawer_option_toggle_multitouch :
237+ mCropImageViewOptions .multitouch = !mCropImageViewOptions .multitouch ;
238+ mCurrentFragment .setCropImageViewOptions (mCropImageViewOptions );
239+ updateDrawerTogglesByOptions (mCropImageViewOptions );
240+ break ;
236241 case R .id .drawer_option_toggle_show_overlay :
237242 mCropImageViewOptions .showCropOverlay = !mCropImageViewOptions .showCropOverlay ;
238243 mCurrentFragment .setCropImageViewOptions (mCropImageViewOptions );
@@ -259,6 +264,7 @@ private void updateDrawerTogglesByOptions(CropImageViewOptions options) {
259264 ((TextView ) findViewById (R .id .drawer_option_toggle_scale )).setText (getResources ().getString (R .string .drawer_option_toggle_scale , options .scaleType .name ()));
260265 ((TextView ) findViewById (R .id .drawer_option_toggle_shape )).setText (getResources ().getString (R .string .drawer_option_toggle_shape , options .cropShape .name ()));
261266 ((TextView ) findViewById (R .id .drawer_option_toggle_guidelines )).setText (getResources ().getString (R .string .drawer_option_toggle_guidelines , options .guidelines .name ()));
267+ ((TextView ) findViewById (R .id .drawer_option_toggle_multitouch )).setText (getResources ().getString (R .string .drawer_option_toggle_multitouch , Boolean .toString (options .multitouch )));
262268 ((TextView ) findViewById (R .id .drawer_option_toggle_show_overlay )).setText (getResources ().getString (R .string .drawer_option_toggle_show_overlay , Boolean .toString (options .showCropOverlay )));
263269 ((TextView ) findViewById (R .id .drawer_option_toggle_show_progress_bar )).setText (getResources ().getString (R .string .drawer_option_toggle_show_progress_bar , Boolean .toString (options .showProgressBar )));
264270
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ public void setCropImageViewOptions(CropImageViewOptions options) {
7171 mCropImageView .setGuidelines (options .guidelines );
7272 mCropImageView .setAspectRatio (options .aspectRatio .first , options .aspectRatio .second );
7373 mCropImageView .setFixedAspectRatio (options .fixAspectRatio );
74+ mCropImageView .setMultiTouchEnabled (options .multitouch );
7475 mCropImageView .setShowCropOverlay (options .showCropOverlay );
7576 mCropImageView .setShowProgressBar (options .showProgressBar );
7677 mCropImageView .setAutoZoomEnabled (options .autoZoomEnabled );
Original file line number Diff line number Diff line change 126126 android : onClick =" onDrawerOptionClicked"
127127 android : text =" @string/drawer_option_reset_crop_rect" />
128128
129+ <TextView
130+ android : id =" @+id/drawer_option_toggle_multitouch"
131+ style =" @style/Cropper.Widget.Drawer.Option.TextView"
132+ android : onClick =" onDrawerOptionClicked"
133+ android : text =" @string/drawer_option_toggle_multitouch" />
134+
129135 <TextView
130136 android : id =" @+id/drawer_option_toggle_show_overlay"
131137 style =" @style/Cropper.Widget.Drawer.Option.TextView"
Original file line number Diff line number Diff line change 2626 <string name =" drawer_option_toggle_max_zoom" >Max zoom level: %1s</string >
2727 <string name =" drawer_option_set_initial_crop_rect" >Set initial crop rectangle</string >
2828 <string name =" drawer_option_reset_crop_rect" >Reset crop rectangle to initial</string >
29+ <string name =" drawer_option_toggle_multitouch" >Multitouch: %1s</string >
2930 <string name =" drawer_option_toggle_show_overlay" >Show Overlay: %1s</string >
3031 <string name =" drawer_option_toggle_show_progress_bar" >Show Progress Bar: %1s</string >
3132
You can’t perform that action at this time.
0 commit comments