Skip to content
Permalink
Browse files
Added back buttons and connected then to pages
  • Loading branch information
Shivani Sharma committed Nov 16, 2020
1 parent 7bb61d0 commit 435a05db8b978e17994407f3013a9b29a02bd9ba
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
@@ -6,6 +6,7 @@ using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Content.Res;

namespace Local.Droid
{
@@ -30,5 +31,6 @@ namespace Local.Droid

base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}

}
}
@@ -17,7 +17,9 @@
VerticalOptions="CenterAndExpand"
HorizontalOptions="Center" />

<Button Text="Spin me" BackgroundColor="#705C6E"
<Button Text="Spin me"
TextColor="White"
BackgroundColor="#705C6E"
HorizontalOptions="Center"
Clicked="RotateButton" />

@@ -2,13 +2,15 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Local.MainPage">
<StackLayout BackgroundColor="LightGoldenrodYellow" Margin="20,35,20,20">
<Image Source="noteIcon.jpg"/>
<StackLayout BackgroundColor="White">

<Entry x:Name="nameEntry"
Placeholder="Enter agenda" />
Placeholder="Enter agenda"
PlaceholderColor="#705C6E"/>
<Entry x:Name="ageEntry"
Placeholder="Enter time" />
<Button BackgroundColor="AntiqueWhite" Text="Add to your agenda database!"
Placeholder="Enter time"
PlaceholderColor="#705C6E"/>
<Button BackgroundColor="#705C6E" Text="Add to your agenda database!"
Clicked="OnButtonClicked" />
<ListView x:Name="listView">
<ListView.ItemTemplate>
@@ -18,5 +20,10 @@
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ImageButton Source="backIcon.png"
BackgroundColor="White"
HorizontalOptions="Fill"
VerticalOptions="CenterAndExpand"
Clicked="OnImage_Button" />
</StackLayout>
</ContentPage>
</ContentPage>
@@ -34,6 +34,12 @@ namespace Local
nameEntry.Text = ageEntry.Text = string.Empty;
listView.ItemsSource = await App.Database.GetPeopleAsync();
}

}

async void OnImage_Button(object sender, EventArgs e)
{
await Navigation.PushAsync(new ImageView());
}
}

0 comments on commit 435a05d

Please sign in to comment.