Page 63 - 2611_SmartGPT Pro V(5.0) C-6
P. 63

Tick ( ) if you know this.

                      ▶  The Click event is triggered when the user taps on an element.
                      ▶  Buttons are used to change something on the Canvas.







                           CREATING AN APP USING TOUCH EVENTS

                 The Magic_Pad app lets you draw with your finger, change colours and reset the screen like a

                 digital drawing book. It helps young learners practice drawing, handwriting and creativity while
                 improving hand control in a safe, educational way.
                 To create the Magic_Pad app, follow these steps:

                 Step  1   Create new project in the MIT App Inventor.

                 Step  2    Change the name of the screen to Magic_Pad in the Title textbox, adjust AlignHorizontal
                          to Center:3 and AlignVertical to Top:1 in the Properties pane.

                 Step  3   Click on the Layout component.
                 Step  4   Drag and drop HorizontalArrangement into the phone screen.
























                 Step  5   Click on the User Interface component.
                 Step  6   Drag and drop Button1 into the HorizontalArrangement.

                 Step  7    Click on Button1 to edit its properties on the right-side panel: Text to Red, FontBold,
                          BackgroundColor to Red, FontSize to 20, Shape to Rounded and TextColor to Black.

                            Similarly, add Button2 and Button3 into the same HorizontalArrangement and set Text:
                          Blue and Green, BackgroundColor: Blue and Green, FontSize: 20 or larger, FontBold to
                          Checked, Shape: Rounded, TextColor: Black.

                 Step  8   Add Button4 from the User Interface drawer below the HorizontalArrangement.




                                                                                          Touch to Motion with MIT  61
   58   59   60   61   62   63   64   65   66   67   68