open the image editor at pressing Rotate / crop
This commit is contained in:
parent
c433c897b5
commit
cae7b9458a
1 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package com.simplemobiletools.gallery.activities;
|
||||
|
||||
import android.app.WallpaperManager;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
|
@ -46,6 +47,7 @@ public class ViewPagerActivity extends SimpleActivity
|
|||
@BindView(R.id.undo_delete) View mUndoBtn;
|
||||
@BindView(R.id.view_pager) MyViewPager mPager;
|
||||
|
||||
private static final int EDIT_IMAGE = 1;
|
||||
private static ActionBar mActionbar;
|
||||
private static List<Medium> mMedia;
|
||||
private static String mPath;
|
||||
|
@ -161,6 +163,7 @@ public class ViewPagerActivity extends SimpleActivity
|
|||
editMedium();
|
||||
return true;
|
||||
case R.id.menu_crop_rotate:
|
||||
openEditor();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
@ -174,6 +177,12 @@ public class ViewPagerActivity extends SimpleActivity
|
|||
adapter.confChanged(mPos);
|
||||
}
|
||||
|
||||
private void openEditor() {
|
||||
final Intent intent = new Intent(getApplicationContext(), EditActivity.class);
|
||||
intent.setData(Uri.fromFile(getCurrentFile()));
|
||||
startActivityForResult(intent, EDIT_IMAGE);
|
||||
}
|
||||
|
||||
private void setAsWallpaper() {
|
||||
final Bitmap bitmap = BitmapFactory.decodeFile(getCurrentFile().getAbsolutePath());
|
||||
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
|
||||
|
|
Loading…
Reference in a new issue