Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//This example requires the 'Xamarin.Android GUI' option to be enabled //+ref=Java.Interop using System; using System.Linq; using System.Collections.Generic; using NativeUiLib; using Android.Graphics; namespace CSharp_Shell { public static class Program { public static void Main() { Ui.RunOnUiThread(()=> UiStuff()); } private static void UiStuff() { var w = 800; var h = 600; var lay = new LinearLayout(); var drawingImageView = new ImageView(); lay.AddView(drawingImageView); var paint = new Paint(); paint.Color = Color.Blue; paint.SetStyle(Paint.Style.Stroke); paint.StrokeWidth = 15; var bmpBase = Bitmap.CreateBitmap(w, h, Bitmap.Config.Argb8888); Canvas canvas = new Canvas(bmpBase); canvas.DrawCircle(100, 100, 30, paint); drawingImageView.SetImageBitmap(bmpBase); Ui.ShowLayout(lay); } } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)