Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Apr 3, 2024
1 parent b3029d9 commit e583137
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 39 deletions.
8 changes: 5 additions & 3 deletions sample/Sample/Pages/ProgressPage.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace=Samples.ViewModels"
xmlns:local="clr-namespace:Samples.ViewModels"
x:DataType="local:ProgressViewModel"
x:Class="Samples.ProgressPage"
Title="Progress">
<ContentPage.Content>
<ListView ItemsSource="{Binding Commands}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Text}" Command="{Binding Command}" />
<DataTemplate x:DataType="local:CommandViewModel">
<TextCell Text="{Binding Text}"
Command="{Binding Command}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Expand Down
7 changes: 4 additions & 3 deletions sample/Sample/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace=Samples.ViewModels"
xmlns:local="clr-namespace:Samples.ViewModels"
x:DataType="local:SettingsViewModel"
x:Class="Samples.SettingsPage"
Title="Settings/Themes">
<ContentPage.Content>
<StackLayout>
<VerticalStackLayout>
<Button Text="Load Standard Theme" Command="{Binding StandardSettings}" />
<Button Text="Load Funny Theme" Command="{Binding LoadAbnormalSettings}" />
</StackLayout>
</VerticalStackLayout>
</ContentPage.Content>
</ContentPage>
8 changes: 5 additions & 3 deletions sample/Sample/Pages/SpecificCasesPage.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace=Samples.ViewModels"
xmlns:local="clr-namespace:Samples.ViewModels"
x:DataType="local:SpecificCasesViewModel"
x:Class="Samples.SpecificCasesPage"
Title="Specific Cases">
<ContentPage.Content>
<CollectionView ItemsSource="{Binding Commands}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Button Text="{Binding Text}" Command="{Binding Command}" />
<DataTemplate x:DataType="local:CommandViewModel">
<Button Text="{Binding Text}"
Command="{Binding Command}" />
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Expand Down
17 changes: 10 additions & 7 deletions sample/Sample/Pages/StandardPage.xaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace=Samples.ViewModels"
xmlns:local="clr-namespace:Samples.ViewModels"
x:DataType="local:StandardViewModel"
x:Class="Samples.StandardPage"
Title="Standard Dialogs">
<ContentPage.Content>
<StackLayout>
<StackLayout Orientation="Horizontal">
<VerticalStackLayout>
<HorizontalStackLayout>
<Switch IsToggled="{Binding AutoCancel}" />
<Label Text="Cancel After 3 Seconds" />
</StackLayout>
</HorizontalStackLayout>

<ListView ItemsSource="{Binding Commands}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Text}" Command="{Binding Command}" />
<DataTemplate x:DataType="local:CommandViewModel">
<TextCell Text="{Binding Text}"
Command="{Binding Command}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</VerticalStackLayout>
</ContentPage.Content>
</ContentPage>
3 changes: 2 additions & 1 deletion sample/Sample/Pages/ToastsPage.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace=Samples.ViewModels"
xmlns:local="clr-namespace:Samples.ViewModels"
x:DataType="local:ToastsViewModel"
x:Class="Samples.ToastsPage"
Title="Toasts">
<ContentPage.Content>
Expand Down
Binary file added sample/Sample/Resources/Images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 0 additions & 15 deletions sample/Sample/Resources/Raw/AboutAssets.txt

This file was deleted.

10 changes: 9 additions & 1 deletion sample/Sample/Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,26 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<ItemGroup>
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<MauiImage Include="Resources\Images\*" />
<MauiFont Include="Resources\Fonts\*" />
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.14" />
<ProjectReference Include="..\..\src\Acr.UserDialogs\Acr.UserDialogs.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Raw\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\Raw\" />
</ItemGroup>
</Project>
6 changes: 1 addition & 5 deletions sample/Sample/ViewModels/ProgressViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Windows.Input;
using Acr.UserDialogs;


Expand Down
1 change: 0 additions & 1 deletion src/Acr.UserDialogs/Platforms/ios/TTGSnackbar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using UIKit;



namespace TTG
{
public enum TTGSnackbarAnimationType
Expand Down
3 changes: 3 additions & 0 deletions src/Acr.UserDialogs/Platforms/ios/UserDialogsImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ protected virtual void AddActionSheetOption(ActionSheetOption opt, UIAlertContro
if (opt.ItemIcon != null)
{
var icon = UIImage.FromBundle(opt.ItemIcon);
if (icon == null)
throw new InvalidOperationException("Invalid Icon Name: " + opt.ItemIcon);

alertAction.SetValueForKey(icon, new NSString("image"));
}
controller.AddAction(alertAction);
Expand Down

0 comments on commit e583137

Please sign in to comment.