Skip to content

Commit

Permalink
Merge pull request #153 from edgiardina/49-bottomsheet
Browse files Browse the repository at this point in the history
49 bottomsheet
  • Loading branch information
edgiardina authored Aug 3, 2024
2 parents e183c61 + bad1980 commit e84a803
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 176 deletions.
1 change: 1 addition & 0 deletions IfpaMaui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageReference Include="The49.Maui.BottomSheet" Version="8.0.3" />
</ItemGroup>

<!-- Maui Specifics -->
Expand Down
2 changes: 2 additions & 0 deletions MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Serilog;
using Shiny;
using CommunityToolkit.Maui.ApplicationModel;
using The49.Maui.BottomSheet;

namespace Ifpa;

Expand All @@ -38,6 +39,7 @@ public static MauiApp CreateMauiApp()
.UseFluentMauiIcons()
.UseShiny()
.UseSkiaSharp(true)
.UseBottomSheet()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
Expand Down
4 changes: 4 additions & 0 deletions Platforms/Android/Resources/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="Maui.MainTheme" parent="Theme.Material3.DayNight"></style>
</resources>
4 changes: 2 additions & 2 deletions Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<value>Events Outside Country</value>
</data>
<data name="CalendarDetailPage_Date" xml:space="preserve">
<value>Date: </value>
<value>Date</value>
</data>
<data name="PlayerDetailPage_RankingStatistics" xml:space="preserve">
<value>Ranking Statistics</value>
Expand Down Expand Up @@ -265,7 +265,7 @@
<value>Tournament Result Posted</value>
</data>
<data name="CalendarDetailPage_Director" xml:space="preserve">
<value>Director: </value>
<value>Director</value>
</data>
<data name="CalendarPage_MyLocation" xml:space="preserve">
<value>My Location</value>
Expand Down
352 changes: 182 additions & 170 deletions Views/CalendarDetailPage.xaml

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions Views/CalendarDetailPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Ifpa.ViewModels;
using Microsoft.Maui.Controls.Maps;
using Microsoft.Maui.Maps;
using The49.Maui.BottomSheet;


namespace Ifpa.Views
Expand Down Expand Up @@ -28,10 +29,10 @@ protected override async void OnAppearing()
MapSpan mapSpan = MapSpan.FromCenterAndRadius(mapLocation, Distance.FromKilometers(1));
var calendarMap = new Microsoft.Maui.Controls.Maps.Map(mapSpan)
{
HeightRequest = 200,
IsZoomEnabled = false,
IsScrollEnabled = false,
MapType = MapType.Street
MapType = MapType.Street,
IsTrafficEnabled = false
};
var pin = new Pin
{
Expand All @@ -52,6 +53,13 @@ protected override async void OnAppearing()
catch (Exception)
{
}
await sheet.ShowAsync();
}

protected override void OnDisappearing()
{
base.OnDisappearing();
sheet.DismissAsync();
}

private void Pin_Clicked(object sender, PinClickedEventArgs e)
Expand Down

0 comments on commit e84a803

Please sign in to comment.