CMPS-3350 Lab-13
Elements of this lab...
Step 1:
Start an Android project using Android Studio. Start with an empty activity. This framework will display "hello world!" when first run. Emulators... Recommend choosing Nexus 6 API 24 Choosing an emulator with google-play can be problematic. so don't do it. If your emulator does not quite work... . Android Studio menu . Tools . AVD Manager . choose your emulator and Actions: edit . for Emulated Performance choose Software . Finish |
![]() |
Step 2:
Add a button to your app. Set your button label to something interesting. When the button is clicked or touched, the Hello World! will change to your own name. Button should be just above the middle of the screen. Text must be just above or just below your button. (not up in the corner) |
![]() |
|
Step 3:
Popup message showing your name When your button is pressed... a popup message will also display temporarily on the screen showing your name. It will display for a few seconds, then go away. |
![]() |
Swipe downward to close app. stackoverflow link Add a feature so that the app will close when you swipe downward on the screen. The app must close without lifting your finger from the screen. User must swipe down about 1/2 the height of the screen. The user must swipe downward, not sideways or upward. Look up the following method: public boolean onTouchEvent(MotionEvent event) It can be defined as a method inside your MainActivity class. Do not use Gestures. Use onTouchEvent.
Copy your Java file and your XML file to your /3350/d/ folder on Odin. Files to copy: MainActivity.java activity_main.xml strings.xml <---- only if entries were made Put your name at the top of MainActivity.java
Other work:
To be determined.