Android Question [Solved] Animation initializeScale orientation

Lori Scott

Member
Licensed User
I would like to animate some views, similar to initializeScale, but I want the effects to be rotated 180 degrees.

Using the Animation.b4a example, I modified the a4 and a5 animations like this:

a4.InitializeScale("",1,0,1,1)

a5.InitializeScale("", 1, 1, 1, 0)

These give me an object that (a4) starts out empty and fills from top to bottom, and (a5) starts out full and empties from bottom to top.

What I wish to do is
1) Have a box that starts empty and fills from bottom to top
2) Have a box that starts full and empties from top to bottom. Also I would like the box to remain invisible at the end instead of reappearing.

I tried turning the buttons over like this:

Button4.Rotation = 180
Button5.Rotation = 180

This turned the buttons upside down (as evidenced by the position of the gradient and text), but the animations still ran in the same directions as they previously had.

Can you help me reorient the animation?

Could I accomplish the desired effect using setLayoutAnimated instead? Is there a basic tutorial available explaining the use of setLayoutAnimated?
 

Lori Scott

Member
Licensed User
Thank you, Erel. I am having some good luck with setLayoutAnimated. I am still curious whether there is a tutorial or API documentation posted anywhere that explains the details of using setLayoutAnimated.
 
Upvote 0

Lori Scott

Member
Licensed User
Ah, thank you very much. I had forgotten or overlooked the documentation accessible through the Help menu. Still, if I have a question and am vaguely aware (from reading posts in the forum) that I want to try using a function I haven't tried before such as setLayoutAnimated, and I click Help to open the B4A Documentation, I would first need to know that I had to go to Views or B4X. From the B4A Documentation main page, when I try to Find (<ctrl>F) setLayoutAnimated, nothing is found. Is there a way to recursively search within the Help Documentation? Or could the information from all levels of the Help Documentation also be found when searching forum?

I very much appreciate the popup documentation, which is what I have been getting by on. In this case the popup documentation provides about the same information as the Help Documentation link.
 
Upvote 0

Lori Scott

Member
Licensed User
To use that search string, I would first need to know that B4xView comes before .SetLayoutAnimated. (Same problem as mentioned before.) Is there a way to make a search for a term like SetLayoutAnimated when you don't know enough to realize that you need to search under B4xView?
 
Upvote 0
Top