Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

49 bottomsheet #153

Merged
merged 3 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading