: REQUEST_CROP);
return true;
}
+ case R.id.action_trim: {
+ // TODO: Add trimming activity here.
+ return true;
+ }
case R.id.action_edit: {
Intent intent = new Intent(Intent.ACTION_EDIT)
.setData(manager.getContentUri(path))
public static final int SUPPORT_EDIT = 1 << 9;
public static final int SUPPORT_INFO = 1 << 10;
public static final int SUPPORT_IMPORT = 1 << 11;
+ public static final int SUPPORT_TRIM = 1 << 12;
public static final int SUPPORT_ALL = 0xffffffff;
// These are the bits returned from getMediaType():
boolean supportDelete = (supported & MediaObject.SUPPORT_DELETE) != 0;
boolean supportRotate = (supported & MediaObject.SUPPORT_ROTATE) != 0;
boolean supportCrop = (supported & MediaObject.SUPPORT_CROP) != 0;
+ boolean supportTrim = (supported & MediaObject.SUPPORT_TRIM) != 0;
boolean supportShare = (supported & MediaObject.SUPPORT_SHARE) != 0;
boolean supportSetAs = (supported & MediaObject.SUPPORT_SETAS) != 0;
boolean supportShowOnMap = (supported & MediaObject.SUPPORT_SHOW_ON_MAP) != 0;
setMenuItemVisible(menu, R.id.action_rotate_ccw, supportRotate);
setMenuItemVisible(menu, R.id.action_rotate_cw, supportRotate);
setMenuItemVisible(menu, R.id.action_crop, supportCrop);
+ setMenuItemVisible(menu, R.id.action_trim, supportTrim);
setMenuItemVisible(menu, R.id.action_share, supportShare);
setMenuItemVisible(menu, R.id.action_setas, supportSetAs);
setMenuItemVisible(menu, R.id.action_show_on_map, supportShowOnMap);