How do I use the Android clipboard from F# in Xamarin? -
I'm writing an Android app with Xamarin and F # and clipboard manager to copy some text to the clipboard Need to use. The best way to do this in Java is to:
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) getSystemService (context.CLIPBOARD_SERVICE ); Android.content.ClipData Clip = android.content.ClipData.newPlainText ("text labels", "text to clip"); Clipboard.setPrimaryClip (clip);
What is the best way to express this code in F #?
Thank you!
I think I found a solution:
clipboard Use = This.GetSystemService (context.ClipboardService):? & Gt; Use the Android.Content.ClipboardManager clip = Android.Content.ClipData.NewPlainText ("textlabel", "text to clip") clipboard. Primary clip and lift - clip
where refers to this
a activity
Comments
Post a Comment