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

is

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -