Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Fixes #758
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed Oct 16, 2019
1 parent 040d673 commit 2e7ee89
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 546 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected override void OnCreate(Bundle bundle)
base.OnCreate(bundle);
CrossCurrentActivity.Current.Init(this, bundle);
Xamarin.Forms.Forms.Init(this, bundle);
Android.Glide.Forms.Init();
Android.Glide.Forms.Init(this);
LoadApplication(new App());
}

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Media.Plugin.Sample/Media.Plugin.Sample/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public App ()
{
InitializeComponent();

MainPage = new MediaPage();
MainPage = new NavigationPage(new MediaPage());
}

protected override void OnStart ()
Expand Down
1 change: 1 addition & 0 deletions src/Media.Plugin.Sample/Media.Plugin.Sample/MediaPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@

</StackLayout>
</ScrollView>
<Button Clicked="Button_Clicked" Text="Navigate"/>
</StackLayout>
</ContentPage>
5 changes: 5 additions & 0 deletions src/Media.Plugin.Sample/Media.Plugin.Sample/MediaPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,10 @@ private void Files_CollectionChanged(object sender, System.Collections.Specializ
});
ImageList.Children.Add(image);
}

private async void Button_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new ContentPage());
}
}
}
1 change: 0 additions & 1 deletion src/Media.Plugin/iOS/ECLImagePickerViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using UIKit;
using AssetsLibrary;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using Foundation;
using System.Threading.Tasks;
Expand Down
4 changes: 2 additions & 2 deletions src/Media.Plugin/iOS/MediaPickerDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
using NSAction = System.Action;
using ImageIO;
using MobileCoreServices;
using System.Drawing;
using System.Collections.Generic;
using System.Threading;
using System.Diagnostics;
using System.Drawing;

namespace Plugin.Media
{
Expand Down Expand Up @@ -288,7 +288,7 @@ private async Task<MediaFile> GetPictureMediaFile(NSDictionary info)
if (image == null)
return null;

var pathExtension = ((info[UIImagePickerController.ReferenceUrl] as NSUrl).PathExtension == "PNG") ? "png" : "jpg";
var pathExtension = ((info[UIImagePickerController.ReferenceUrl] as NSUrl)?.PathExtension == "PNG") ? "png" : "jpg";

var path = GetOutputPath(MediaImplementation.TypeImage,
options.Directory ?? ((IsCaptured) ? string.Empty : "temp"),
Expand Down
Loading

0 comments on commit 2e7ee89

Please sign in to comment.