Head First Android Development : A Brain-Friendly Guide
Head First Android Development : A Brain-Friendly Guide
Click to enlarge
Author(s): Griffiths, Dawn
ISBN No.: 9781449362188
Pages: 732
Year: 201508
Format: Trade Paper
Price: $ 71.68
Status: Out Of Print

;Authors of Head First Android Development;How to Use This Book: Intro; Who is this book for?; We know what you''re thinking; We know what your brain is thinking; Metacognition: thinking about thinking; Here''s what WE did:; Here''s what YOU can do to bend your brain into submission; Read me; The technical review team; Acknowledgments; SafariĀ® Books Online;Chapter 1: Getting Started: Diving In; 1.1 Welcome to Androidville; 1.2 The Android platform dissected; 1.3 Here''s what we''re going to do; 1.4 Your development environment; 1.5 Install Java; 1.6 Build a basic app; 1.7 Let''s build the basic app; 1.


8 Activities and layouts from 50,000 feet; 1.9 Building a basic app (continued); 1.10 Building a basic app (continued); 1.11 You''ve just created your first Android app; 1.12 Android Studio creates a complete folder structure for you; 1.13 Useful files in your project; 1.14 Edit code with the Android Studio editors; 1.15 Run the app in the Android emulator; 1.


16 Creating an Android Virtual Device; 1.17 Run the app in the emulator; 1.18 You can watch progress in the console; 1.19 Test drive; 1.20 What just happened?; 1.21 Refining the app; 1.22 What''s in the layout?; 1.23 activity_main.


xml has two elements; 1.24 The layout file contains a reference to a string, not the string itself; 1.25 Let''s look in the strings.xml file; 1.26 Take the app for a test drive; 1.27 Your Android Toolbox;Chapter 2: Building Interactive Apps: Apps That Do Something; 2.1 You''re going to build a Beer Adviser app; 2.2 Here''s what you need to do; 2.


3 Create the project; 2.4 We''ve created a default activity and layout; 2.5 Adding components with the design editor; 2.6 activity_find_beer.xml has a new button; 2.7 A closer look at the layout code; 2.8 Changes to the XML.; 2.


9 .are reflected in the design editor; 2.10 Use string resources rather than hardcoding the text; 2.11 Change the layout to use the string resources; 2.12 Let''s take the app for a test drive; 2.13 Add values to the spinner; 2.14 Get the spinner to reference a string-array; 2.15 Test drive the spinner; 2.


16 We need to make the button do something; 2.17 Make the button call a method; 2.18 What activity code looks like; 2.19 Add an onClickFindBeer() method to the activity; 2.20 onClickFindBeer() needs to do something; 2.21 Once you have a View, you can access its methods; 2.22 Update the activity code; 2.23 The first version of the activity; 2.


24 What the code does; 2.25 Test drive the changes; 2.26 Building the custom Java class; 2.27 Enhance the activity to call the custom Java class so that we can get REAL advice; 2.28 Activity code version 2; 2.29 What happens when you run the code; 2.30 Test drive your app; 2.31 Your Android Toolbox;Chapter 3: Multiple Activities and Intents: State Your Intent; 3.


1 Apps can contain more than one activity; 3.2 Here''s the app structure; 3.3 Create the project; 3.4 Update the layout; 3.5 Update strings.xml.; 3.6 Create the second activity and layout; 3.


7 What just happened?; 3.8 Welcome to the Android manifest file; 3.9 Every activity needs to be declared; 3.10 An intent is a type of message; 3.11 Use an intent to start the second activity; 3.12 What happens when you run the app; 3.13 The story continues.; 3.


14 Test drive the app; 3.15 Pass text to a second activity; 3.16 Update the text view properties; 3.17 putExtra() puts extra information in an intent; 3.18 Update the CreateMessageActivity code; 3.19 Get ReceiveMessageActivity to use the information in the intent; 3.20 What happens when the user clicks the Send Message button; 3.21 Test drive the app; 3.


22 We can change the app to send messages to other people; 3.23 How Android apps work; 3.24 But we don''t know what apps are on the device; 3.25 Create an intent that specifies an action; 3.26 Change the intent to use an action; 3.27 What happens when the code runs; 3.28 The story continues.; 3.


29 The intent filter tells Android which activities can handle which actions; 3.30 How Android uses the intent filter; 3.31 You need to run your app on a REAL device; 3.32 Test drive the app; 3.33 What if you ALWAYS want your users to choose an activity?; 3.34 What happens when you call createChooser(); 3.35 The story continues.; 3.


36 Change the code to create a chooser; 3.37 Test drive the app; 3.38 If you have NO matching activities; 3.39 Your Android Toolbox;Chapter 4: The Activity Lifecycle: Being an Activity; 4.1 How do activities really work?; 4.2 The Stopwatch app; 4.3 The stopwatch layout code; 4.4 How the activity code will work; 4.


5 Add code for the buttons; 4.6 The runTimer() method; 4.7 Handlers allow you to schedule code; 4.8 The full runTimer() code; 4.9 The full StopwatchActivity code; 4.10 What happens when you run the app; 4.11 The story continues; 4.12 Test drive the app; 4.


13 What just happened?; 4.14 Rotating the screen changes the device configuration; 4.15 From birth to death: the states of an activity; 4.16 The activity lifecycle: from create to destroy; 4.17 Your activity inherits the lifecycle methods; 4.18 How do we deal with configuration changes?; 4.19 Or save the current state.; 4.


20 .then restore the state in onCreate(); 4.21 What happens when you run the app; 4.22 The story continues; 4.23 Test drive the app; 4.24 There''s more to an activity''s life than create and destroy; 4.25 The activity lifecycle: the visible lifetime; 4.26 We need to implement two more lifecycle methods; 4.


27 The updated StopwatchActivity code; 4.28 What happens when you run the app; 4.29 Test drive the app; 4.30 But what if an app is only partially visible?; 4.31 The activity lifecycle: the foreground lifetime; 4.32 Stop the stopwatch if the activity''s paused; 4.33 What happens when you run the app; 4.34 Test drive the app; 4.


35 The complete activity code; 4.36 Your handy guide to the lifecycle methods; 4.37 Your Android Toolbox;Chapter 5: The User Interface: Enjoy the View; 5.1 Your user interface is made up of layouts and GUI components; 5.2 Three key layouts: relative, linear, and grid; 5.3 RelativeLayout displays views in relative positions; 5.4 Adding padding; 5.5 Positioning views relative to the parent layout; 5.


6 Attributes for positioning views relative to the parent layout; 5.7 Positioning views relative to other views; 5.8 Attributes for positioning views relative to other views; 5.9 Use margins to add distance between views; 5.10 RelativeLayout: a summary; 5.11 LinearLayout displays views in a single row or column; 5.12 A linear layout displays views in the order they appear in the layout XML; 5.13 Let''s change up a basic linear layout; 5.


14 Here''s the starting point for the linear layout; 5.15 Make a view streeeeetch by adding weight; 5.16 Adding weight to one view; 5.17 Adding weight to multiple views; 5.18 Use gravity to specify where text appears in a view; 5.19 Test drive; 5.20 Using the android:gravity attribute: a list of values; 5.21 Move the button to the right with layout-gravity; 5.


22 More values you can use with the android:layout-gravity attribute; 5.23 The full linear layout code; 5.24 LinearLayout: a summary; 5.25 GridLayout displays views in a grid; 5.26 Adding views to the grid layout; 5.27 Let''s create a new grid layout; 5.28 We''ll start with a sketch; 5.29 Row 0: add views to specific rows and columns; 5.


30 Row 1: make a view span multiple columns; 5.31 Row 2: make a view span multiple columns; 5.32 The full code for the grid layout; 5.33 GridLayout: a summary; 5.34 Layouts and GUI components have a lot in common; 5.35 GUI components are a type of View; 5.36 What being a view buys you; 5.37 A layout is really a hierarchy of Views; 5.


38 Playing with views; 5.39 Text view; 5.40 Edit Text; 5.41 Button; 5.42 Toggle button; 5.43 Switch; 5.44 Check boxes; 5.45 Radio buttons; 5.


46 Spinner; 5.47 Image views; 5.48 Images: the layout XML; 5.49 Adding images to buttons; 5.50 Image Button; 5.51 Scroll views; 5.52 Toasts; 5.53 Your Android Toolbox;Chapter 6: List Views and Adapters: Getting Organized; 6.


1 Every app starts with ideas; 6.2 Categorize your ideas: top-level, category, and detail/edit activities; 6.3 Navigating through the activities; 6.4 Use ListViews to navigate to data; 6.5 We''re going to build part of the Starbuzz app; 6.6 The drink detail activity; 6.7 The Starbuzz app structure; 6.8 Here are the steps; 6.


9 The Drink class; 6.10 The image files; 6.11 The top-level layout contains an image and a list; 6.12 Use a list view to display the list of options; 6.13 The full top-level layout code; 6.14 Test drive; 6.15 Get ListViews to respond to clicks with a Listener; 6.16 Set the listener to the list view; 6.


17 The full TopLevelActivity code; 6.18 Where we''ve got to; 6.19 A category activity displays the data for a single category; 6.20 A ListActivity is an activity that contains only a list; 6.21 How to create a list activity; 6.22 android:entries works for static array data held in strings.xml; 6.23 Connect list views to arrays with an array adapter; 6.


24 Add the array adapter to DrinkCategoryActivity; 6.25 What happens when you run the code; 6.26 Test drive the app; 6.27 App review: where we''ve got to; 6.28 How we handled clicks in TopLevelActivity; 6.29 Pass data to an activity using the ListActivity onListItemClick() method; 6.30 The full DrinkCategoryActivity code; 6.31 A detail activity displays data for a single record; 6.


32 Retrieve data from the intent; 6.33 Update the views with the data; 6.34 The DrinkActivity code; 6.35 What happens when you run the app; 6.36 The story continues; 6.37 Test drive the app; 6.38 Your Android Toolbox;Chapter 7: Fragments: Make it Modular; 7.1 Your app needs to look great on all devices; 7.


2 Your app may need to behave differently too; 7.3 Fragments allow you to reuse code; 7.4 The Workout app structure; 7.5 Here are the steps; 7.6 The Workout class; 7.7 How to add a fragment to your project; 7.8 Fragment layout code looks just like activity layout code; 7.9 What fragment code looks like;.



To be able to view the table of contents for this publication then please subscribe by clicking the button below...
To be able to view the full description for this publication then please subscribe by clicking the button below...