You are on page 1of 14

Loops

By
Laila
Type of Loops

Phone number picker.

Overview List picker.

Example Loop with pickers and


texting.
Loop
1. Runs the blocks in the do section for each numeric
value in the range starting from from and ending
at to, incrementing by the value of by each time.
2. Runs the blocks in the do section for each item in the
list.
3. Runs the blocks in the do section for each key-value
entry in the dictionary. 
http://ai2.appinventor.mit.edu/reference/blocks/dic
tionaries.html
4. Tests the -test condition. If true, performs the action
given in -do , then tests again.
Let’s Apply it!!
Multiplication Table Creator
(Example numbered loop)
• The user need to enter a factor and the application will
display the multiplication table for it.
Loops & List
List and phone picker
• ListPicker: A button that, when clicked on, displays a list of texts for
the user to choose among. (Similar to ListView) 
• PhoneNumberPicker: A button that, when clicked on, displays a list of
the contacts' phone numbers to choose among. Then you can choose
one of the following properties.
• ContactName: the contact's name 
• PhoneNumber: the contact's phone number 
• EmailAddress: the contact's email address 
• Picture: the name of the file containing the contact's image, which can be
used as a Pictureproperty value for the Image or ImageSprite component.
Send a message to multiple contacts
(Example List loop)
• The user need to enter a
message and to select
multiple contacts. When the
user click the send button the
message will be sent to the
selected contacts.
Social: phonePicker
UserInterface:
ListPicker

Social: Texting

You might also like