Fixing the jumping button
You may have noticed that, the button is jumping up and down on the screen. Let's fix it!
Right click on your code and choose
Add to backpackThis will save the code.
⏰ Important: If you do not save your code at this stage, you are going to lose it in the next step.

Delete the code! Accept all warning messages.
Go back to the
Designertab, and delete theImageand theButtonblocks. To delete, select the block from the component tree and pressDelon the keyboard. We are now starting with an empty screen.From
Layoutdrag and drop twoVertical Arrangementblocks on the screen.

For the first vertical arrangement, set the width to fill the parent, the height to 80%, and the horizontal and vertical alignment to the center.
For the second vertical arrangement, set the width to fill parent and the horizontal and vertical alignment to center.

Drag and drop an
Imageblock inside the first vertical arrangement, and style it toScale Picture To Fitwith the width and height set toFill parent

Drag and drop a
Buttoncomponent inside the second vertical alignment. Style it by changing the text to "Hide" and setting the width toFill parent

Click on the
Blockstab, click on the backpack icon and drag and drop your code.🎉 Test your app! For more information on testing, check Test your app
Last updated
Was this helpful?