use snackbar when copying to clipboard

This commit is contained in:
Andrew Dolgov 2017-06-05 19:15:50 +03:00
parent b8b0b73ffb
commit 4f35eb65a5

View File

@ -224,8 +224,14 @@ public class CommonActivity extends ActionBarActivity implements SharedPreferenc
clipboard.setText(str);
}
Toast toast = Toast.makeText(this, R.string.text_copied_to_clipboard, Toast.LENGTH_SHORT);
toast.show();
Snackbar.make(findViewById(android.R.id.content), R.string.text_copied_to_clipboard, Snackbar.LENGTH_SHORT)
.setAction(R.string.dialog_close, new View.OnClickListener() {
@Override
public void onClick(View v) {
}
})
.show();
}
protected void setAppTheme(SharedPreferences prefs) {