1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-12 14:23:26 +00:00

custom toast implementations

This commit is contained in:
Kyle Spearrin
2017-12-22 15:00:11 -05:00
parent 45ab6d47de
commit 9f23f4ead7
22 changed files with 101 additions and 69 deletions

View File

@@ -45,6 +45,12 @@ namespace Bit.Android.Services
private Context CurrentContext => CrossCurrentActivity.Current.Activity;
public void Toast(string text, bool longDuration = false)
{
global::Android.Widget.Toast.MakeText(CurrentContext, text,
longDuration ? global::Android.Widget.ToastLength.Long : global::Android.Widget.ToastLength.Short).Show();
}
public void CopyToClipboard(string text)
{
var clipboardManager = (ClipboardManager)CurrentContext.GetSystemService(Context.ClipboardService);