11<Page
2- xmlns =" http://schemas.nativescript.org/tns.xsd"
2+ xmlns =" http://schemas.nativescript.org/tns.xsd"
33 xmlns : Lottie =" nativescript-lottie" navigatingTo =" navigatingTo" class =" page" >
44 <Page .actionBar>
55 <ActionBar title =" Airbnb Lottie" icon =" " class =" action-bar" ></ActionBar >
66 </Page .actionBar>
77 <ScrollView >
8- <GridLayout rows =" auto, auto, auto, auto" columns =" *" class =" p-10" >
8+ <GridLayout rows =" auto, auto, auto, auto, auto " columns =" *" class =" p-10" >
99 <Label row =" 0" col =" 0" text =" Yea... NativeScript supports Lottie - Thanks Airbnb!!!" class =" h3" textWrap =" true" ></Label >
1010 <StackLayout row =" 1" orientation =" vertical" >
1111 <Lottie : LottieView src =" {{ src }}" height =" 150" width =" auto" loop =" {{ loop }}" autoPlay =" {{ autoPlay }}" loaded =" {{ lottieLoaded }}" />
1717 <Button text =" Start animation" class =" p-10 btn btn-primary" tap =" {{ startOrStopAnimation }}" ></Button >
1818 <Button text =" Stop animation" class =" p-10 btn btn-primary" tap =" {{ startOrStopAnimation }}" ></Button >
1919 </StackLayout >
20+
21+ <StackLayout row =" 4" >
22+ <Lottie : LottieView src =" AndroidWave.json" theme =" {{ theme }}" height =" 400" width =" auto" loop =" true" autoPlay =" true" />
23+
24+ <WrapLayout height =" 120" width =" 100%" >
25+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" red" tap =" {{ setTheme('red') }}" />
26+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" gold" tap =" {{ setTheme('gold') }}" />
27+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" green" tap =" {{ setTheme('green') }}" />
28+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" orange" tap =" {{ setTheme('orange') }}" />
29+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" gray" tap =" {{ setTheme('gray') }}" />
30+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" #191970" tap =" {{ setTheme('#191970') }}" />
31+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" #00bfff" tap =" {{ setTheme('#00bfff') }}" />
32+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" #8b008b" tap =" {{ setTheme('#8b008b') }}" />
33+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" #2f4f4f" tap =" {{ setTheme('#2f4f4f') }}" />
34+ <StackLayout height =" 50%" width =" 20%" backgroundColor =" #8b4513" tap =" {{ setTheme('#8b4513') }}" />
35+ </WrapLayout >
36+ </StackLayout >
2037 </GridLayout >
2138 </ScrollView >
2239</Page >
0 commit comments