© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.

Slides:



Advertisements
Similar presentations
Bruce Scharlau, University of Aberdeen, 2010 Android UI, and Networking Mobile Computing Based on android-sdk_2.2 Unless otherwise stated, images are from.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Chapter 3: Engage! Android User Input, Variables, and Operations
Chapter 6 Jam! Implementing Audio in Android Apps.
Chapter 6: Jam! Implementing Audio in Android Apps.
© 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post.
Using a Template to Create a Resume and Sharing a Finished Document
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
A02 Creating my website NAME ______________. UNIT 2 – A02 – Creating my Website The purpose of this assessment objective is to create 5 web pages containing.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Chapter 1: Voilà! Meet the Android. Smartphones –Can browse the Web –Allow you to play games –Use business applications –Check –Play music –Record.
Microsoft Visual Basic 2012 CHAPTER TWELVE (ENRICHMENT CHAPTER) Windows Store Apps.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Introducing the Sudoku Example
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
Chapter 9: Customize! Navigating with Tabs on a Tablet App.
Chapter 10: Move! Creating Animation
Chapter 2: Simplify! The Android User Interface
Another Method to Open WebSpace as a Web Folder Alternative Method for Creating Web Folder in WebSpace, Slide 1Copyright © 2004, Jim Schwab, University.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 5: Investigate! Android Lists, Arrays,
Basic Android Tutorial USF’s Association for Computing Machinery.
Explain the purpose of an operating system
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
Engage! Android User Input, Variables,
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 7: Reveal! Displaying Pictures in a GridView.
Android Boot Camp for Developers Using Java, 3E
Chapter 7: Reveal! Displaying Pictures in a Gallery.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
Tutorial 8 Designing a Web Site with Frames. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore the uses of frames.
Learning With Computers II (Level Orange) ©2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Microsoft Access 2010 Chapter 10 Administering a Database System.
First Venture into the Android World Chapter 1 Part 2.
Webview and Web services. Web Apps You can make your web content available to users in two ways in a traditional web browser in an Android application,
Microsoft FrontPage 2003 Illustrated Complete Designing Web Pages with Layout Tables.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Creating and Editing a Web Page
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Office 2013.
Web Site Development - Process of planning and creating a website.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Creating Web Pages with Links, Images, and Embedded Style Sheets
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 10: Move! Creating Animation 1 Android.
CHAPTER 4 Fragments ActionBar Menus. Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
Chapter 5 Using a Template to Create a Resume and Sharing a Finished Document Microsoft Word 2013.
Chapter 2: Simplify! The Android User Interface
GO! with Microsoft Office 2016
Android Boot Camp for Developers Using Java, 3E
Incorporating Databases with ADO.NET
GO! with Microsoft Access 2016
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Android SDK & App Development
Incorporating Databases with ADO.NET
Android Developer Fundamentals V2 Lesson 1
Shelly Cashman: Microsoft Word 2016
A02 Creating my website NAME ______________.
Presentation transcript:

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp for Developers Using Java, 3E Chapter 9: Customize! Navigating with a Master/Detail Flow Activity on a Tablet 1 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Objectives In this chapter, you learn to: Understand responsive design for Android apps Create an Android tablet project using an application template Understand the Master/Detail Flow template Modify the Master/Detail Flow template Add a WebView control 2 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Objectives (continued) Display a Web browser within a tablet app Add an Internet permission to the Android Manifest Customize the content of the sample template file Display a custom layout in the details pane 3 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Understanding Responsive Design Responsive design –An approach to designing apps and Web sites that provide an optimal viewing experience across as many devices as possible 4 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Using Application Templates Application templates –Used to create basic Android applications that can immediately be run and test on an Android device of any size –Android templates are available when you create a new Android project 5 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Master/Detail Flow Template –Creates an adaptive, responsive layout for a set of list items and associated detail content 6 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Master/Detail Flow Template (continued) 7 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Master/Detail Flow Template (continued) 8 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Master/Detail Flow Template (continued) 9 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Understanding the Structure of the Master/Detail Flow Template Java Files –ItemDetailActivity.java The purpose of this class is to display the activity_item_detail.xml layout file if a smartphone is detected –ItemDetailFragment.java The purpose of this class is to display the fragment_item_detail.xml layout file –ItemListActivity.java The purpose of this initial Activity is to display the master list in a two-pane mode if a tablet device is detected or to launch a second Activity to display the detailed items if a smaller device is detected –ItemListFragment.java The purpose of this class is to display the activity_item_list.xml layout file –DummyContent.java The purpose of this Java file is to provide sample code you customize to suit your specific app content. 10 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Understanding the Structure of the Master/Detail Flow Template (continued) 11 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Layout Files –activity_item_detail.xml When a smartphone is detected, the app uses this layout to display the FrameLayout instance –activity_item_list.xml(2) –activity_:item_list.xml When a smartphone is detected, the app uses this layout to display the master list fragment –activity_item_list.xml(sw600dp): When a tablet is detected, the app is displayed in a two-pane layout containing both the master item list fragment and the item detail container –fragment_item_detail.xml When a smartphone or a tablet is detected, this layout file displays the detail pane using the onCreateView( ) method 12 Android Boot Camp for Developers Using Java, 3rd Ed. Understanding the Structure of the Master/Detail Flow Template (continued)

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Adding Images to the Drawable Folder 13 Android Boot Camp for Developers Using Java, 3rd Ed. Before designing the XML layouts, first place three images in the drawable folder and then reference them in the photos.xml layout

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Designing an XML TableLayout The Strings table is responsible for the text displayed in the app –The first string is displayed in the title bar of the tablet, and the second string is displayed in the title bar of a smaller device such as a smartphone 14 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Designing an XML TableLayout (continued) 15 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Designing an XML TableLayout (continued) 16 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Designing an XML TableLayout (continued) 17 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Designing an XML TableLayout (continued) 18 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Creating a TextView XML Layout for the Second List Item 19 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Creating a TextView XML Layout for the Second List Item (continued) 20 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 21 Android Boot Camp for Developers Using Java, 3rd Ed. Webview –A View widget object that displays Web pages Permission –A restriction limiting access to a part of the code or to data on the device Creating a WebView XML Layout for the Third List Item Code Syntax

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Creating a WebView XML Layout for the Third List Item (continued) 22 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Customizing the Item List 23 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 24 Android Boot Camp for Developers Using Java, 3rd Ed. Customizing the Item List (continued)

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 25 Android Boot Camp for Developers Using Java, 3rd Ed. Customizing the Item List (continued)

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 26 Android Boot Camp for Developers Using Java, 3rd Ed. Customizing the Item List (continued)

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Displaying the Custom Layout in the Detail Pane 27 Android Boot Camp for Developers Using Java, 3rd Ed. A fragment is a piece of an application’s user interface or behavior that can be placed in an Activity –Fragments are essentially a sub-Activity hosted inside another Activity To determine if two String objects match exactly: –Use the.equals method, and not the == operator –The == operator compares if two objects are exactly the same object. –Two strings may be different objects, but have the same exact characters –The.equals() method is used to compare strings for equality

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Displaying the Custom Layout in the Detail Pane (continued) 28 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Displaying the Custom Layout in the Detail Pane (continued) 29 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Running and Testing the Application Tap or click the Run ‘app’ button on the Standard toolbar, select the Nexus 10 emulator to test the application in the emulator, and then tap or click the OK button Unlock the emulator (if necessary) Test each tab to ensure it works as intended –You must have Internet connectivity to open the Web page and enough memory available to handle the app connection to the Web 30 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Summary Responsive design is an approach to designing apps and Web sites that provide an optimal viewing experience across as many devices as possible Android templates are available when you create a new Android project and are used to create basic Android applications that you can run and test on an Android device of any size A tablet app created with the Master/Detail Flow template displays a Master list of items in a narrow vertical pane along the left edge of the screen To display the detail content for the first list item in the Bike and Barge app, you provide images and text descriptions in an XML TableLayout. Each row in the TableLayout displays an ImageView and TextView control 31 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Summary (continued) To display the detail content for the second list item, you code two TextView controls in a Linear layout that include the tour details To display the detail content for the third list item, you customize the default fragment_item_detail.xml layout to use a WebView object instead of a TextView object After including a WebView object in the XML layout of an app, you must add the INTERNET permissions to the Android Manifest file so the app can access the Internet and load Web pages 32 Android Boot Camp for Developers Using Java, 3rd Ed.

© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Summary (continued) To associate the content displayed in the detail pane with each list item in the left pane, you customize the DummyContent.java class file by adding code to the addItem statement so it references three String objects: the id, the item list string, and the Web site URL To handle the responses to user selections, you add conditional statements to the ItemDetailFragment.java file 33 Android Boot Camp for Developers Using Java, 3rd Ed.