From 7e343372c4edcb5b3053e40a4e8bf511d73e100f Mon Sep 17 00:00:00 2001 From: "Michael Lacher (RDV)" Date: Tue, 23 Jul 2019 18:10:03 -0700 Subject: [PATCH 1/4] Picker starts in Seattle Picker uses GPS location or address hint Picker allows selection of desired result --- .../WlihaInputUI.Android/MainActivity.cs | 8 +- .../WlihaInputUI.Android.csproj | 9 +++ .../WlihaInputUI/AddressPicker.xaml | 3 +- .../WlihaInputUI/AddressPicker.xaml.cs | 73 +++++++++++++++++-- .../WlihaInputUI/MainPage.xaml.cs | 2 +- .../WlihaInputUI/WlihaInputUI.csproj | 2 + 6 files changed, 83 insertions(+), 14 deletions(-) diff --git a/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/MainActivity.cs b/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/MainActivity.cs index ebced1a..c4ecef9 100644 --- a/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/MainActivity.cs +++ b/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/MainActivity.cs @@ -6,6 +6,7 @@ using Android.Views; using Android.Widget; using Android.OS; +using Plugin.CurrentActivity; namespace WlihaInputUI.Droid { @@ -21,13 +22,14 @@ protected override void OnCreate(Bundle savedInstanceState) Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); + CrossCurrentActivity.Current.Init(this, savedInstanceState); Xamarin.FormsMaps.Init(this, savedInstanceState); LoadApplication(new App()); } - public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) - { - Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); + public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults) + { + Plugin.Permissions.PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults); base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } } diff --git a/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/WlihaInputUI.Android.csproj b/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/WlihaInputUI.Android.csproj index e753088..f851d5c 100644 --- a/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/WlihaInputUI.Android.csproj +++ b/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI.Android/WlihaInputUI.Android.csproj @@ -61,6 +61,15 @@ + + 2.1.0.4 + + + 3.0.0.12 + + + 4.5.0.6 + diff --git a/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI/AddressPicker.xaml b/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI/AddressPicker.xaml index 6080044..53573d2 100644 --- a/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI/AddressPicker.xaml +++ b/Input/WlihaInputUI/WlihaInputUI/WlihaInputUI/AddressPicker.xaml @@ -8,9 +8,8 @@ x:Class="WlihaInputUI.AddressPicker" > - +