Your browser does not support JavaScript!

 

 

首頁選單 
首頁選單

Recent

數據載入中...
Changhua County Map Tour

 



Changhua County  Map Tour

 


 

Designing the Components

Figure 6-1. The Paris Map Tour app running in the emulator

 

Table 6-1. Components for the 

Changhua County Map Tour




Component type Palette group What you’ll name it Purpose
Image  User Interface Image1 Show a static image of Paris on screen.
Label      Display the text “Discover Paris with your Android!”
ListPicker     When clicked, a list of destination choices will appear.
ActivityStarter     Launch the Maps app when a destination is chosen.
       

Adding Behaviors to the Components

 

In the Blocks Editor, you’ll need to define a list of destinations and two behaviors:
• When the app begins, the app loads the destinations into the ListPicker compo-
nent so that the user can choose one.
• When the user chooses a destination from the ListPicker, the Maps application is
launched and shows a map of that destination. In this first version of the app,
you’ll just open Maps an
d instruct it to run a search for the chosen destination.

 

Creating a List of Destinations
Block type Drawer Purpose
initialize global (“Destinations”)  Variables Create a list of the destinations.
make a list Lists Add the items to the list.
text (“Tour CHSH”) Text The first destination.
text (“Tour CHGSH") Text The second destination.
  Text The  third destination.

第二版
ActivityStarter1  Properties
Action android.intent.action.VIEW
ActivityClass com.google.android.maps.MapsActivity
ActivityPackage com.google.android.apps.maps

 

 

 
reference :
USF Professor David Wolber, along with three of the original creators of App Inventor: MIT's Hal Abelson, Mills Professor and Google Engineer Ellen Spertus and Google Engineer Liz Looney.
 

 

瀏覽數