AppInventor Week 4: Favourite Browser

This we will create our first app. The app will make it easy for you to open your favourite web sites.

Getting Started designing the GUI

Drag and Drop a “HorizontalArrangement” component on to the designer screen

  • Rename the “HorizontalArrangement” to “hsaButtons”
  • Set the “Width” property of the “HorizontalArrangement” to “Fill parent”

Drag and Drop three “Button” components into the “HorizontalArrangement”

  • Rename the three “Button” components to “btnGoogle”, “btnYouTube” and “btnCoderDojo”
  • Change the “Text” property for each of the three Button components to “Google”, “YouTube” and “CoderDojo”
  • Set the “Width” property of each “Button” to “Fill parent”

Drag and Drop a “WebViewer” component on to the designer screen

  • Rename the “WebViewer” component to “wbvBrowser”

Getting Started writing the code

  1. Click on the “Blocks” button
  2. In the script designer click on the “Button” Block “btnGoogle”
  3. Select the “when btnGoogle.Click” script from the pop-out list
  4. In the script designer click on the “WebViewer” Block “wbvBrowser”
  5. Select the “call wbvBrowser.GoToLink” script from the pop-out list
  6. In the script designer click on the “Text” Block, select the emptry String Block
  7. Copy and Paste the url http://www.google.ie into the “Text” block

Test the app

Duplicate the script above for the other two buttons.

App Inventor Notes Week 4 – FavouriteBrowser

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s