-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Mobile | Improve loading animation when awaiting quiz results (#686)
* Add Sophie Animation while Submitting Quiz Answers * Update SkiaSharp version * Update with Jaydens feedback * Move quiz result pending animation into own popup * Disable font auto scaling on quiz result pending text --------- Co-authored-by: Tylah Kapa <[email protected]>
- Loading branch information
1 parent
93bc647
commit 53a09d4
Showing
6 changed files
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<pages:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:pages="clr-namespace:Mopups.Pages;assembly=Mopups" | ||
xmlns:lottie="clr-namespace:SkiaSharp.Extended.UI.Controls;assembly=SkiaSharp.Extended.UI" | ||
xmlns:viewModels="clr-namespace:SSW.Rewards.Mobile.ViewModels" | ||
x:Class="SSW.Rewards.Mobile.PopupPages.QuizResultPending" | ||
x:DataType="viewModels:ScanResultViewModel" | ||
BackgroundColor="#80000000" | ||
CloseWhenBackgroundIsClicked="False"> | ||
<Border | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
HeightRequest="300" | ||
WidthRequest="300" | ||
Padding="10" | ||
Stroke="{StaticResource BorderDefault}" | ||
BackgroundColor="{StaticResource Background}"> | ||
<Border.StrokeShape> | ||
<RoundRectangle CornerRadius="8" /> | ||
</Border.StrokeShape> | ||
<VerticalStackLayout HorizontalOptions="Fill" | ||
VerticalOptions="Start"> | ||
<Label TextColor="White" | ||
HeightRequest="30" | ||
HorizontalTextAlignment="Center" | ||
VerticalTextAlignment="Center" | ||
FontAutoScalingEnabled="False" | ||
Text="Loading results..." | ||
Style="{StaticResource LabelBold}" | ||
FontSize="20" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" /> | ||
<lottie:SKLottieView | ||
VerticalOptions="Center" | ||
Source="Sophie.json" | ||
IsAnimationEnabled="True" | ||
RepeatMode="Restart" | ||
RepeatCount="100" | ||
WidthRequest="200" | ||
HeightRequest="200" /> | ||
<HorizontalStackLayout WidthRequest="280" HeightRequest="50" HorizontalOptions="Start" | ||
VerticalOptions="Center"> | ||
<Image HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
HeightRequest="50" | ||
WidthRequest="40" | ||
Source="openai" /> | ||
<Label x:Name="LoadingText" | ||
TextColor="White" | ||
Margin="10,0,0,0" | ||
HeightRequest="50" | ||
HorizontalTextAlignment="Start" | ||
FontAutoScalingEnabled="False" | ||
VerticalTextAlignment="Center" | ||
WidthRequest="220" | ||
FontSize="18" | ||
VerticalOptions="Center" /> | ||
</HorizontalStackLayout> | ||
</VerticalStackLayout> | ||
</Border> | ||
</pages:PopupPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Mopups.Pages; | ||
|
||
namespace SSW.Rewards.Mobile.PopupPages; | ||
|
||
public partial class QuizResultPending : PopupPage | ||
{ | ||
private List<string> _loadingPhrases = | ||
[ | ||
"Summoning answers from our quiz master!", | ||
"Extracting brilliance from our genius AI companion!", | ||
"Harvesting insights from the all-knowing AI guru!", | ||
"Retrieving wisdom from the depths of the AI genius!", | ||
"Snatching enlightenment from our brainy AI overlord!" | ||
]; | ||
|
||
public QuizResultPending() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
protected override void OnAppearing() | ||
{ | ||
base.OnAppearing(); | ||
LoadingText.Text = _loadingPhrases[new Random().Next(_loadingPhrases.Count)]; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters