switch to snackbars from toasts

This commit is contained in:
Andrew Dolgov 2017-06-01 19:35:25 +03:00
parent b043d6acb7
commit 9b16a179e8
1 changed files with 3 additions and 4 deletions

View File

@ -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