From 88ab44608b79eb525b13284e5c14a76eb0e0f345 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Sun, 9 Jun 2013 16:48:07 +0200 Subject: [PATCH] added cropping to send avatar (vocaluxe app) --- ClientServerLib/AndroidRemote/MainActivity.cs | 154 +++++++++++------- .../AndroidRemote/Resources/layout/Main.axml | 10 ++ 2 files changed, 101 insertions(+), 63 deletions(-) diff --git a/ClientServerLib/AndroidRemote/MainActivity.cs b/ClientServerLib/AndroidRemote/MainActivity.cs index be0d9fa1..9c86ac57 100644 --- a/ClientServerLib/AndroidRemote/MainActivity.cs +++ b/ClientServerLib/AndroidRemote/MainActivity.cs @@ -19,6 +19,9 @@ namespace org.vocaluxe.app [Activity (Label = "Vocaluxe App", MainLauncher = true, ConfigurationChanges=Android.Content.PM.ConfigChanges.Orientation)] public class Activity1 : Activity { + private readonly int REQUEST_TAKE_PICTURE = 1; + private readonly int REQUEST_PICK_PICTURE = 2; + CClient client = new CClient(); CDiscover discover; Button bConnect; @@ -28,10 +31,12 @@ namespace org.vocaluxe.app TextView tIP; TextView tPassword; - bool loggedIn; + ProgressDialog pDialog; + byte[] fileBytes; Java.IO.File file; + Java.IO.File file2; Java.IO.File dir; System.IO.FileStream fs; @@ -40,11 +45,10 @@ namespace org.vocaluxe.app protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); - - loggedIn = false; - - // Set our view from the "main" layout resource + SetContentView (Resource.Layout.Main); + pDialog = new ProgressDialog (this); + pDialog.SetCancelable (false); bConnect = FindViewById