mono for android 获取手机照片或拍照并裁剪保存

axml


 

C#

 

using System;
 
using Android.App;
using Android.Content;
using Android.Widget;
using Android.OS;
using Android.Graphics;
using System.IO;
 
namespace Phoot
{
    [Activity(Label = "Phoot", MainLauncher = true, Icon = "@drawable/icon")]
    public class Activity1 : Activity
    {
        public static int NONE = 0;
        public static int PHOTOHRAPH = 1;//拍照
        public static int PHOTOXZOOM = 2;//缩放
        public static int PHOTORESOULT = 3;//结果
 
        public static string IMAGE_UNSPECTFIED = "image/*";
 
        ImageView imageview = null;
        Button button0 = null;
        Button button1 = null;
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
 
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
 
            button0 = FindViewById



你可能感兴趣的:(C#,Aandroid)