From 9b16a179e8512e68bfbcb804bb347630b4a7d5e1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 1 Jun 2017 19:35:25 +0300 Subject: [PATCH] switch to snackbars from toasts --- .../src/main/java/org/fox/ttrss/CommonActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index a16e7072..a6879293 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -24,6 +24,7 @@ import android.support.customtabs.CustomTabsClient; import android.support.customtabs.CustomTabsIntent; import android.support.customtabs.CustomTabsServiceConnection; import android.support.customtabs.CustomTabsSession; +import android.support.design.widget.Snackbar; import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.util.TypedValue; @@ -116,13 +117,11 @@ public class CommonActivity extends ActionBarActivity implements SharedPreferenc } public void toast(int msgId) { - Toast toast = Toast.makeText(CommonActivity.this, msgId, Toast.LENGTH_SHORT); - toast.show(); + toast(getString(msgId)); } public void toast(String msg) { - Toast toast = Toast.makeText(CommonActivity.this, msg, Toast.LENGTH_SHORT); - toast.show(); + Snackbar.make(findViewById(android.R.id.content), msg, Snackbar.LENGTH_LONG).show(); } @Override