Theory
📱🧩 1. Show and Hide App
🌟 What is this app about?
- We’re making an app where pictures play peekaboo – they show up and then hide when you press buttons. 🙈🙉
️Components used in this app
🎮 Button component:
- 🔲 A button in App Inventor is like a magic key that makes things happen in your app when you tap it.
- You can make it pretty by changing its colour or putting words like “Go!” on it.
- 🖐️ Every time you touch the button, you can tell your app to do something cool, like jump to the next screen or make a character dance.
- You get to decide what the button does by connecting puzzle pieces in the block editor.
- 🎮 Think of it as the play button on your video games; it’s that important!
🖼️ Image component:
- 📱 The Image component lets you put cool pictures in your app.
- 🌟 You can choose photos from your gallery or find them online.
- 🎨 Change their size and spot on the screen to make your app look awesome.
- 🌞 Combine with other blocks to make the pictures do fun things when you tap them.
- 🌈 Use your imagination to make your app super colourful and fun with all kinds of images!
👩💻 Designing the App:
- Start by opening App Inventor and click to create a new project. 🌈
- Add two buttons to your screen: one for “Show” and one for “Hide”. 🎨
- Colour the “Show” button pink and make it as wide as half your screen.
- The “Hide” button gets a sunny yellow colour and the same size. 🌞
- Bring in an ‘Image’ component to be the star of your app. 🌟
- Adjust ‘Screen1’ so everything is centred and looks neat. 🎯
- Set your ‘ShowButton’ and ‘HideButton’ with a font size that’s easy on the eyes – like 20! 👓
- Make your ‘Image1’ start as invisible – it’s the secret to the peekaboo effect! 🔍
🌟 Bringing it to Life with Blocks:
- In the Blocks Editor, link your buttons to the ‘Image1’ visibility:
- ‘ShowButton’ reveals the picture. 🐱
- ‘HideButton’ makes it vanish! 🐾
👩💻 Coding the App:
- Imagine you’re a wizard with a magic picture frame! 🧙️
- When you press the “Show” button…
- 🌈 Zap! Your magic makes the picture appear!
- If you hit the “Hide” button…
- 🌌 Poof! The picture vanishes into thin air!
- It’s like playing hide-and-seek with your drawing! 🖼️😄🙈
🚀 What other similar apps you can create?
- A gallery app to showcase your art with a tap. 🖼️
- A hide-and-seek game with hidden objects. 🕵️️
- An interactive story where images change as the tale unfolds. 📖