Skip to content

Commit

Permalink
added trashcan lottie for archive page
Browse files Browse the repository at this point in the history
  • Loading branch information
Programming-With-Chris committed Aug 24, 2022
1 parent 562c501 commit cabbbc3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions ShoppingList/Resources/Raw/89531-trashcan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"v":"5.7.4","fr":30,"ip":0,"op":60,"w":100,"h":100,"nm":"Trash","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":9,"ty":4,"nm":"Layer 2 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":12,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":29,"s":[-35]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":34,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":38,"s":[-16]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":42,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":46,"s":[-10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":49,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":52,"s":[-6]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":54,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":56,"s":[-3]},{"t":57.0000023216576,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":12,"s":[28.290166666666654,35.94616666666664,0],"to":[0,-1.667,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":29,"s":[28.290166666666654,34.27949999999998,0],"to":[0,0,0],"ti":[0,-1,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":34,"s":[28.290166666666654,35.94616666666664,0],"to":[0,1,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":38,"s":[28.290166666666654,35.27949999999998,0],"to":[0,0,0],"ti":[0,-0.667,0]},{"t":42.0000017106951,"s":[28.290166666666654,35.94616666666664,0]}],"ix":2,"l":2},"a":{"a":0,"k":[4.798,7.808,0],"ix":1,"l":2},"s":{"a":0,"k":[141.12699999999992,141.12699999999992,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.844,0],[0,0],[0,-0.844],[0,0],[0,0],[0,0]],"o":[[0,-0.844],[0,0],[0.844,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-4.586,-0.01],[-3.057,-1.539],[3.057,-1.539],[4.586,-0.01],[4.586,1.518],[-4.585,1.518],[-4.585,-0.01]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.021,0.844],[0.845,0.022],[0.026,-0.001],[0,0],[0,0],[0,0],[2.533,0],[0,0],[0,-2.533],[0,0],[0,0],[0.022,-0.845],[-0.845,-0.022],[-0.026,0.001],[0,0]],"o":[[0,0],[0.844,0.021],[0.022,-0.845],[-0.026,-0.001],[0,0],[0,0],[0,0],[0,-2.533],[0,0],[-2.533,0],[0,0],[0,0],[-0.845,-0.022],[-0.021,0.844],[0.026,0.001],[0,0],[0,0]],"v":[[16.681,4.575],[18.343,4.575],[19.91,3.086],[18.421,1.518],[18.343,1.518],[18.342,1.518],[7.643,1.518],[7.643,-0.01],[3.057,-4.596],[-3.057,-4.596],[-7.643,-0.01],[-7.643,1.518],[-18.343,1.518],[-19.911,3.008],[-18.421,4.575],[-18.343,4.575],[-16.682,4.575]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[20.182,4.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":6,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120.0000048877,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Layer 1 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[49.999499999999976,61.664666666666626,0],"ix":2,"l":2},"a":{"a":0,"k":[16.931,17.066,0],"ix":1,"l":2},"s":{"a":0,"k":[141.12699999999992,141.12699999999992,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.844,0.06],[0.06,-0.844],[0,0],[0,0],[-0.842,-0.062],[0,0],[-0.057,0.801],[0,0]],"o":[[-0.844,-0.06],[0,0],[0,0],[-0.062,0.842],[0,0],[0.804,0.002],[0,0],[0.059,-0.844]],"v":[[0.874,-12.199],[-0.762,-10.78],[-0.762,-10.779],[-2.292,10.621],[-0.88,12.257],[-0.764,12.257],[0.766,10.837],[2.294,-10.563]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[23.808,15.506],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.844,0],[0,-0.844],[0,0],[-0.845,0.022],[-0.021,0.814],[0,0]],"o":[[-0.845,0],[0,0],[0.021,0.844],[0.813,-0.02],[0,0],[0,-0.844]],"v":[[0.001,-12.22],[-1.529,-10.691],[-1.529,10.709],[0.04,12.198],[1.529,10.709],[1.529,-10.691]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[16.931,15.527],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0.844,-0.06],[-0.06,-0.845],[0,0],[-0.804,0.003],[0,0],[0.059,0.842]],"o":[[0,0],[0,0],[-0.06,-0.844],[-0.844,0.06],[0,0],[0.057,0.802],[0,0],[0.842,-0.059],[0,0]],"v":[[2.294,10.626],[2.294,10.62],[0.764,-10.78],[-0.872,-12.2],[-2.292,-10.562],[-0.764,10.837],[0.766,12.257],[0.876,12.257],[2.294,10.627]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[10.053,15.506],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[10.833,13.757],[-10.837,13.757],[-13.604,-16.814],[13.613,-16.814]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.793,0.004],[0,0],[-0.072,0.789],[0,0]],"o":[[0,0],[0.072,0.79],[0,0],[0.793,0.004],[0,0],[0,0]],"v":[[-16.682,-16.814],[-13.757,15.425],[-12.227,16.815],[12.229,16.815],[13.758,15.426],[16.682,-16.814]],"c":false},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[16.931,17.064],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":6,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120.0000048877,"st":0,"bm":0}],"markers":[]}
17 changes: 17 additions & 0 deletions ShoppingList/View/ArchivedListView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:model="clr-namespace:ShoppingList.Model"
xmlns:viewmodel="clr-namespace:ShoppingList.ViewModels"
xmlns:skiasharp="clr-namespace:SkiaSharp.Extended.UI.Controls;assembly=SkiaSharp.Extended.UI"
x:DataType="viewmodel:ArchivedListViewModel"
Title="{Binding Title}"
x:Name="CurrentPage"
Expand Down Expand Up @@ -39,6 +40,22 @@
</CollectionView.ItemTemplate>
</CollectionView>

<skiasharp:SKLottieView x:Name="TrashCanLottie"
WidthRequest="300"
HeightRequest="300"
Grid.Row="0"
RepeatCount="0"
RepeatMode="Restart"
Opacity=".5"
ZIndex="-1"
Grid.Column="0"
Grid.ColumnSpan="2"
VerticalOptions="End"
HorizontalOptions="Center"
Source="89531-trashcan.json"
BackgroundColor="Transparent">
</skiasharp:SKLottieView>

</Grid>

</ContentPage>
5 changes: 4 additions & 1 deletion ShoppingList/View/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using ShoppingList.ViewModels;
using ShoppingList.Controls;
using SkiaSharp.Extended.UI.Controls;

namespace ShoppingList;

public partial class MainPage : ContentPage
{
UserListViewModel _ulvm;
readonly UserListViewModel _ulvm;

public MainPage(UserListViewModel ulViewModel)
{
InitializeComponent();
Expand All @@ -24,6 +26,7 @@ protected override void OnAppearing()
base.OnAppearing();
_ulvm.GetUserLists();

var cartLottie = this.FindByName("CartLottie") as SKLottieView;
}

private async void NewListButtonPressed(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion ShoppingList/ViewModel/ArchivedListViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public async void RestoreUserList(UserList restoreList)
if (IsBusy)
return;

bool shouldRestore = await Shell.Current.DisplayAlert("Restore List?", "Would You Like To Restore This List",
bool shouldRestore = await Shell.Current.DisplayAlert("Restore List?", "Would You Like To Restore This List?",
"Yes", "Cancel");

if (shouldRestore)
Expand Down

0 comments on commit cabbbc3

Please sign in to comment.