add a close button to default notice snackbar

This commit is contained in:
Andrew Dolgov 2017-06-04 19:56:16 +03:00
parent 46d283980f
commit fac96820b4

View File

@ -121,7 +121,14 @@ public class CommonActivity extends ActionBarActivity implements SharedPreferenc
} }
public void toast(String msg) { public void toast(String msg) {
Snackbar.make(findViewById(android.R.id.content), msg, Snackbar.LENGTH_LONG).show(); Snackbar.make(findViewById(android.R.id.content), msg, Snackbar.LENGTH_LONG)
.setAction(R.string.dialog_close, new View.OnClickListener() {
@Override
public void onClick(View v) {
}
})
.show();
} }
@Override @Override