private void handleAddMedia() { // need to make MediaGalleryAdd into an activity rather than a fragment because I can't add this // fragment // on top of the slidingpanel layout (since it needs to be the root layout) ArrayList<String> mediaIds = mMediaGalleryEditFragment.getMediaIds(); Intent intent = new Intent(this, MediaGalleryPickerActivity.class); intent.putExtra(MediaGalleryPickerActivity.PARAM_SELECTED_IDS, mediaIds); startActivityForResult(intent, MediaGalleryPickerActivity.REQUEST_CODE); }
private void handleSaveMedia() { Intent intent = new Intent(); ArrayList<String> ids = mMediaGalleryEditFragment.getMediaIds(); boolean isRandom = mMediaGallerySettingsFragment.isRandom(); int numColumns = mMediaGallerySettingsFragment.getNumColumns(); String type = mMediaGallerySettingsFragment.getType(); mMediaGallery.setIds(ids); mMediaGallery.setRandom(isRandom); mMediaGallery.setNumColumns(numColumns); mMediaGallery.setType(type); intent.putExtra(RESULT_MEDIA_GALLERY, mMediaGallery); setResult(RESULT_OK, intent); finish(); }