use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.
the class RenderingRequest method post.
public void post(Context context) {
if (context instanceof FilterShowActivity) {
FilterShowActivity activity = (FilterShowActivity) context;
ProcessingService service = activity.getProcessingService();
service.postRenderingRequest(this);
}
}
use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.
the class StateView method delete.
@Override
public void delete() {
FilterShowActivity activity = (FilterShowActivity) getContext();
FilterRepresentation representation = getState().getFilterRepresentation();
activity.removeFilterRepresentation(representation);
}
use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.
the class PresetManagementDialog method onClick.
@Override
public void onClick(View v) {
FilterShowActivity activity = (FilterShowActivity) getActivity();
switch(v.getId()) {
case R.id.cancel:
dismiss();
break;
case R.id.ok:
checked = mCheckBox.isChecked();
GalleryUtils.setBooleanPref(activity, activity.getString(R.string.pref_filtergenerator_intro_show_key), checked);
activity.onMediaPickerStarted();
dismiss();
break;
}
}
use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.
the class StateAdapter method remove.
@Override
public void remove(State state) {
super.remove(state);
FilterRepresentation filterRepresentation = state.getFilterRepresentation();
FilterShowActivity activity = (FilterShowActivity) getContext();
activity.removeFilterRepresentation(filterRepresentation);
}
use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.
the class ExportDialog method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
mHandler = new Handler(getActivity().getMainLooper());
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View view = initCustomLayout();
builder.setView(view);
builder.setTitle(R.string.export_flattened);
builder.setPositiveButton(R.string.done, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
FilterShowActivity activity = (FilterShowActivity) getActivity();
Uri sourceUri = MasterImage.getImage().getUri();
File dest = SaveImage.getNewFile(activity, activity.getSelectedImageUri());
float scaleFactor = mExportWidth / (float) mOriginalBounds.width();
if (!activity.isWaterMarked()) {
Intent processIntent = ProcessingService.getSaveIntent(activity, MasterImage.getImage().getPreset(), dest, activity.getSelectedImageUri(), sourceUri, true, mSeekBar.getProgress(), scaleFactor, false, -1);
activity.startService(processIntent);
} else {
activity.getSaveWaterMark().saveImage(activity, MasterImage.getImage().getHighresImage(), activity.getSelectedImageUri(), null, mSeekBar.getProgress(), scaleFactor, true);
}
}
});
builder.setNegativeButton(R.string.cancel, null);
updateCompressionFactor();
updateSize();
return builder.create();
}
Aggregations