From dc2d7edc56fde6db6ee0e3e378900c8eff408d7a Mon Sep 17 00:00:00 2001 From: tobiaskaminsky Date: Wed, 15 Nov 2017 20:42:49 +0100 Subject: [PATCH] combine send/share --- .../android/files/FileMenuFilter.java | 13 +- .../files/services/FileDownloader.java | 8 +- .../operations/DownloadFileOperation.java | 15 +- .../ui/activity/FileDisplayActivity.java | 48 +++-- .../android/ui/adapter/SendButtonAdapter.java | 88 +++++++++ .../android/ui/components/SendButtonData.java | 54 ++++++ .../android/ui/dialog/SendShareDialog.java | 169 ++++++++++++++++++ .../ui/fragment/FileDetailFragment.java | 19 +- .../ui/fragment/OCFileListFragment.java | 32 +--- .../ui/helpers/FileOperationsHelper.java | 29 ++- .../ui/preview/PreviewImageFragment.java | 17 +- .../ui/preview/PreviewMediaFragment.java | 22 +-- .../ui/preview/PreviewTextFragment.java | 15 +- src/main/res/layout/file_details_fragment.xml | 14 +- src/main/res/layout/send_button.xml | 37 ++++ src/main/res/layout/send_share_fragment.xml | 102 +++++++++++ src/main/res/menu/file_actions_menu.xml | 10 +- src/main/res/values-ar/strings.xml | 2 +- src/main/res/values-ast/strings.xml | 2 +- src/main/res/values-b+en+001/strings.xml | 2 +- src/main/res/values-bg-rBG/strings.xml | 2 +- src/main/res/values-ca/strings.xml | 2 +- src/main/res/values-cs-rCZ/strings.xml | 2 +- src/main/res/values-da/strings.xml | 2 +- src/main/res/values-de-rDE/strings.xml | 2 +- src/main/res/values-de/strings.xml | 2 +- src/main/res/values-el/strings.xml | 2 +- src/main/res/values-es-rAR/strings.xml | 2 +- src/main/res/values-es-rCL/strings.xml | 2 +- src/main/res/values-es-rCO/strings.xml | 2 +- src/main/res/values-es-rCR/strings.xml | 2 +- src/main/res/values-es-rDO/strings.xml | 2 +- src/main/res/values-es-rEC/strings.xml | 2 +- src/main/res/values-es-rGT/strings.xml | 2 +- src/main/res/values-es-rHN/strings.xml | 2 +- src/main/res/values-es-rMX/strings.xml | 2 +- src/main/res/values-es-rNI/strings.xml | 2 +- src/main/res/values-es-rPA/strings.xml | 2 +- src/main/res/values-es-rPE/strings.xml | 2 +- src/main/res/values-es-rPR/strings.xml | 2 +- src/main/res/values-es-rPY/strings.xml | 2 +- src/main/res/values-es-rSV/strings.xml | 2 +- src/main/res/values-es-rUY/strings.xml | 2 +- src/main/res/values-es/strings.xml | 2 +- src/main/res/values-eu/strings.xml | 2 +- src/main/res/values-fa/strings.xml | 2 +- src/main/res/values-fi-rFI/strings.xml | 2 +- src/main/res/values-fr/strings.xml | 2 +- src/main/res/values-hu-rHU/strings.xml | 2 +- src/main/res/values-id/strings.xml | 2 +- src/main/res/values-is/strings.xml | 2 +- src/main/res/values-it/strings.xml | 2 +- src/main/res/values-ja-rJP/strings.xml | 2 +- src/main/res/values-ka-rGE/strings.xml | 2 +- src/main/res/values-ko/strings.xml | 2 +- src/main/res/values-lt-rLT/strings.xml | 2 +- src/main/res/values-nb-rNO/strings.xml | 2 +- src/main/res/values-nl/strings.xml | 2 +- src/main/res/values-pl/strings.xml | 2 +- src/main/res/values-pt-rBR/strings.xml | 2 +- src/main/res/values-ro/strings.xml | 2 +- src/main/res/values-ru/strings.xml | 2 +- src/main/res/values-sk-rSK/strings.xml | 2 +- src/main/res/values-sl/strings.xml | 2 +- src/main/res/values-sq/strings.xml | 2 +- src/main/res/values-sr/strings.xml | 2 +- src/main/res/values-sv/strings.xml | 2 +- src/main/res/values-tr/strings.xml | 2 +- src/main/res/values-zh-rCN/strings.xml | 2 +- src/main/res/values-zh-rTW/strings.xml | 2 +- src/main/res/values/strings.xml | 6 +- 71 files changed, 611 insertions(+), 193 deletions(-) create mode 100644 src/main/java/com/owncloud/android/ui/adapter/SendButtonAdapter.java create mode 100644 src/main/java/com/owncloud/android/ui/components/SendButtonData.java create mode 100644 src/main/java/com/owncloud/android/ui/dialog/SendShareDialog.java create mode 100644 src/main/res/layout/send_button.xml create mode 100644 src/main/res/layout/send_share_fragment.xml diff --git a/src/main/java/com/owncloud/android/files/FileMenuFilter.java b/src/main/java/com/owncloud/android/files/FileMenuFilter.java index 1c0fa469da..04241c3c72 100644 --- a/src/main/java/com/owncloud/android/files/FileMenuFilter.java +++ b/src/main/java/com/owncloud/android/files/FileMenuFilter.java @@ -242,9 +242,9 @@ public class FileMenuFilter { ); if ((!shareViaLinkAllowed && !shareWithUsersAllowed) || !isSingleSelection() || !shareApiEnabled || mOverflowMenu) { - toHide.add(R.id.action_share_file); + toHide.add(R.id.action_send_share_file); } else { - toShow.add(R.id.action_share_file); + toShow.add(R.id.action_send_share_file); } // SEE DETAILS @@ -254,15 +254,6 @@ public class FileMenuFilter { toShow.add(R.id.action_see_details); } - // SEND - boolean sendAllowed = (mContext != null && - mContext.getString(R.string.send_files_to_other_apps).equalsIgnoreCase("on")); - if (!isSingleFile() || !sendAllowed || synchronizing) { - toHide.add(R.id.action_send_file); - } else { - toShow.add(R.id.action_send_file); - } - // Kept available offline if (!allFiles() || synchronizing || allKeptAvailableOffline()) { toHide.add(R.id.action_keep_files_offline); diff --git a/src/main/java/com/owncloud/android/files/services/FileDownloader.java b/src/main/java/com/owncloud/android/files/services/FileDownloader.java index 5cd2bc550f..a6db0e2335 100644 --- a/src/main/java/com/owncloud/android/files/services/FileDownloader.java +++ b/src/main/java/com/owncloud/android/files/services/FileDownloader.java @@ -55,6 +55,7 @@ import com.owncloud.android.lib.resources.files.FileUtils; import com.owncloud.android.operations.DownloadFileOperation; import com.owncloud.android.ui.activity.FileActivity; import com.owncloud.android.ui.activity.FileDisplayActivity; +import com.owncloud.android.ui.dialog.SendShareDialog; import com.owncloud.android.ui.fragment.OCFileListFragment; import com.owncloud.android.ui.notifications.NotificationUtils; import com.owncloud.android.ui.preview.PreviewImageActivity; @@ -182,9 +183,12 @@ public class FileDownloader extends Service final Account account = intent.getParcelableExtra(EXTRA_ACCOUNT); final OCFile file = intent.getParcelableExtra(EXTRA_FILE); final String behaviour = intent.getStringExtra(OCFileListFragment.DOWNLOAD_BEHAVIOUR); + String activityName = intent.getStringExtra(SendShareDialog.ACTIVITY_NAME); + String packageName = intent.getStringExtra(SendShareDialog.PACKAGE_NAME); AbstractList requestedDownloads = new Vector(); try { - DownloadFileOperation newDownload = new DownloadFileOperation(account, file, behaviour); + DownloadFileOperation newDownload = new DownloadFileOperation(account, file, behaviour, activityName, + packageName); newDownload.addDatatransferProgressListener(this); newDownload.addDatatransferProgressListener((FileDownloaderBinder) mBinder); Pair putResult = mPendingDownloads.putIfAbsent( @@ -648,6 +652,8 @@ public class FileDownloader extends Service end.putExtra(EXTRA_REMOTE_PATH, download.getRemotePath()); end.putExtra(EXTRA_FILE_PATH, download.getSavePath()); end.putExtra(OCFileListFragment.DOWNLOAD_BEHAVIOUR, download.getBehaviour()); + end.putExtra(SendShareDialog.ACTIVITY_NAME, download.getActivityName()); + end.putExtra(SendShareDialog.PACKAGE_NAME, download.getPackageName()); if (unlinkedFromRemotePath != null) { end.putExtra(EXTRA_LINKED_TO_PATH, unlinkedFromRemotePath); } diff --git a/src/main/java/com/owncloud/android/operations/DownloadFileOperation.java b/src/main/java/com/owncloud/android/operations/DownloadFileOperation.java index c796d5c613..3a0d91a228 100644 --- a/src/main/java/com/owncloud/android/operations/DownloadFileOperation.java +++ b/src/main/java/com/owncloud/android/operations/DownloadFileOperation.java @@ -56,9 +56,12 @@ public class DownloadFileOperation extends RemoteOperation { private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false); private DownloadRemoteFileOperation mDownloadOperation; + private String mActivityName; + private String mPackageName; - public DownloadFileOperation(Account account, OCFile file, String behaviour) { + public DownloadFileOperation(Account account, OCFile file, String behaviour, String activityName, + String packageName) { if (account == null) { throw new IllegalArgumentException("Illegal null account in DownloadFileOperation " + "creation"); @@ -71,6 +74,8 @@ public class DownloadFileOperation extends RemoteOperation { mAccount = account; mFile = file; mBehaviour = behaviour; + mActivityName = activityName; + mPackageName = packageName; } @@ -201,4 +206,12 @@ public class DownloadFileOperation extends RemoteOperation { mDataTransferListeners.remove(listener); } } + + public String getActivityName() { + return mActivityName; + } + + public String getPackageName() { + return mPackageName; + } } diff --git a/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java index 98fedb13e8..c94d8a1845 100644 --- a/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -86,6 +86,7 @@ import com.owncloud.android.operations.SynchronizeFileOperation; import com.owncloud.android.operations.UploadFileOperation; import com.owncloud.android.services.observer.FileObserverService; import com.owncloud.android.syncadapter.FileSyncAdapter; +import com.owncloud.android.ui.dialog.SendShareDialog; import com.owncloud.android.ui.dialog.SortingOrderDialogFragment; import com.owncloud.android.ui.events.SyncEventFinished; import com.owncloud.android.ui.events.TokenPushEvent; @@ -1447,7 +1448,10 @@ public class FileDisplayActivity extends HookActivity if (mWaitingToSend.isDown() && downloadBehaviour != null) { switch (downloadBehaviour) { case OCFileListFragment.DOWNLOAD_SEND: - sendDownloadedFile(); + String packageName = intent.getStringExtra(SendShareDialog.PACKAGE_NAME); + String activityName = intent.getStringExtra(SendShareDialog.ACTIVITY_NAME); + + sendDownloadedFile(packageName, activityName); break; default: // do nothing @@ -1559,19 +1563,16 @@ public class FileDisplayActivity extends HookActivity @Override public void onServiceConnected(ComponentName component, IBinder service) { - if (component.equals(new ComponentName( - FileDisplayActivity.this, FileDownloader.class))) { + if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) { Log_OC.d(TAG, "Download service connected"); mDownloaderBinder = (FileDownloaderBinder) service; if (mWaitingToPreview != null && getStorageManager() != null) { // update the file - mWaitingToPreview = - getStorageManager().getFileById(mWaitingToPreview.getFileId()); + mWaitingToPreview = getStorageManager().getFileById(mWaitingToPreview.getFileId()); if (!mWaitingToPreview.isDown()) { requestForDownload(); } } - } else if (component.equals(new ComponentName(FileDisplayActivity.this, FileUploader.class))) { Log_OC.d(TAG, "Upload service connected"); @@ -1596,12 +1597,10 @@ public class FileDisplayActivity extends HookActivity @Override public void onServiceDisconnected(ComponentName component) { - if (component.equals(new ComponentName(FileDisplayActivity.this, - FileDownloader.class))) { + if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) { Log_OC.d(TAG, "Download service disconnected"); mDownloaderBinder = null; - } else if (component.equals(new ComponentName(FileDisplayActivity.this, - FileUploader.class))) { + } else if (component.equals(new ComponentName(FileDisplayActivity.this, FileUploader.class))) { Log_OC.d(TAG, "Upload service disconnected"); mUploaderBinder = null; } @@ -1967,19 +1966,35 @@ public class FileDisplayActivity extends HookActivity } } - private void requestForDownload(OCFile file, String downloadBehaviour) { + private void requestForDownload(OCFile file, String downloadBehaviour, String packageName, String activityName) { Account account = getAccount(); if (!mDownloaderBinder.isDownloading(account, mWaitingToPreview)) { Intent i = new Intent(this, FileDownloader.class); i.putExtra(FileDownloader.EXTRA_ACCOUNT, account); i.putExtra(FileDownloader.EXTRA_FILE, file); + i.putExtra(SendShareDialog.PACKAGE_NAME, packageName); + i.putExtra(SendShareDialog.ACTIVITY_NAME, activityName); i.putExtra(OCFileListFragment.DOWNLOAD_BEHAVIOUR, downloadBehaviour); startService(i); } } - private void sendDownloadedFile() { - getFileOperationsHelper().sendDownloadedFile(mWaitingToSend); + private void sendDownloadedFile(String packageName, String activityName) { + if (mWaitingToSend != null) { + Intent sendIntent = new Intent(Intent.ACTION_SEND); + sendIntent.setType(mWaitingToSend.getMimetype()); + sendIntent.putExtra(Intent.EXTRA_STREAM, mWaitingToSend.getExposedFileUri(this)); + sendIntent.putExtra(Intent.ACTION_SEND, true); + + sendIntent.setComponent(new ComponentName(packageName, activityName)); + + // Show dialog + String sendTitle = getString(R.string.activity_chooser_send_file_title); + startActivity(Intent.createChooser(sendIntent, sendTitle)); + } else { + Log_OC.e(TAG, "Trying to send a NULL OCFile"); + } + mWaitingToSend = null; } @@ -1989,10 +2004,13 @@ public class FileDisplayActivity extends HookActivity * when the download finishes. * * @param file {@link OCFile} to download and preview. + * @param packageName + * @param activityName */ - public void startDownloadForSending(OCFile file, String downloadBehaviour) { + public void startDownloadForSending(OCFile file, String downloadBehaviour, String packageName, + String activityName) { mWaitingToSend = file; - requestForDownload(mWaitingToSend, downloadBehaviour); + requestForDownload(mWaitingToSend, downloadBehaviour, packageName, activityName); boolean hasSecondFragment = (getSecondFragment() != null); updateFragmentsVisibility(hasSecondFragment); } diff --git a/src/main/java/com/owncloud/android/ui/adapter/SendButtonAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/SendButtonAdapter.java new file mode 100644 index 0000000000..efc55b948a --- /dev/null +++ b/src/main/java/com/owncloud/android/ui/adapter/SendButtonAdapter.java @@ -0,0 +1,88 @@ +package com.owncloud.android.ui.adapter; + +/* + * Nextcloud Android client application + * + * @author Tobias Kaminsky + * Copyright (C) 2017 Tobias Kaminsky + * Copyright (C) 2017 Nextcloud GmbH. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.owncloud.android.R; +import com.owncloud.android.ui.components.SendButtonData; + +import java.util.List; + +public class SendButtonAdapter extends RecyclerView.Adapter { + + private List sendButtonDataList; + private ClickListener clickListener; + + public SendButtonAdapter(List sendButtonDataList, ClickListener clickListener) { + this.sendButtonDataList = sendButtonDataList; + this.clickListener = clickListener; + } + + @Override + public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.send_button, parent, false)); + } + + @Override + public void onBindViewHolder(ViewHolder holder, int position) { + holder.setData(sendButtonDataList.get(position)); + } + + @Override + public int getItemCount() { + return sendButtonDataList.size(); + } + + public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { + + private TextView sendButton; + private SendButtonData sendButtonDataData; + + public ViewHolder(View itemView) { + super(itemView); + itemView.setOnClickListener(this); + sendButton = (TextView) itemView.findViewById(R.id.send_button); + } + + @Override + public void onClick(View v) { + if (clickListener != null) { + clickListener.onClick(sendButtonDataData); + } + } + + public void setData(SendButtonData item) { + sendButtonDataData = item; + sendButton.setCompoundDrawablesWithIntrinsicBounds(null, item.getDrawable(), null, null); + sendButton.setText(item.getTitle()); + } + } + + public interface ClickListener { + void onClick(SendButtonData sendButtonDataData); + } +} diff --git a/src/main/java/com/owncloud/android/ui/components/SendButtonData.java b/src/main/java/com/owncloud/android/ui/components/SendButtonData.java new file mode 100644 index 0000000000..5da562d1b5 --- /dev/null +++ b/src/main/java/com/owncloud/android/ui/components/SendButtonData.java @@ -0,0 +1,54 @@ +package com.owncloud.android.ui.components; + +/* + * Nextcloud Android client application + * + * @author Tobias Kaminsky + * Copyright (C) 2017 Tobias Kaminsky + * Copyright (C) 2017 Nextcloud GmbH. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import android.graphics.drawable.Drawable; + +public class SendButtonData { + private Drawable drawable; + private CharSequence title; + private String packageName; + private String activityName; + + public SendButtonData(Drawable drawable, CharSequence title, String packageName, String activityName) { + this.drawable = drawable; + this.title = title; + this.packageName = packageName; + this.activityName = activityName; + } + + public Drawable getDrawable() { + return drawable; + } + + public CharSequence getTitle() { + return title; + } + + public String getPackageName() { + return packageName; + } + + public String getActivityName() { + return activityName; + } +} \ No newline at end of file diff --git a/src/main/java/com/owncloud/android/ui/dialog/SendShareDialog.java b/src/main/java/com/owncloud/android/ui/dialog/SendShareDialog.java new file mode 100644 index 0000000000..f53864fc94 --- /dev/null +++ b/src/main/java/com/owncloud/android/ui/dialog/SendShareDialog.java @@ -0,0 +1,169 @@ +package com.owncloud.android.ui.dialog; + +import android.content.ComponentName; +import android.content.Intent; +import android.content.pm.ResolveInfo; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.design.widget.BottomSheetDialogFragment; +import android.support.design.widget.Snackbar; +import android.support.v7.widget.GridLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.owncloud.android.R; +import com.owncloud.android.datamodel.OCFile; +import com.owncloud.android.lib.common.utils.Log_OC; +import com.owncloud.android.ui.activity.FileDisplayActivity; +import com.owncloud.android.ui.adapter.SendButtonAdapter; +import com.owncloud.android.ui.components.SendButtonData; +import com.owncloud.android.ui.fragment.OCFileListFragment; +import com.owncloud.android.ui.helpers.FileOperationsHelper; +import com.owncloud.android.utils.MimeTypeUtil; + +import java.util.ArrayList; +import java.util.List; + +/* + * Nextcloud Android client application + * + * @author Tobias Kaminsky + * Copyright (C) 2017 Tobias Kaminsky + * Copyright (C) 2017 Nextcloud GmbH. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +public class SendShareDialog extends BottomSheetDialogFragment { + + private static final String KEY_OCFILE = "KEY_OCFILE"; + private static final String TAG = SendShareDialog.class.getSimpleName(); + public static final String PACKAGE_NAME = "PACKAGE_NAME"; + public static final String ACTIVITY_NAME = "ACTIVITY_NAME"; + + private View view; + private OCFile file; + private FileOperationsHelper fileOperationsHelper; + private FileDisplayActivity fileDisplayActivity; + + public static SendShareDialog newInstance(OCFile file) { + + SendShareDialog dialogFragment = new SendShareDialog(); + + Bundle args = new Bundle(); + args.putParcelable(KEY_OCFILE, file); + dialogFragment.setArguments(args); + + return dialogFragment; + } + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // keep the state of the fragment on configuration changes + setRetainInstance(true); + + view = null; + + file = getArguments().getParcelable(KEY_OCFILE); + } + + @Nullable + @Override + public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + + view = inflater.inflate(R.layout.send_share_fragment, container, false); + + // Share with people + TextView sharePeopleButton = (TextView) view.findViewById(R.id.share_people_button); + + sharePeopleButton.setOnClickListener(v -> fileOperationsHelper.showShareFile(file)); + + + // Share via link button + TextView shareLinkButton = (TextView) view.findViewById(R.id.share_link_button); + + if (file.isSharedWithMe() && !file.canReshare()) { + Snackbar.make(view, R.string.resharing_is_not_allowed, Snackbar.LENGTH_LONG).show(); + shareLinkButton.setVisibility(View.GONE); + } + + shareLinkButton.setOnClickListener(v -> fileOperationsHelper.showShareFile(file)); + + + // populate send apps + Intent sendIntent = new Intent(Intent.ACTION_SEND); + sendIntent.setType(file.getMimetype()); + sendIntent.putExtra(Intent.EXTRA_STREAM, file.getExposedFileUri(getActivity())); + sendIntent.putExtra(Intent.ACTION_SEND, true); + + List sendButtonDataList = new ArrayList<>(); + for (ResolveInfo match : getActivity().getPackageManager().queryIntentActivities(sendIntent, 0)) { + Drawable icon = match.loadIcon(getActivity().getPackageManager()); + CharSequence label = match.loadLabel(getActivity().getPackageManager()); + SendButtonData sendButtonData = new SendButtonData(icon, label, + match.activityInfo.packageName, + match.activityInfo.name); + + sendButtonDataList.add(sendButtonData); + } + + if (getContext().getString(R.string.send_files_to_other_apps).equalsIgnoreCase("off")) { + sharePeopleButton.setVisibility(View.GONE); + } + + SendButtonAdapter.ClickListener clickListener = sendButtonDataData -> { + + if (MimeTypeUtil.isImage(file) && !file.isDown()) { + fileOperationsHelper.sendCachedImage(file); + } else { + String packageName = sendButtonDataData.getPackageName(); + String activityName = sendButtonDataData.getActivityName(); + + // Obtain the file + if (file.isDown()) { + sendIntent.setComponent(new ComponentName(packageName, activityName)); + getActivity().startActivity(Intent.createChooser(sendIntent, getString(R.string.send))); + + } else { // Download the file + Log_OC.d(TAG, file.getRemotePath() + ": File must be downloaded"); + fileDisplayActivity.startDownloadForSending(file, OCFileListFragment.DOWNLOAD_SEND, + packageName, activityName); + } + } + + dismiss(); + }; + + RecyclerView sendButtonsView = (RecyclerView) view.findViewById(R.id.send_button_recycler_view); + sendButtonsView.setHasFixedSize(true); + sendButtonsView.setLayoutManager(new GridLayoutManager(getActivity(), 3)); + sendButtonsView.setAdapter(new SendButtonAdapter(sendButtonDataList, clickListener)); + + + return view; + } + + public void setFileOperationsHelper(FileOperationsHelper fileOperationsHelper) { + this.fileOperationsHelper = fileOperationsHelper; + } + + public void setFileDisplayActivity(FileDisplayActivity fileDisplayActivity) { + this.fileDisplayActivity = fileDisplayActivity; + } +} diff --git a/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java b/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java index 08e0e36b5d..7023bbd490 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -137,11 +137,11 @@ public class FileDetailFragment extends FileFragment implements OnClickListener, public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - setFile((OCFile) getArguments().getParcelable(ARG_FILE)); + setFile(getArguments().getParcelable(ARG_FILE)); mAccount = getArguments().getParcelable(ARG_ACCOUNT); if (savedInstanceState != null) { - setFile((OCFile) savedInstanceState.getParcelable(FileActivity.EXTRA_FILE)); + setFile(savedInstanceState.getParcelable(FileActivity.EXTRA_FILE)); mAccount = savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT); } @@ -292,7 +292,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener, item.setEnabled(false); } - item = menu.findItem(R.id.action_share_file); + item = menu.findItem(R.id.action_send_share_file); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); if(getFile().isSharedWithMe() && !getFile().canReshare()){ @@ -311,8 +311,9 @@ public class FileDetailFragment extends FileFragment implements OnClickListener, @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { - case R.id.action_share_file: { - mContainerActivity.getFileOperationsHelper().showShareFile(getFile()); + case R.id.action_send_share_file: { + mContainerActivity.getFileOperationsHelper().sendShareFile(getFile(), + (FileDisplayActivity) mContainerActivity); return true; } case R.id.action_open_file_with: { @@ -338,14 +339,6 @@ public class FileDetailFragment extends FileFragment implements OnClickListener, mContainerActivity.getFileOperationsHelper().syncFile(getFile()); return true; } - case R.id.action_send_file: { - if (getFile().isDown()) { - mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile()); - } else { - mContainerActivity.getFileOperationsHelper().sendCachedImage(getFile()); - } - return true; - } default: return super.onOptionsItemSelected(item); } diff --git a/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java index a725efed23..211c981e6d 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -516,7 +516,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi @Override public void onShareIconClick(OCFile file) { - shareFile(file); + mContainerActivity.getFileOperationsHelper().sendShareFile(file, (FileDisplayActivity) mContainerActivity); } @Override @@ -946,8 +946,9 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi /// action only possible on a single file OCFile singleFile = checkedFiles.get(0); switch (menuId) { - case R.id.action_share_file: { - shareFile(singleFile); + case R.id.action_send_share_file: { + mContainerActivity.getFileOperationsHelper().sendShareFile(singleFile, + (FileDisplayActivity) mContainerActivity); return true; } case R.id.action_open_file_with: { @@ -966,23 +967,6 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi mContainerActivity.showDetails(singleFile); return true; } - case R.id.action_send_file: { - if (MimeTypeUtil.isImage(singleFile) && !singleFile.isDown()) { - mContainerActivity.getFileOperationsHelper().sendCachedImage(singleFile); - return true; - } else { - // Obtain the file - if (!singleFile.isDown()) { // Download the file - Log_OC.d(TAG, singleFile.getRemotePath() + " : File must be downloaded"); - ((FileDisplayActivity) mContainerActivity).startDownloadForSending(singleFile, - DOWNLOAD_SEND); - - } else { - mContainerActivity.getFileOperationsHelper().sendDownloadedFile(singleFile); - } - return true; - } - } case R.id.action_set_as_wallpaper: { mContainerActivity.getFileOperationsHelper().setPictureAs(singleFile, getView()); return true; @@ -1049,14 +1033,6 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi } } - private void shareFile(OCFile file) { - if(file.isSharedWithMe() && !file.canReshare()){ - Snackbar.make(getView(), R.string.resharing_is_not_allowed, Snackbar.LENGTH_LONG).show(); - } else { - mContainerActivity.getFileOperationsHelper().showShareFile(file); - } - } - /** * Use this to query the {@link OCFile} that is currently * being displayed by this fragment diff --git a/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java b/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java index 16e14af627..f7ed9a3710 100755 --- a/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java +++ b/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java @@ -31,6 +31,8 @@ import android.net.Uri; import android.os.Build; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentTransaction; import android.support.v4.content.FileProvider; import android.view.View; import android.webkit.MimeTypeMap; @@ -52,7 +54,9 @@ import com.owncloud.android.services.OperationsService; import com.owncloud.android.services.observer.FileObserverService; import com.owncloud.android.ui.activity.ConflictsResolveActivity; import com.owncloud.android.ui.activity.FileActivity; +import com.owncloud.android.ui.activity.FileDisplayActivity; import com.owncloud.android.ui.activity.ShareActivity; +import com.owncloud.android.ui.dialog.SendShareDialog; import com.owncloud.android.ui.events.FavoriteEvent; import com.owncloud.android.ui.events.SyncEventFinished; import com.owncloud.android.utils.DisplayUtils; @@ -539,23 +543,16 @@ public class FileOperationsHelper { return false; } - public void sendDownloadedFile(OCFile file) { - if (file != null) { - Intent sendIntent = new Intent(Intent.ACTION_SEND); - // set MimeType - sendIntent.setType(file.getMimetype()); - sendIntent.putExtra( - Intent.EXTRA_STREAM, - file.getExposedFileUri(mFileActivity) - ); - sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action + public void sendShareFile(OCFile file, FileDisplayActivity fileDisplayActivity) { + // Show dialog + FragmentManager fm = mFileActivity.getSupportFragmentManager(); + FragmentTransaction ft = fm.beginTransaction(); + ft.addToBackStack(null); - // Show dialog - final String sendTitle = mFileActivity.getString(R.string.activity_chooser_send_file_title); - mFileActivity.startActivity(Intent.createChooser(sendIntent, sendTitle)); - } else { - Log_OC.e(TAG, "Trying to send a NULL OCFile"); - } + SendShareDialog mSendShareDialog = SendShareDialog.newInstance(file); + mSendShareDialog.setFileOperationsHelper(this); + mSendShareDialog.setFileDisplayActivity(fileDisplayActivity); + mSendShareDialog.show(ft, "TAG_12"); } public void syncFiles(Collection files) { diff --git a/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java b/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java index b1f789e54e..2a024ee386 100644 --- a/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java +++ b/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java @@ -60,6 +60,7 @@ import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.datamodel.ThumbnailsCacheManager; import com.owncloud.android.files.FileMenuFilter; import com.owncloud.android.lib.common.utils.Log_OC; +import com.owncloud.android.ui.activity.FileDisplayActivity; import com.owncloud.android.ui.dialog.ConfirmationDialogFragment; import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment; import com.owncloud.android.ui.fragment.FileFragment; @@ -404,7 +405,7 @@ public class PreviewImageFragment extends FileFragment { if(getFile().isSharedWithMe() && !getFile().canReshare()){ // additional restriction for this fragment - item = menu.findItem(R.id.action_share_file); + item = menu.findItem(R.id.action_send_share_file); if(item != null){ item.setVisible(false); item.setEnabled(false); @@ -420,8 +421,9 @@ public class PreviewImageFragment extends FileFragment { @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { - case R.id.action_share_file: - mContainerActivity.getFileOperationsHelper().showShareFile(getFile()); + case R.id.action_send_share_file: + mContainerActivity.getFileOperationsHelper().sendShareFile(getFile(), + (FileDisplayActivity) mContainerActivity); return true; case R.id.action_open_file_with: @@ -437,15 +439,6 @@ public class PreviewImageFragment extends FileFragment { seeDetails(); return true; - case R.id.action_send_file: - if (MimeTypeUtil.isImage(getFile()) && !getFile().isDown()) { - mContainerActivity.getFileOperationsHelper().sendCachedImage(getFile()); - return true; - } else { - mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile()); - return true; - } - case R.id.action_download_file: case R.id.action_sync_file: mContainerActivity.getFileOperationsHelper().syncFile(getFile()); diff --git a/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java index 54a9dff9e3..83f8019e5b 100644 --- a/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java +++ b/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java @@ -169,7 +169,7 @@ public class PreviewMediaFragment extends FileFragment implements Bundle bundle = getArguments(); - setFile((OCFile) bundle.getParcelable(FILE)); + setFile(bundle.getParcelable(FILE)); mAccount = bundle.getParcelable(ACCOUNT); mSavedPlaybackPosition = bundle.getInt(PLAYBACK_POSITION); mAutoplay = bundle.getBoolean(AUTOPLAY); @@ -427,7 +427,7 @@ public class PreviewMediaFragment extends FileFragment implements if(getFile().isSharedWithMe() && !getFile().canReshare()){ // additional restriction for this fragment - item = menu.findItem(R.id.action_share_file); + item = menu.findItem(R.id.action_send_share_file); if(item != null){ item.setVisible(false); item.setEnabled(false); @@ -443,8 +443,8 @@ public class PreviewMediaFragment extends FileFragment implements @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { - case R.id.action_share_file: { - seeShareFile(); + case R.id.action_send_share_file: { + sendShareFile(); return true; } case R.id.action_open_file_with: { @@ -460,10 +460,6 @@ public class PreviewMediaFragment extends FileFragment implements seeDetails(); return true; } - case R.id.action_send_file: { - sendFile(); - return true; - } case R.id.action_sync_file: { mContainerActivity.getFileOperationsHelper().syncFile(getFile()); return true; @@ -483,20 +479,14 @@ public class PreviewMediaFragment extends FileFragment implements setFile(file); } - private void sendFile() { - stopPreview(false); - mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile()); - - } - private void seeDetails() { stopPreview(false); mContainerActivity.showDetails(getFile()); } - private void seeShareFile() { + private void sendShareFile() { stopPreview(false); - mContainerActivity.getFileOperationsHelper().showShareFile(getFile()); + mContainerActivity.getFileOperationsHelper().sendShareFile(getFile(), (FileDisplayActivity) mContainerActivity); } private void prepareVideo() { diff --git a/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java b/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java index a3e142ca2e..6b033bfbd3 100644 --- a/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java +++ b/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java @@ -366,7 +366,7 @@ public class PreviewTextFragment extends FileFragment { if(getFile().isSharedWithMe() && !getFile().canReshare()){ // additional restriction for this fragment - item = menu.findItem(R.id.action_share_file); + item = menu.findItem(R.id.action_send_share_file); if(item != null){ item.setVisible(false); item.setEnabled(false); @@ -381,8 +381,9 @@ public class PreviewTextFragment extends FileFragment { @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { - case R.id.action_share_file: { - mContainerActivity.getFileOperationsHelper().showShareFile(getFile()); + case R.id.action_send_share_file: { + mContainerActivity.getFileOperationsHelper().sendShareFile(getFile(), + (FileDisplayActivity) mContainerActivity); return true; } case R.id.action_open_file_with: { @@ -398,10 +399,6 @@ public class PreviewTextFragment extends FileFragment { seeDetails(); return true; } - case R.id.action_send_file: { - sendFile(); - return true; - } case R.id.action_sync_file: { mContainerActivity.getFileOperationsHelper().syncFile(getFile()); return true; @@ -421,10 +418,6 @@ public class PreviewTextFragment extends FileFragment { setFile(file); } - private void sendFile() { - mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile()); - } - private void seeDetails() { mContainerActivity.showDetails(getFile()); } diff --git a/src/main/res/layout/file_details_fragment.xml b/src/main/res/layout/file_details_fragment.xml index 71d70c43a4..204ba583ef 100644 --- a/src/main/res/layout/file_details_fragment.xml +++ b/src/main/res/layout/file_details_fragment.xml @@ -191,13 +191,13 @@ android:orientation="vertical"> + android:id="@+id/fdShareTitle" + style="@style/TextAppearance.AppCompat.Body2" + android:textColor="@color/color_accent" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/standard_half_margin" + android:text="@string/action_send_share"/> + + + + + + \ No newline at end of file diff --git a/src/main/res/layout/send_share_fragment.xml b/src/main/res/layout/send_share_fragment.xml new file mode 100644 index 0000000000..1cf111acb6 --- /dev/null +++ b/src/main/res/layout/send_share_fragment.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/res/menu/file_actions_menu.xml b/src/main/res/menu/file_actions_menu.xml index 75225a1eab..719759655f 100644 --- a/src/main/res/menu/file_actions_menu.xml +++ b/src/main/res/menu/file_actions_menu.xml @@ -23,8 +23,8 @@ tools:ignore="AppCompatResource"> - اضغظ على الملف ليتم عرض خيارات أكثر تحميل زامِن - شارك + شارك نعم لا تم diff --git a/src/main/res/values-ast/strings.xml b/src/main/res/values-ast/strings.xml index 7cdc54b9be..7d8f5fa576 100644 --- a/src/main/res/values-ast/strings.xml +++ b/src/main/res/values-ast/strings.xml @@ -94,7 +94,7 @@ Descargar Sincroniza Renomóse\'l ficheru %1$s na xuba - Compartir + Compartir Non Aceutar diff --git a/src/main/res/values-b+en+001/strings.xml b/src/main/res/values-b+en+001/strings.xml index d9cc6fabce..7fb3f7de86 100644 --- a/src/main/res/values-b+en+001/strings.xml +++ b/src/main/res/values-b+en+001/strings.xml @@ -119,7 +119,7 @@ Synchronise File renamed to %1$s during upload Listed layout - Share + Share Yes No OK diff --git a/src/main/res/values-bg-rBG/strings.xml b/src/main/res/values-bg-rBG/strings.xml index 85e1215501..85e69303ac 100644 --- a/src/main/res/values-bg-rBG/strings.xml +++ b/src/main/res/values-bg-rBG/strings.xml @@ -90,7 +90,7 @@ Натиснете върху файл, за да видите допълнителна информация. Изтегляне Синхронизиране - Споделяне + Споделяне Да Не ОК diff --git a/src/main/res/values-ca/strings.xml b/src/main/res/values-ca/strings.xml index 7d25a19931..3444e18762 100644 --- a/src/main/res/values-ca/strings.xml +++ b/src/main/res/values-ca/strings.xml @@ -119,7 +119,7 @@ Sincronitza S\'ha canviat el nom del fitxer %1$sdurant la càrrega Disposició llistada - Comparteix + Comparteix No D\'acord diff --git a/src/main/res/values-cs-rCZ/strings.xml b/src/main/res/values-cs-rCZ/strings.xml index c0b5049468..d4b9f3a0db 100644 --- a/src/main/res/values-cs-rCZ/strings.xml +++ b/src/main/res/values-cs-rCZ/strings.xml @@ -119,7 +119,7 @@ Synchronizovat Soubor byl během nahrávání přejmenován na %1$s Náhled seznamu - Sdílet + Sdílet Ano Ne OK diff --git a/src/main/res/values-da/strings.xml b/src/main/res/values-da/strings.xml index 4c9ab7804e..4a5a97a615 100644 --- a/src/main/res/values-da/strings.xml +++ b/src/main/res/values-da/strings.xml @@ -97,7 +97,7 @@ Tryk på en fil for at vise yderligere information. Hent Synkronisér - Del + Del Ja Nej OK diff --git a/src/main/res/values-de-rDE/strings.xml b/src/main/res/values-de-rDE/strings.xml index 5c45fc91ac..f05174091a 100644 --- a/src/main/res/values-de-rDE/strings.xml +++ b/src/main/res/values-de-rDE/strings.xml @@ -119,7 +119,7 @@ Synchronisieren Datei während des Hochladens in %1$s umbenannt Layout der Liste - Teilen + Teilen Ja Nein OK diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml index a56375c492..b3a0992b0e 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -120,7 +120,7 @@ Synchronisation Datei während des Hochladens in %1$s umbenannt Layout der Liste - Teilen + Teilen Ja Nein OK diff --git a/src/main/res/values-el/strings.xml b/src/main/res/values-el/strings.xml index c1f7be7bcd..f05b545f8d 100644 --- a/src/main/res/values-el/strings.xml +++ b/src/main/res/values-el/strings.xml @@ -115,7 +115,7 @@ Συγχρονισμός Το αρχείο μετονομάστηκε σε %1$s κατά τη μεταφόρτωση Διάταξη λίστας - Διαμοιρασμός + Διαμοιρασμός Ναι Όχι Εντάξει diff --git a/src/main/res/values-es-rAR/strings.xml b/src/main/res/values-es-rAR/strings.xml index 2f0d2dee02..ec20b71b33 100644 --- a/src/main/res/values-es-rAR/strings.xml +++ b/src/main/res/values-es-rAR/strings.xml @@ -114,7 +114,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista enlistada - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rCL/strings.xml b/src/main/res/values-es-rCL/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rCL/strings.xml +++ b/src/main/res/values-es-rCL/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rCO/strings.xml b/src/main/res/values-es-rCO/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rCO/strings.xml +++ b/src/main/res/values-es-rCO/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rCR/strings.xml b/src/main/res/values-es-rCR/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rCR/strings.xml +++ b/src/main/res/values-es-rCR/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rDO/strings.xml b/src/main/res/values-es-rDO/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rDO/strings.xml +++ b/src/main/res/values-es-rDO/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rEC/strings.xml b/src/main/res/values-es-rEC/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rEC/strings.xml +++ b/src/main/res/values-es-rEC/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rGT/strings.xml b/src/main/res/values-es-rGT/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rGT/strings.xml +++ b/src/main/res/values-es-rGT/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rHN/strings.xml b/src/main/res/values-es-rHN/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rHN/strings.xml +++ b/src/main/res/values-es-rHN/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rMX/strings.xml b/src/main/res/values-es-rMX/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rMX/strings.xml +++ b/src/main/res/values-es-rMX/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rNI/strings.xml b/src/main/res/values-es-rNI/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rNI/strings.xml +++ b/src/main/res/values-es-rNI/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rPA/strings.xml b/src/main/res/values-es-rPA/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rPA/strings.xml +++ b/src/main/res/values-es-rPA/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rPE/strings.xml b/src/main/res/values-es-rPE/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rPE/strings.xml +++ b/src/main/res/values-es-rPE/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rPR/strings.xml b/src/main/res/values-es-rPR/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rPR/strings.xml +++ b/src/main/res/values-es-rPR/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rPY/strings.xml b/src/main/res/values-es-rPY/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rPY/strings.xml +++ b/src/main/res/values-es-rPY/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rSV/strings.xml b/src/main/res/values-es-rSV/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rSV/strings.xml +++ b/src/main/res/values-es-rSV/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es-rUY/strings.xml b/src/main/res/values-es-rUY/strings.xml index 67faff5b25..3074e4d8e2 100644 --- a/src/main/res/values-es-rUY/strings.xml +++ b/src/main/res/values-es-rUY/strings.xml @@ -119,7 +119,7 @@ Sincronizar El archivo se renombró como %1$s durante la carga Vista de lista - Compartir + Compartir No OK diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml index b461810e8c..1ce0d60ae5 100644 --- a/src/main/res/values-es/strings.xml +++ b/src/main/res/values-es/strings.xml @@ -119,7 +119,7 @@ Sincronizar Archivo renombrado a %1$s durante la subida Formato de lista - Compartir + Compartir No Aceptar diff --git a/src/main/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml index f61b64783f..fa0f93c315 100644 --- a/src/main/res/values-eu/strings.xml +++ b/src/main/res/values-eu/strings.xml @@ -116,7 +116,7 @@ Sinkronizatu Fitxategia igotzean %1$s izenarekin berrizendatu da Zerrenda ikuspegia - Partekatu + Partekatu Bai Ez Ados diff --git a/src/main/res/values-fa/strings.xml b/src/main/res/values-fa/strings.xml index 3a0d5273dc..f321d54057 100644 --- a/src/main/res/values-fa/strings.xml +++ b/src/main/res/values-fa/strings.xml @@ -114,7 +114,7 @@ همگام سازی در حین اپلود فایل به نام %1$s تغییر کرد Listed layout - اشتراک‌گذاری + اشتراک‌گذاری بله نه تایید diff --git a/src/main/res/values-fi-rFI/strings.xml b/src/main/res/values-fi-rFI/strings.xml index ce0c154586..f6b44acb6d 100644 --- a/src/main/res/values-fi-rFI/strings.xml +++ b/src/main/res/values-fi-rFI/strings.xml @@ -106,7 +106,7 @@ Napauta tiedostoa nähdäksesi lisätietoja. Lataa Synkronoi - Jaa + Jaa Kyllä Ei OK diff --git a/src/main/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml index 87a14cff48..e2b8195b18 100644 --- a/src/main/res/values-fr/strings.xml +++ b/src/main/res/values-fr/strings.xml @@ -119,7 +119,7 @@ Synchroniser Le fichier a été renommé en %1$s pendant l\'envoi Affichage en liste - Partager + Partager Oui Non OK diff --git a/src/main/res/values-hu-rHU/strings.xml b/src/main/res/values-hu-rHU/strings.xml index dc114979ef..6903786063 100644 --- a/src/main/res/values-hu-rHU/strings.xml +++ b/src/main/res/values-hu-rHU/strings.xml @@ -119,7 +119,7 @@ Szinkronizálás A fájl feltöltés közben átnevezve erre: %1$s Listás elrendezés - Megosztás + Megosztás Igen Nem OK diff --git a/src/main/res/values-id/strings.xml b/src/main/res/values-id/strings.xml index f1073cb658..a95cb3afaa 100644 --- a/src/main/res/values-id/strings.xml +++ b/src/main/res/values-id/strings.xml @@ -114,7 +114,7 @@ Sinkronisasi Nama berkas diubah menjadi %1$s waktu diunggah Daftar tampilan - Bagikan + Bagikan Ya Tidak Oke diff --git a/src/main/res/values-is/strings.xml b/src/main/res/values-is/strings.xml index b8f30366da..c90bdd5276 100644 --- a/src/main/res/values-is/strings.xml +++ b/src/main/res/values-is/strings.xml @@ -118,7 +118,7 @@ Smelltu hér til að fá þér einn frá þjónustuaðila. Samstilla Skrá endurnefnd sem %1$s við innsendingu Framsetning sem listi - Deila + Deila Nei Í lagi diff --git a/src/main/res/values-it/strings.xml b/src/main/res/values-it/strings.xml index 723348b800..38fe71b58c 100644 --- a/src/main/res/values-it/strings.xml +++ b/src/main/res/values-it/strings.xml @@ -119,7 +119,7 @@ Sincronizza File rinominato in %1$s durante il caricamento Struttura a elenco - Condividi + Condividi No OK diff --git a/src/main/res/values-ja-rJP/strings.xml b/src/main/res/values-ja-rJP/strings.xml index 9e2508a6a3..cb8d35eeb8 100644 --- a/src/main/res/values-ja-rJP/strings.xml +++ b/src/main/res/values-ja-rJP/strings.xml @@ -110,7 +110,7 @@ ダウンロード ファイルを同期 リスト表示 - 共有 + 共有 はい いいえ OK diff --git a/src/main/res/values-ka-rGE/strings.xml b/src/main/res/values-ka-rGE/strings.xml index 483b879b0f..ae2c2c2bf4 100644 --- a/src/main/res/values-ka-rGE/strings.xml +++ b/src/main/res/values-ka-rGE/strings.xml @@ -119,7 +119,7 @@ სინქრონიზაცია ატვირთვისას ფაილს სახელი შეეცვალა %1$s-ზე ჩამოწერილი მაკეტი - გაზიარება + გაზიარება კი არა კარგი diff --git a/src/main/res/values-ko/strings.xml b/src/main/res/values-ko/strings.xml index a5d7259459..6b5d95771f 100644 --- a/src/main/res/values-ko/strings.xml +++ b/src/main/res/values-ko/strings.xml @@ -108,7 +108,7 @@ 동기화 업로드 중 파일이름 %1$s로 변경 목록 보기 - 공유 + 공유 아니요 확인 diff --git a/src/main/res/values-lt-rLT/strings.xml b/src/main/res/values-lt-rLT/strings.xml index 05d53f6b79..65e673859b 100644 --- a/src/main/res/values-lt-rLT/strings.xml +++ b/src/main/res/values-lt-rLT/strings.xml @@ -114,7 +114,7 @@ Sinchronizuojama Įkėlimo metu failas buvo pervadintas į %1$s Išdėstymas sąraše - Dalintis + Dalintis Taip Ne Gerai diff --git a/src/main/res/values-nb-rNO/strings.xml b/src/main/res/values-nb-rNO/strings.xml index b3b066510d..d052f5f0ce 100644 --- a/src/main/res/values-nb-rNO/strings.xml +++ b/src/main/res/values-nb-rNO/strings.xml @@ -119,7 +119,7 @@ Synkroniser Filnavnet ble endret til %1$s under opplasting Listevisning - Del med andre + Del med andre Ja Nei OK diff --git a/src/main/res/values-nl/strings.xml b/src/main/res/values-nl/strings.xml index 7b62e3bb47..45ee34cff8 100644 --- a/src/main/res/values-nl/strings.xml +++ b/src/main/res/values-nl/strings.xml @@ -120,7 +120,7 @@ Kies er eentje van een provider. Synchroniseren Bestand hernoemd naar %1$s tijdens de upload Lijstoverzicht - Delen + Delen Ja Nee OK diff --git a/src/main/res/values-pl/strings.xml b/src/main/res/values-pl/strings.xml index a01839f59c..17753a2790 100644 --- a/src/main/res/values-pl/strings.xml +++ b/src/main/res/values-pl/strings.xml @@ -119,7 +119,7 @@ Synchronizuj Podczas wysyłania zmieniono nazwę pliku na %1$s Wygląd listy - Udostępnij + Udostępnij Tak Nie OK diff --git a/src/main/res/values-pt-rBR/strings.xml b/src/main/res/values-pt-rBR/strings.xml index 072ca37ce6..a73191011b 100644 --- a/src/main/res/values-pt-rBR/strings.xml +++ b/src/main/res/values-pt-rBR/strings.xml @@ -119,7 +119,7 @@ Sincronizar Arquivo renomeado para %1$s durante o envio Layout listado - Compartilhar + Compartilhar Sim Não OK diff --git a/src/main/res/values-ro/strings.xml b/src/main/res/values-ro/strings.xml index 2191991569..fd257fad47 100644 --- a/src/main/res/values-ro/strings.xml +++ b/src/main/res/values-ro/strings.xml @@ -78,7 +78,7 @@ Selectați un fișier pentru a afișa informația adițională. Descarcă Sincronizează - Partajează + Partajează Da Nu OK diff --git a/src/main/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml index 98837ab5c4..64b3b1a778 100644 --- a/src/main/res/values-ru/strings.xml +++ b/src/main/res/values-ru/strings.xml @@ -119,7 +119,7 @@ Синхронизировать Во время передачи на сервер файл был переименован в «%1$s» Вид списком - Общий доступ + Общий доступ Да Нет ОК diff --git a/src/main/res/values-sk-rSK/strings.xml b/src/main/res/values-sk-rSK/strings.xml index 6aace0ed10..422ab0b149 100644 --- a/src/main/res/values-sk-rSK/strings.xml +++ b/src/main/res/values-sk-rSK/strings.xml @@ -104,7 +104,7 @@ Stiahnuť Synchronizovať Náhľad zoznamu - Sprístupniť + Sprístupniť Áno Nie OK diff --git a/src/main/res/values-sl/strings.xml b/src/main/res/values-sl/strings.xml index 8b49e92e1e..b8a95e334e 100644 --- a/src/main/res/values-sl/strings.xml +++ b/src/main/res/values-sl/strings.xml @@ -113,7 +113,7 @@ Prejmi Uskladi Datoteka je bila preimenovana v %1$s med nalaganjem - Souporaba + Souporaba Da Ne V redu diff --git a/src/main/res/values-sq/strings.xml b/src/main/res/values-sq/strings.xml index d724cdb9cd..5f8211e537 100644 --- a/src/main/res/values-sq/strings.xml +++ b/src/main/res/values-sq/strings.xml @@ -117,7 +117,7 @@ Sinkronizo Skedari u riemërtua %1$s gjatë ngarkimit Strukturë e listuar - Ndaje + Ndaje Po Jo OK diff --git a/src/main/res/values-sr/strings.xml b/src/main/res/values-sr/strings.xml index e5286b25fb..f357c55f2c 100644 --- a/src/main/res/values-sr/strings.xml +++ b/src/main/res/values-sr/strings.xml @@ -119,7 +119,7 @@ Синхронизуј Фајл преименован у %1$sза време отпремања Излистани распоред - Дељење + Дељење Да Не У реду diff --git a/src/main/res/values-sv/strings.xml b/src/main/res/values-sv/strings.xml index 71a75d5065..a37325db95 100644 --- a/src/main/res/values-sv/strings.xml +++ b/src/main/res/values-sv/strings.xml @@ -114,7 +114,7 @@ Synkronisera Fil döptes om till %1$s under uppladdning Listad layout - Dela + Dela Ja Nej OK diff --git a/src/main/res/values-tr/strings.xml b/src/main/res/values-tr/strings.xml index 6279c88904..3154b055b5 100644 --- a/src/main/res/values-tr/strings.xml +++ b/src/main/res/values-tr/strings.xml @@ -119,7 +119,7 @@ Eşitle Dosya adı, yükleme sırasında %1$s olarak değiştirildi Liste düzeni - Paylaş + Paylaş Evet Hayır Tamam diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml index c37ecd03d7..7e719a7e8a 100644 --- a/src/main/res/values-zh-rCN/strings.xml +++ b/src/main/res/values-zh-rCN/strings.xml @@ -119,7 +119,7 @@ 同步 文件在上传时被重命名为%1$s 列出的布局 - 共享 + 共享 确定 diff --git a/src/main/res/values-zh-rTW/strings.xml b/src/main/res/values-zh-rTW/strings.xml index 5c193115af..06711ede1a 100644 --- a/src/main/res/values-zh-rTW/strings.xml +++ b/src/main/res/values-zh-rTW/strings.xml @@ -120,7 +120,7 @@ 同步 上傳過程中檔案%1$s被重新命名 清單顯示 - 分享 + 分享 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 5ec09ba6a6..e0e5142e9c 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -120,7 +120,7 @@ Synchronize File renamed to %1$s during upload Listed layout - Share + Send/Share Yes No OK @@ -725,4 +725,8 @@ No information available. No new version available. Folder icon + + Send + Share + Link