allow editing images with different apps too

This commit is contained in:
tibbi 2016-10-07 23:52:01 +02:00
parent a856a4a0f9
commit b2cea47c8d
8 changed files with 23 additions and 3 deletions

View file

@ -178,9 +178,15 @@ public class ViewPagerActivity extends SimpleActivity
} }
private void openEditor() { private void openEditor() {
final Intent intent = new Intent(getApplicationContext(), EditActivity.class); final Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setData(Uri.fromFile(getCurrentFile())); intent.setDataAndType(Uri.fromFile(getCurrentFile()), "image/*");
startActivityForResult(intent, EDIT_IMAGE); final Intent chooser = Intent.createChooser(intent, getString(R.string.edit_image_with));
if (intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(chooser, EDIT_IMAGE);
} else {
Utils.showToast(getApplicationContext(), R.string.no_editor_found);
}
} }
@Override @Override

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">Über</string> <string name="about">Über</string>

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">Acerca de</string> <string name="about">Acerca de</string>

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">Informazioni</string> <string name="about">Informazioni</string>

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">アプリについて</string> <string name="about">アプリについて</string>

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">Sobre</string> <string name="about">Sobre</string>

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">Om</string> <string name="about">Om</string>

View file

@ -50,6 +50,8 @@
<string name="image_croping_failed">Image croping failed:</string> <string name="image_croping_failed">Image croping failed:</string>
<string name="invalid_image_path">Invalid image path</string> <string name="invalid_image_path">Invalid image path</string>
<string name="image_editing_failed">Image editing failed</string> <string name="image_editing_failed">Image editing failed</string>
<string name="edit_image_with">Edit image with:</string>
<string name="no_editor_found">No image editor found</string>
<!-- About --> <!-- About -->
<string name="about">About</string> <string name="about">About</string>