Step 1
In view desing and prepare our buttons and arrangenment follows.
(arrangenment and all buttons in its default state)
Step 2
Set clock componet to 50
Step 3
Now its time go to Block editor.
First we create a procedure that will make the function resizes.
(this producer is very important and very useful)
Very special thanks to azaotl who is the creator of this formula.
More information about this formula and create app compatible with tablet can visit his channel here
A little explanation as the procedure works
Create a block screen initialize.
Create a 3 variable.
SizesCount = It will be the one that controls the size of arrangenment.
Status = if the status is open or closed
Button = identifies which button we have pressed.
Step 4
Create a procedure block to function Open .
Create a procedure block to function closed .
important detail!
in the red boxes appear two numbers
(2 and 30 )
the number 2 is the amount that will be increasing the size of the arrangement.
the number 30 is the final size, which will be 30% the size of the screen.
whether to open the fastest arrangement should increase the number 2 to desired. but taking into account the final size.
numbers must always be compatible.
example;
speed 2 and 30 arragenment sizes its ok
but you used
speed 4 and 30 arragenment sizes its wrong
The explanation is that each time you call the clock block will be increased by 4, so never will be equal to the number 30.
in this case it would be
speed 4 and 32 arragenment sizes its Ok
the numbers in globalsizescount should be the same as the open procedure .
Step 5
Create a button and clock block to control procedure .

No comments:
Post a Comment