App Inventor 2
Programming mobile phones with Android
by App Inventor 2 - Juan Antonio Villalpando
- Initiation Tutorial App Inventor 2 -
Return to tutorial index
____________________________
55.- Vectors.
ip55_vectors
- Presentation.
- We click anywhere on the screen, we draw a vector and shows the horizontal and vertical component and its angle.
_________________
Design
- Insert a Canvas, a Button and a Label.
_________________
Blocks.
___________________________________
- If the angle is greater than 180 is negative, so we add 360 to make it positive.
- On the screen coordinates increase from top to bottom and left to right.
_______________________________
56.- Decompose vector
ip56_descompose_vector
- Presentation.
- The application consists of two parts, one we write the vertical and horizontal component of a vector, when we press the button calculates module and angle.
- If we introduce the module and angle and click the second button, we will calculate the horizontal and vertical component.
_________________
Design
- We put the items in Bold.
- At TextBox you delete the contents of the Property Hints.
- In the TextBox mark the box NumberOnly.
_________________
Blocks.
__________________________________
|