Saturday, December 25, 2010

Google App Inventor - Logic For An App That Switches Screens

I wrote a simple program in Google App Inventor for Android to switch screens. You might be wondering why such a simple thing is worth mentioning. This is why.

I am exploring Google App Inventor for Android as a mobile prototyping tools for Product Managers, who do want to or cannot program to create a mobile app. To enable product managers create simple mobile applications, it is important to know how to switch from screen to screen, even though App Inventor has only one screen.

For example, if your mobile app has a total of 5 screens, you hide all the screens but the first screen. Then, you can show the screen you want to show and hide all the other screens.

The interesting this is that you will be creating real mobile applications that will function in a real Android device. That is a lot of fun.

Here are the screen shots of the app and all the logic required to make this happen. The Sunrise picture shows up when the app launches. When the user touches the Go To Sunset button, the users is taken to the Sunset screen. When the user touches the Back To Sunrise button, the users is taken back to the Sunrise screen.

Do not be fooled by the simplicity of the code. You can even create sophisticated apps such as a twitter client using Google App Inventor for Android.

At the bottom, I have also added a video from Jason Tyler, showing how to build the app in App Inventor.

A simple app that changes screens when you click a button

All the logic you need to change screens



No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...