Android Application Development Lecture Notes INDEX

Total Page:16

File Type:pdf, Size:1020Kb

Android Application Development Lecture Notes INDEX

Android Application Development – Lecture Notes INDEX

Lesson 1. Introduction 1-2 Mobile Phone Evolution 1-3 Hardware: What is inside a Smart Cellular Phone? 1-4 Hardware: Reusing Cell Phone Frequencies 1-5 Software: What is Android? 1-6 Why Android? 1-7 What is the Open Handset Alliance? 1-8 Open Handset Alliance Members 1-10 The Mobile Revolution 1-12 Android vs. OS Competitors 1-13 Android Software/Hardware Components 1-14 Android’s Software Architecture 1-15 Software Layers (Video) 1-16 Application’s Life Cycle (Video) 1-17 Android’s API (Video) 1-18 Android Application Framework (Video) 1-19 Android Development Tools (Video) 1-20 An Introduction to Android (Video) 1-21 The Dalvik Virtual Machine (Video) 1-22 Android Intents 1-24 Example1: Java + Built-in Intent 1-27 Dissecting an Android Application 1-28 Android Manifest XML File 1-31 Example2. Currency converter Appendix – The Size of the Mobile Market 1-40 2009 Mobile market compared to other technologies 1-41 2009 Mobile Revenue 1-42 2009 Mobile Search Market 1-43 2009 How SMS compares as a text communication application 1-44 2009 Mobile Operating System Market Share Worldwide 1-45 Mobile Market – Second Quarter 2010-Q2 1-46 Mobile Market – Fourth Quarter 2010-Q4 1-47 Mobile Market – Second Quarter 2011-Q2 1-48 Mobile Market – First Quarter 2014-Q1 1-51 Cell-Phone Diffusion Lesson 2. Android App Development Using Eclipse + ADT + SD 2-2 Android Applications (Just Apps) 2-3 Dalvik Virtual Machine vs. Android Runtime (ART) 2-4 Development Workbenches 2-5 Typical Layout of the Eclipse-ADT IDE 2-6 Layout of Android-Studio IDE 2-7 Eclipse Setup 2-8 SDK names 2-9 Users Wanting to Update an Older Android Workbench 2-10 First Time Android Users who have Eclipse already installed 2-11 Configure the ADT Plugin 2-12 Working with Virtual Devices (AVDs) 2-13 Creating a Virtual Device (AVD) 2-16 Testing a Virtual Device (AVD) 2-17 Running a Virtual Device (AVD) 2-20 Controlling the AVD Operations 2-21 Working with Emulator Disk Images 2-22 Upload/download Data, Music and Picture files to the Emulator’s SDcard 2-27 Example : HelloWorld App 2-33 File Structure of a Typical Android App 2-34 Login into the Android OS shell 2-38 Hacking: Moving an app from a Rooted Phone to the Emulator 2-39 Simpler than Hacking: Install a File Manager for Android 2-40 Using an alternate SD card & userData Image 2-41 Sending Text Messages from your Window’s PC to the Emulator 2-43 Making a Phone Call from your PC to the Emulator 2-45 Using Eclipse’s DDMS facility 2-48 Appendix 1 - Using a Hardware Device 2-49 Appendix 2 – Emulator-to-Emulator Interaction 2-50 Appendix 3 - How to Transfer Your Google Contacts into the Emulator

Lesson 3. Application’s Life Cycle 3-2 Anatomy of Android Apps - Core Components 3-3 1. Activity Class 3-4 Example of an app containing multiple Activities 3-5 2. Service Class 3-7 3. Broadcast Receiver Class 3-9 4. Content Provider Class 3-11 Life and Death in Android 3-13 The Activity Stack 3-15 Life Cycle Callbacks 3-17 Activity States and Callback Methods 3-18 Activity State: Running 3-19 Activity State: Paused 3-20 Activity State: Stopped 3-21 Activity Life Cycle Diagram 3-22 Your turn! Lab Experience 1 3-25 Your turn! Lab Experience 2 3-26 Your turn! Lab Experience 3 3-27 Foreground Lifetime 3-28 Associating Lifecycle Events with Application’s Code 3-31 Killable States 3-32 Data Persistence using Android SharedPreferences Class 3-34 A complete Example: The LifeCycle App

Lesson 4. Graphical User Interfaces The Model-View-Control Pattern (MVC) Android UI Design Patterns (Video) The View Class Using XML to represent UIs Nesting XML Layouts Setting Views to Work A Sample of Common Android Layouts A Sample of Common Android Widgets GUI Editing: XML Version GUI Editing: WYSIWYG Version Tools you can use to create an Android GUI GUI Elements: The LAYOUT FrameLayout LinearLayout Setting Attributes Orientation Fill Model Warning! Same XML different rendition… Weight Gravity Layout-Gravity vs. Gravity Padding Padding and Margin Relative Layout Referring to the container Referring to Other Widgets Example 2 Table Layout Setting number of columns Example3 Stretching a column Example4 Stretching the entire table ScrollView Layout (Vertical & Horizontal) Example 5. Vertical ScrollView Layout Example 6. HorizontalScrollView Layout Miscellaneous: Absolute Layout (Deprecated) Connecting Layouts to Java Code What is the meaning of an Android Context? (aside) Basic Widgets: TextViews Example 8 - TextViews Basic Widgets: Buttons Example9: Connecting Multiple Buttons Lesson 4. Graphical User Interfaces Buttons - Combining Images & Text How icons are used in Android? Basic Widgets: EditText Boxes Example10: Login-Screen Programming time – Your turn! Basic Widgets: CheckBoxes Example11: CheckBoxes – CaféApp Basic Widgets: CheckBoxes Example12: CheckBoxes – CaféApp Miscellaneous: Useful UI Attributes & Java Methods Appendix A. Using the @string resource Appendix B. DroidDraw Appendix C. Android Asset Studio Appendix D. Measuring Graphic Elements Appendix E. Hierarchy Viewer Tool Appendix F. Customizing Widgets Appendix G: Fixing Bleeding Background Color 4-107 Appendix H: Useful Color Theme (Android Holo) 4-108 ImageView & ImageButton Lesson 5. List-Based Widgets: Lists, Grids, and Scroll Views 5-2 GUI Design for Selection Making 5-3 Showing a large set of choices on the GUI 5-4 ListViews 5-5 ArrayAdapter 5-6 List-Based App = ListView + Data + DataAdapter 5-7 Using the ArrayAdapter Class 5-8 Example1A: ListView showing a simple list (plain text) 5-14 An experiment based on Example1A 5-15 Another code experiment based on Example1A 5-16 Example1B: Using Activity & ArrayAdapter 5-19 Example1C: Custom ListView 5-21 The Spinner Widget 5-25 Example2: Using the Spinner Widget 5-26 GridViews 5-27 Useful Properties 5-28 Fitting the View to the Screen 5-31 Example3A: GridView Demo - Layout 5-33 AutoComplete TextView 5-36 Example4: AutoComplete Demo - Layout 5-37 The HorizontalScrollView Widget 5-38 Example5: HorizontalScrollView Demo 5-39 How to make a thumbnail ? 5-47 Populating The HorizontalScrollView Widget 5-48 Image-Based GridViews (again…) 5-54 Example6: GridView Images Demo 5-57 Custom Adapter - MyImageAdapter 5-59 Example6B: An Experiment - Changing from GridView to ListView 5-60 Using The Spinner Widget (again…) 5-65 Example7: Spinner Demo2 5-66 Example8: Defining your own ListViews 5-67 Create your own DataAdapter 5-75 Designing Custom-Rows 5-76 The LayoutInflater Class 5-80 Example 9: Storing Images on the SD card 5-82 The BitmapFactory class 5-84 Appendix A: Predefined Android Resources 5-91 Appendix B: EditText Boxes & Keyboarding 5-92 Example10: Using android:inputType=" text|textCapWords" 5-93 Example 11: Using android:inputType="number|numberSigned|numberDecimal" 5-93 Example 12: Using android:inputType="textPassword" 5-94 Example 13: Using android:inputType="textEmailAddress" 5-95 Example 14: Using android:inputType="phone" 5-96 Example 15: Using android:inputType="time" 5-98 Example 16: Using android:inputType="time" 5-99 Example 17: Using android:inputType="datetime" 5-100 Disable Soft Keyboarding on an EditText View Lesson Y. X

Lesson Y. X

Recommended publications