From: masensio Date: Mon, 17 Feb 2014 08:20:45 +0000 (+0100) Subject: Merge branch 'develop' into send_file_pr311_with_develop X-Git-Tag: oc-android-1.5.5~22^2~26 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/de2dd7b1b6004fc39665756d9a0946d6621d59e2?hp=a5db2c2f680635cd94906dd880eb865a4020bbe0 Merge branch 'develop' into send_file_pr311_with_develop --- diff --git a/res/values/strings.xml b/res/values/strings.xml index bd672b27..822cb2a8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -252,4 +252,6 @@ An error occurred while trying to share this file or folder Unable to unshare this file or folder. It does not exist. An error occurred while trying to unshare this file or folder + + Send diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index deb981e5..5c6817e3 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -222,7 +222,7 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName toHide.add(R.id.action_cancel_upload); toHide.add(R.id.action_sync_file); toHide.add(R.id.action_see_details); - toHide.add(R.id.action_share_file); + toHide.add(R.id.action_send_file); if ( mContainerActivity.getFileDownloaderBinder().isDownloading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile) || mContainerActivity.getFileUploaderBinder().isUploading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile) ) { toDisable.add(R.id.action_rename_file); @@ -365,8 +365,8 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); // set MimeType sharingIntent.setType(mTargetFile.getMimetype()); - sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+mTargetFile.getStoragePath())); - startActivity(Intent.createChooser(sharingIntent, "Share via")); + sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + mTargetFile.getStoragePath())); + startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.send_file_title_intent))); return true; } default: diff --git a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java index 5a346867..80d5d1ed 100644 --- a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java +++ b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java @@ -311,7 +311,7 @@ public class PreviewImageFragment extends FileFragment implements OnRemoteOper return true; } case R.id.action_send_file: { - shareFile(); + sendFile(); return true; } @@ -320,12 +320,12 @@ public class PreviewImageFragment extends FileFragment implements OnRemoteOper } } - private void shareFile(){ + private void sendFile(){ Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); // set MimeType sharingIntent.setType(getFile().getMimetype()); sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+getFile().getStoragePath())); - startActivity(Intent.createChooser(sharingIntent, "Share via")); + startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.send_file_title_intent))); }