Comments (10)
Have you tried with the no extra layouts?
I'm not an expert by any means, but when I added the view on my app it was compressed like that, not because it wasn't playing, but it was losing a constraint fight somewhere.
from lottiexamarin.
Yup i had moved it out so it wasnt as nested in other views and i could see the animation view in ios so there was no problem. But there is a problem that it does get compressed when nested in more or certain views situations.
Unfortunately the code snippet above was just to prove the point, in my code where i have the animation i dont have the fortune that i can move the animation view out. This should or one would expect to work regardless of how nested.
from lottiexamarin.
but can you place it inside of a view that has an enforced size? Maybe you are having problems with the nested stack layouts (both of which are vertical it looks like) ?
Maybe you can use an absolute/relative layout so that the parent view has a specified size even if the child (LottieView) doesn't know how big it should be?
from lottiexamarin.
I'm having this same issue. On certain pages it just doesn't show up. It seems if you have it nested within more than 2-3 layouts it doesn't show up. I tried giving it an exact size too and it didn't work either. I can see a background color if I add one though which is weird.
Also, there seems to be issue with tab pages too. Doesn't seem to want to work on any tab, but the first one.
from lottiexamarin.
Hello,
I'm having this behavior too only on iOS. For what I've seen it seems that it does not show in a particular flow.
For example, I got a loading lottie file playing when calling a rest service, and sometimes the lottie file does not show on iOS after being already played (but the layout is never changing at all, so its not the cause). Seems that showing the lottie file multiple times after showing one is causing the lottie animation not to be shown/played.
I think this is related to #132
from lottiexamarin.
Hello all,
No news about that ?
from lottiexamarin.
Not from me sorry.
from lottiexamarin.
You still have this behavior ?
My usage is quite simple, w/o nested layout in a single Rg.Plugin.PopUpPage, or something complex, still the lottie animation shows only a few times. I also have this prob on simple content pages, so I don't think this is happening because of the previous written package :
public LoadingPage(string textLoading)
{
var activityIndicator = new AnimationView
{
Animation = "loader.json",
Loop = true,
AutoPlay = true,
WidthRequest = 120,
HeightRequest = 120
};
var mainLayout = new StackLayout
{
Orientation = StackOrientation.Vertical,
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand
};
var labelLoading = new MR.Gestures.Label
{
TextColor = Color.Orange,
Text = textLoading,
HorizontalTextAlignment = TextAlignment.Center,
VerticalTextAlignment = TextAlignment.Center
};
mainLayout.Children.Add(activityIndicator);
mainLayout.Children.Add(labelLoading);
CloseWhenBackgroundIsClicked = false;
Content = mainLayout;
}
from lottiexamarin.
I found out that setting autoplay to false on iOS and calling Play() method in the OnAppearing method of the page does fix the prob
from lottiexamarin.
@Umar3x Haven't tested that yet, did you simplify the layout for the above working solution?
from lottiexamarin.
Related Issues (20)
- Application crash on version 4.2.2 upgrade HOT 2
- XF.UWP crash when navigating back HOT 2
- XF.UWP support failing at version 4.1.0
- No native support for macOS/arm64
- Animation stopped working on Android HOT 3
- Replacement for OnPlayProgressSegment event?
- Using 4.1 in a Xamarin.Forms app when running on iOS an error ouccurs. HOT 3
- Support for .NET 6 HOT 12
- Xamarin iOS - animation scaling out of bounds
- Lottie nuget preventing other nugets from upgrading HOT 1
- IOS Animation happening too soon HOT 3
- Not able to Build Unit Test Project(.NET 6) in MAC referencing .net standard library(Xamarin Forms) which uses Lottie
- colors not showing on iOS when colors edited with lottie editor HOT 1
- Lottie with base64-encoded data
- iOS Not rendering animation after lottie editor color edit HOT 2
- Xamarin forms iOS Cannot access a disposed object HOT 1
- [Update binding iOS project] Support json files created with "Figma to Lottie"
- Dependency issue with Square.OkIO HOT 7
- AndroidX.Collection dependency error. HOT 4
- Need support of new privacy manifest file, Nuget package is too old
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lottiexamarin.