Extension activity 1: Improving button stability
While testing your app, you might have observed that the show/hide button exhibits a noticeable jump on the screen when clicked. Although it may seem minor, delivering a seamless user experience is crucial. Let's address this issue and enhance the app's usability.
Proceeding may result in code loss. To safeguard your code, navigate to the Blocks tab, right-click on your code, and select Add to Backpack. This action saves the code in the backpack for retrieval later.
Fixing the jumping button issue
Return to the
Designertab and remove theImageandButtonfrom the screen, leaving it empty.You may encounter a warning message; click on
Save the empty screen nowto proceed.
Click on the
Layouttab in the left panel (Panel 1) and drag twoVerticalArrangementblocks onto the screen.Layouts serve as containers for arranging multiple components, facilitating the organisation of buttons, navigation panels, etc.
Adjust the properties of the first container: set
Heightto 80% andWidthto fill parent.Modify the properties of the other container: set
Widthtofill parent.Drop an
Imagecomponent into the first container. Click onVerticalArrangement1in the components panel and align it to the center both horizontally and vertically.Place a
Buttoncomponent into the other container. Click onVerticalArrangement2in the components panel and align it to the center both horizontally and vertically.Click on the
Imagecomponent and select the uploaded image.Optionally, adjust the
Heightproperty of the image if needed.Set the button's
Widthtofill parentand change theTexttoHide.Navigate to the
Blocksscreen and click on the backpack icon. Drag and drop the saved code into the code area.You are done! Test the app to ensure the button now operates smoothly without any jumping issues.
Last updated
Was this helpful?