diff --git a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java index 242cc30c..986fef92 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java @@ -318,6 +318,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment mode.finish(); return true; case R.id.cab_share: + shareFiles(); + mode.finish(); return true; case R.id.cab_copy: displayCopyDialog(); @@ -332,6 +334,26 @@ public class ItemsFragment extends android.support.v4.app.Fragment } } + private void shareFiles() { + final List itemIndexes = getSelectedItemIndexes(); + if (itemIndexes.isEmpty()) + return; + + final ArrayList uris = new ArrayList<>(itemIndexes.size()); + for (int i : itemIndexes) { + final File file = new File(mItems.get(i).getPath()); + uris.add(Uri.fromFile(file)); + } + + final String shareTitle = getResources().getString(R.string.share_via); + final Intent sendIntent = new Intent(); + sendIntent.setAction(Intent.ACTION_SEND_MULTIPLE); + sendIntent.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.shared_files)); + sendIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris); + sendIntent.setType("*/*"); + startActivity(Intent.createChooser(sendIntent, shareTitle)); + } + private void displayRenameDialog() { final List itemIndexes = getSelectedItemIndexes(); if (itemIndexes.isEmpty()) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 114748b0..c2ded683 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -1,5 +1,6 @@ Simple File Manager + Condividi via Serve l\'autorizzazione per accedere all\'archiviazione Nessuna app disponibile per aprire questo tipo di file Crea nuovo elemento @@ -14,7 +15,8 @@ Annulla Rinomina Copia - Share + Condividi + Files shared via Simple File Manager Copia elemento Copia elementi Sposta diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 5a3b93cf..de756dab 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -1,5 +1,6 @@ シンプル ファイル マネージャー + 共有 ストレージにアクセスするアクセス許可が必要です この種類のファイルを開くことができるアプリがありません 新しいアイテムを作成 @@ -14,7 +15,8 @@ 元に戻す 名前を変更 コピー - Share + Dela + Files shared via Simple File Manager アイテムをコピー アイテムをコピー 移動 diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 6e027cf9..a49f912d 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -1,5 +1,6 @@ Simple File Manager + Dela via Vi behöver tillgång till ditt lagringsutrymme Det finns ingen app tillgänglig för att öppna denna typ av fil Skapa nytt objektm @@ -14,7 +15,8 @@ Ångra Döp om Kopiera - Share + Dela + Files shared via Simple File Manager Kopiera objekt Kopiera objekt Flytta diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0f73cdef..eb502225 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,6 @@ Simple File Manager + Share via We need the permission to access your storage No app for opening this type of files is available Create new item @@ -15,6 +16,7 @@ Rename Copy Share + Files shared via Simple File Manager Copy item Copy items Move