diff --git a/Notes/Notes.Android/Notes.Android.csproj b/Notes/Notes.Android/Notes.Android.csproj index ffc4b4e..d623635 100644 --- a/Notes/Notes.Android/Notes.Android.csproj +++ b/Notes/Notes.Android/Notes.Android.csproj @@ -126,5 +126,11 @@ + + + + + + \ No newline at end of file diff --git a/Notes/Notes.Android/Resources/Resource.designer.cs b/Notes/Notes.Android/Resources/Resource.designer.cs index 6f31575..146afd1 100644 --- a/Notes/Notes.Android/Resources/Resource.designer.cs +++ b/Notes/Notes.Android/Resources/Resource.designer.cs @@ -2,7 +2,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -15,7 +14,7 @@ namespace Notes.Droid { - [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.0.155")] public partial class Resource { @@ -5803,10 +5802,16 @@ public partial class Drawable public const int save = 2131165304; // aapt resource value: 0x7F070079 - public const int tooltip_frame_dark = 2131165305; + public const int share = 2131165305; // aapt resource value: 0x7F07007A - public const int tooltip_frame_light = 2131165306; + public const int sharee = 2131165306; + + // aapt resource value: 0x7F07007B + public const int tooltip_frame_dark = 2131165307; + + // aapt resource value: 0x7F07007C + public const int tooltip_frame_light = 2131165308; static Drawable() { diff --git a/Notes/Notes.Android/Resources/drawable/share.png b/Notes/Notes.Android/Resources/drawable/share.png new file mode 100644 index 0000000..3a0fda3 Binary files /dev/null and b/Notes/Notes.Android/Resources/drawable/share.png differ diff --git a/Notes/Notes.Android/Resources/drawable/sharee.png b/Notes/Notes.Android/Resources/drawable/sharee.png new file mode 100644 index 0000000..c06c738 Binary files /dev/null and b/Notes/Notes.Android/Resources/drawable/sharee.png differ diff --git a/Notes/Notes/NoteEntryPage.xaml b/Notes/Notes/NoteEntryPage.xaml index 806b948..b7e7626 100644 --- a/Notes/Notes/NoteEntryPage.xaml +++ b/Notes/Notes/NoteEntryPage.xaml @@ -11,7 +11,8 @@ - + + diff --git a/Notes/Notes/NoteEntryPage.xaml.cs b/Notes/Notes/NoteEntryPage.xaml.cs index cce54a0..ed96e37 100644 --- a/Notes/Notes/NoteEntryPage.xaml.cs +++ b/Notes/Notes/NoteEntryPage.xaml.cs @@ -6,6 +6,7 @@ using System.IO; using Xamarin.Forms; using Xamarin.Forms.Xaml; +using Xamarin.Essentials; using Notes.Models; using Notes.Renderers; @@ -36,7 +37,15 @@ public NoteEntryPage() private void SpeechToTextFinalResultRecieved(string args) { - Note.Text += args; + if (string.IsNullOrEmpty(Note.Text)) + { + Note.Text += args; + } + else + { + Note.Text += " " + args; + + } } private void Start_Clicked(object sender, EventArgs e) @@ -77,6 +86,23 @@ async void OnSaveButtonClicked(object sender, EventArgs e) } await Navigation.PopAsync(); } + + async void OnShareButtonClicked(object sender, EventArgs e) + { + var note = (Note)BindingContext; + + await ShareText(note.Text); + await Navigation.PopAsync(); + } + + public async Task ShareText(string text) + { + await Share.RequestAsync(new ShareTextRequest + { + Text = text, + Title = "Share Note" + }); + } async void OnDeleteButtonClicked(object sender, EventArgs e) { var note = (Note)BindingContext;