
Section 8.10: Create assets folder 113 ...........................................................................................................................
Chapter 9: Resources 115 .............................................................................................................................................
Section 9.1: Define colors 115 ..........................................................................................................................................
Section 9.2: Color Transparency(Alpha) Level 116 ......................................................................................................
Section 9.3: Define String Plurals 116 .............................................................................................................................
Section 9.4: Define strings 117 ........................................................................................................................................
Section 9.5: Define dimensions 118 ................................................................................................................................
Section 9.6: String formatting in strings.xml 118 ...........................................................................................................
Section 9.7: Define integer array 119 .............................................................................................................................
Section 9.8: Define a color state list 119 ........................................................................................................................
Section 9.9: 9 Patches 120 ...............................................................................................................................................
Section 9.10: Getting resources without "deprecated" warnings 123 .........................................................................
Section 9.11: Working with strings.xml file 123 ...............................................................................................................
Section 9.12: Define string array 124 ..............................................................................................................................
Section 9.13: Define integers 125 ....................................................................................................................................
Section 9.14: Define a menu resource and use it inside Activity/Fragment 125 .......................................................
Chapter 10: Data Binding Library 127 .....................................................................................................................
Section 10.1: Basic text field binding 127 ........................................................................................................................
Section 10.2: Built-in two-way Data Binding 128 ...........................................................................................................
Section 10.3: Custom event using lambda expression 129 ..........................................................................................
Section 10.4: Default value in Data Binding 131 ............................................................................................................
Section 10.5: Databinding in Dialog 131 .........................................................................................................................
Section 10.6: Binding with an accessor method 131 .....................................................................................................
Section 10.7: Pass widget as reference in BindingAdapter 132 ...................................................................................
Section 10.8: Click listener with Binding 133 ...................................................................................................................
Section 10.9: Data binding in RecyclerView Adapter 134 .............................................................................................
Section 10.10: Databinding in Fragment 135 .................................................................................................................
Section 10.11: DataBinding with custom variables(int,boolean) 136 ............................................................................
Section 10.12: Referencing classes 136 ...........................................................................................................................
Chapter 11: Exceptions 138 ............................................................................................................................................
Section 11.1: ActivityNotFoundException 138 ..................................................................................................................
Section 11.2: OutOfMemoryError 138 ..............................................................................................................................
Section 11.3: Registering own Handler for unexpected exceptions 138 ......................................................................
Section 11.4: UncaughtException 140 ..............................................................................................................................
Section 11.5: NetworkOnMainThreadException 140 ......................................................................................................
Section 11.6: DexException 142 ........................................................................................................................................
Chapter 12: Getting Calculated View Dimensions 143 ....................................................................................
Section 12.1: Calculating initial View dimensions in an Activity 143 .............................................................................
Chapter 13: AsyncTask 144 ...........................................................................................................................................
Section 13.1: Basic Usage 144 ..........................................................................................................................................
Section 13.2: Pass Activity as WeakReference to avoid memory leaks 146 ..............................................................
Section 13.3: Download Image using AsyncTask in Android 147 ................................................................................
Section 13.4: Canceling AsyncTask 150 ..........................................................................................................................
Section 13.5: AsyncTask: Serial Execution and Parallel Execution of Task 150 ..........................................................
Section 13.6: Order of execution 153 ..............................................................................................................................
Section 13.7: Publishing progress 153 .............................................................................................................................
Chapter 14: SharedPreferences 155 ........................................................................................................................
Section 14.1: Implementing a Settings screen using SharedPreferences 155 .............................................................
Section 14.2: Commit vs. Apply 157 ................................................................................................................................
Section 14.3: Read and write values to SharedPreferences 157 ..................................................................................