SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
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
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://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.
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.
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.
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.
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)
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)?

Más contenido relacionado

Último

Último (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Destacado

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Android Development 2: Notepad Application

  • 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. Android Basic Course © 2012 University of Science – HCM City. Pre-requirements • Module 4: User Interfaces - Activity
  • 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. 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. 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. 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. 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. 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)?