Merge pull request #389 from flyingrub/master
Add feedback when downloading image
This commit is contained in:
commit
e6c5c47cfc
3 changed files with 10 additions and 1 deletions
|
@ -41,6 +41,7 @@ import android.support.v7.widget.Toolbar;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.keylesspalace.tusky.fragment.ViewMediaFragment;
|
import com.keylesspalace.tusky.fragment.ViewMediaFragment;
|
||||||
import com.keylesspalace.tusky.pager.ImagePagerAdapter;
|
import com.keylesspalace.tusky.pager.ImagePagerAdapter;
|
||||||
|
@ -218,6 +219,10 @@ public class ViewMediaActivity extends BaseActivity implements ViewMediaFragment
|
||||||
|
|
||||||
String filename = new File(url).getName();
|
String filename = new File(url).getName();
|
||||||
|
|
||||||
|
String toastText = String.format(getResources().getString(R.string.download_image),
|
||||||
|
filename);
|
||||||
|
Toast.makeText(this.getApplicationContext(), toastText, Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
DownloadManager downloadManager =
|
DownloadManager downloadManager =
|
||||||
(DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
|
(DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@
|
||||||
|
|
||||||
<string name="send_status_link_to">Partager l’URL de votre pouet avec…</string>
|
<string name="send_status_link_to">Partager l’URL de votre pouet avec…</string>
|
||||||
<string name="send_status_content_to">Partager le pouet avec…</string>
|
<string name="send_status_content_to">Partager le pouet avec…</string>
|
||||||
|
<string name="download_image">Téléchargement de %1$s</string>
|
||||||
|
|
||||||
<string name="confirmation_send">Pouet !</string>
|
<string name="confirmation_send">Pouet !</string>
|
||||||
<string name="confirmation_reported">Envoyé !</string>
|
<string name="confirmation_reported">Envoyé !</string>
|
||||||
|
|
|
@ -100,6 +100,9 @@
|
||||||
<string name="action_reject">Reject</string>
|
<string name="action_reject">Reject</string>
|
||||||
<string name="action_search">Search</string>
|
<string name="action_search">Search</string>
|
||||||
<string name="action_access_saved_toot">Drafts</string>
|
<string name="action_access_saved_toot">Drafts</string>
|
||||||
|
|
||||||
|
<string name="download_image">Downloading %1$s</string>
|
||||||
|
|
||||||
<string name="action_copy_link">Copy the link</string>
|
<string name="action_copy_link">Copy the link</string>
|
||||||
|
|
||||||
<string name="send_status_link_to">Share toot URL to…</string>
|
<string name="send_status_link_to">Share toot URL to…</string>
|
||||||
|
|
Loading…
Reference in a new issue