Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Android Basic Course
© 2012 University of Science – HCM City.
M.Sc. Bui Tan Loc
btloc@fit.hcmus.edu.vn
Department of Softw...
Android Basic Course
© 2012 University of Science – HCM City.
Pre-requirements
• Module 4: User Interfaces - Activity
Android Basic Course
© 2012 University of Science – HCM City.
Notepad Exercise 1
• Do the tutorial for exercise 1:
• http:...
Android Basic Course
© 2012 University of Science – HCM City.
Notepad Exercise 2
• Do the tutorial for exercise 2:
• http:...
Android Basic Course
© 2012 University of Science – HCM City.
Notepad Exercise 3
• Do the tutorial for exercise 3:
• http:...
Android Basic Course
© 2012 University of Science – HCM City.
Notepad Extra Credit
• Do the tutorial:
• http://developer.a...
Android Basic Course
© 2012 University of Science – HCM City.
More requirements
• Try creating menus by loading from xml r...
Android Basic Course
© 2012 University of Science – HCM City.
Questions or Discussions
• Why do we not use onRestoreInstan...
Upcoming SlideShare
Loading in …5
×

Android Development 2: Notepad Application

342 views

Published on

Professional android application development

Published in: Technology
  • Be the first to comment

Android Development 2: Notepad Application

  1. 1. Android Basic Course © 2012 University of Science – HCM City. M.Sc. Bui Tan Loc btloc@fit.hcmus.edu.vn Department of Software Engineering, Faculty of Information Technology, University of Science – Ho Chi Minh City, Viet Nam Lab 2: Notepad application
  2. 2. Android Basic Course © 2012 University of Science – HCM City. Pre-requirements • Module 4: User Interfaces - Activity
  3. 3. Android Basic Course © 2012 University of Science – HCM City. Notepad Exercise 1 • Do the tutorial for exercise 1: • http://developer.android.com/resources/tutorials/notepad/notepa d-ex1.html • After completing this tutorial, you will have practiced about: • Creating xml-based layout files such as notepad_list.xml, notes_row.xml. • Modifying string.xml resource. • Creating options menu by using code. • Handling options menu selections. • Creating and loading resources for a ListView. • Filling data into a ListView.
  4. 4. Android Basic Course © 2012 University of Science – HCM City. Notepad Exercise 2 • Do the tutorial for exercise 2: • http://developer.android.com/resources/tutorials/notepad/notepa d-ex2.html • After completing this tutorial, you will have practiced about: • Creating context menu by using code. • Handling context menu selections. • Using Intent object to start an activity for a result. • Starting an activity for passing values by putting values into Intent object. • Using layout_weight attribute. • Loading views from xml-based layout file by using findViewById() method. • Using Intent object to read passed values. • Using event listeners. • Declaring a new activity in AndroidManifest.xml file.
  5. 5. Android Basic Course © 2012 University of Science – HCM City. Notepad Exercise 3 • Do the tutorial for exercise 3: • http://developer.android.com/resources/tutorials/notepad/notepa d-ex3.html • After completing this tutorial, you will have practiced about: • Managing the Activity lifecycle with onCreate(), onPause(), onResume(), and onSaveInstancesState() method.
  6. 6. Android Basic Course © 2012 University of Science – HCM City. Notepad Extra Credit • Do the tutorial: • http://developer.android.com/resources/tutorials/notepad/notepa d-extra-credit.html • After completing this tutorial, you will have: • Practiced about using DMMS tools to emulate voice calls or SMS messages. • Learned about the time which onCreate(), onPause(), onResume(), or onSaveInstancesState() method is called.
  7. 7. Android Basic Course © 2012 University of Science – HCM City. More requirements • Try creating menus by loading from xml resources (not using code to create menu items). • Try adding icons (images) for menu items. • Try using event listener technique for menu item selections (not using onOptionsItemSelected or onContextItemSelected function)
  8. 8. Android Basic Course © 2012 University of Science – HCM City. Questions or Discussions • Why do we not use onRestoreInstancesState() to manage the Activity lifecycle in this Notepad application? • What is the difference between using event handlers (onOptionsItemSelected, onContextItemSelected) and using event listeners (setOnMenuItemClickListener)?

×