What are the lay.Animate method options?

427 views
Skip to first unread message

Jorge Ramirez

unread,
Aug 7, 2014, 6:01:48 PM8/7/14
to androi...@googlegroups.com
What are the options for this method?

I have tried slide from and to left, right, top and bottom. Is there anything else? I would like to have something like fade and grow/shrink too :D

How does the callback option work?

Thanks!

Schnee Wittchen

unread,
Aug 8, 2014, 1:50:29 AM8/8/14
to androi...@googlegroups.com
Hello Jorge,

following should be the options for lay.Animate

"Flip",
"ScaleFromTop","ScaleFromBottom", also "ScaleFromRight" and "ScaleFromLeft" should work, but haven't tried these.
"SlideToRight", "SlideFromRight", "SlideToLeft", "SlideFromLeft"

You may define a optional call back function.

layDoc.Animate( "SlideToLeft", "OnDoneAnimate" );

This will be called after the animation is finished, for example to show or hide a specific layout or object.
best regards
Schnee

Jorge Ramirez

unread,
Aug 9, 2014, 8:18:08 AM8/9/14
to androi...@googlegroups.com
"Flip" didn't work for me.

Are they somekind of standard Android transitions/animations or are they implemented only for AndroidScript.

Also, the AndroidScript app itself shows some kind of flip animation anf I find it very cool.

Schnee Wittchen

unread,
Aug 9, 2014, 9:49:02 AM8/9/14
to androi...@googlegroups.com
Hello Jorge,

a flipping layer is not that easy. Basically you need a framed layout and two layouts that you want to flip.

    //Create layout to allow flipping of list/code.
    layFlip = app.CreateLayout( "Frame", "" );
...
    layEdit = app.CreateLayout( "Linear", "Vertical,FillXY" );
    layEdit.SetVisibility( "Hide" );
    layFlip.AddChild( layEdit );
...
    layLst = app.CreateLayout( "Frame", "FillXY" );
    layFlip.AddChild( layLst );

at the point where you want the animation take place you put

    layFlip.Animate( "Flip", "" );   

This part is taken from the AndroidScript app main routine.
best regards
Schnee



Schnee Wittchen

unread,
Aug 12, 2014, 4:12:20 AM8/12/14
to androi...@googlegroups.com
Hello,

to ompletely answer this question, please look also here

    animation String    Following options are available
                        # SlideFromRight, SlideFromLeft, SlideFromTop, SlideFromBottom
                        # SlideToRight, SlideToLeft, SlideToTop, SlideToBottom
                        # ScaleFromTop, ScaleFromRight, ScaleFromBottom, ScaleFromLeft
                        # ScaleToTop, ScaleToRight, ScaleToBottom, ScaleToLeft
                        # Flip

best regards
Schnee


Maximilian Buthenhoff

unread,
Jul 1, 2017, 12:46:17 PM7/1/17
to DroidScript
known types:
  • SlideFromLeft
  • SlideFromRight
  • SlideFromTop
  • SlideFromBottom
  • SlideToLeft
  • SlideToRight
  • SlideToTop
  • SlideToBottom
  • ScaleFromLeft
  • ScaleFromRight
  • ScaleFromTop
  • ScaleFromBottom
  • ScaleToLeft
  • ScaleToRight
  • ScaleToTop
  • ScaleToBottom
  • FadeIn
  • FadeOut
  • Flip

Ben W.

unread,
Jul 4, 2017, 2:15:07 AM7/4/17
to DroidScript
Why are the methods of lay animate not documented, so that people understand?Droisdscript provide a lot without any documentation. That's silly.

Symbroson

unread,
Jul 4, 2017, 2:51:27 AM7/4/17
to DroidScript
Documentation is in progress

Bubu Daba

unread,
Mar 6, 2021, 12:37:36 AM3/6/21
to DroidScript
Is there something like ScaleFromCenter, ScaleToCenter, ScaleIn, ScaleOut?
I'm trying to emulate the entrance and exit of the dialog control

On Tuesday, July 4, 2017 at 1:51:27 AM UTC-5 Symbroson wrote:
Documentation is in progress
Reply all
Reply to author
Forward
0 new messages