User Tools

Site Tools


android_learning:headfirst_android_development_notes:chapter_2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
android_learning:headfirst_android_development_notes:chapter_2 [2016/01/06 20:43] – [Codecheck 2] mithatandroid_learning:headfirst_android_development_notes:chapter_2 [2016/01/07 04:45] (current) mithat
Line 1: Line 1:
-<WRAP center round important 60%> 
-Under development. 
-</WRAP> 
- 
 ====== Chapter 2 notes ====== ====== Chapter 2 notes ======
  
 ===== About XML ===== ===== About XML =====
  
-In the previous chapter, we pretty much punted our way through the XML parts of a basic Android Project. We’ll use Android’s XML configuration files to a greater extent in this and subsequent chapters. You don’t need to be an XML expert to write the XML parts of an Android projectbut you do need basic XML knowledge.+In the previous chapter, we pretty much punted our way through the XML parts of a basic Android Project. We’ll use Android’s XML configuration files to a greater extent in this and subsequent chapters. You don’t need to be an XML expert to write the XML parts of an Android projectbut you do need basic XML knowledge.
  
 If you are brand new to XML and want a crash course in it, here are some resources for you to look into: If you are brand new to XML and want a crash course in it, here are some resources for you to look into:
  
-  * W3School’s [[http://www.w3schools.com/xml/xml_whatis.asp|XML tutorial]]//Introduction// through //Attributes//.+  * W3School’s [[http://www.w3schools.com/xml/xml_whatis.asp|XML tutorial]] (look at //Introduction// through //Attributes//)
   * A reasonable tutorial (video) by Mark Lassof:\\    * A reasonable tutorial (video) by Mark Lassof:\\ 
 {{youtube>y6DmCUH-4MQ?600x360&rel=0}} {{youtube>y6DmCUH-4MQ?600x360&rel=0}}
 +\\
  
-It might help you to know that XML was originally developed for use with Web technologies. It has since been adopted for use in many different situations. It’s particularly popular in Java culture.+It might help you to know that XML was originally developed for use with Web technologies and was based on HTML syntax. It has since been adopted for use in many different situations and is particularly popular in Java circles.
  
 ===== p. 42 ===== ===== p. 42 =====
Line 107: Line 104:
 </code> </code>
  
-===== Codecheck 1 =====+===== p. 56: Codecheck 1 =====
 The app through p. 56. The app through p. 56.
  
Line 132: Line 129:
 Why do you have to cast the reference returned by ''findViewById(R.id.brands)'' to a ''TextView''? It's because the [[http://developer.android.com/reference/android/view/View.html#findViewById(int)|findViewById() method]] returns values of type ''View''. This syntax is clumsy and error prone, but it's the way Android does it. Why do you have to cast the reference returned by ''findViewById(R.id.brands)'' to a ''TextView''? It's because the [[http://developer.android.com/reference/android/view/View.html#findViewById(int)|findViewById() method]] returns values of type ''View''. This syntax is clumsy and error prone, but it's the way Android does it.
  
-===== p. 60-62 =====+===== pp. 60-62 =====
 <code java>String beerType = String.valueOf(color.getSelectedItem());</code> <code java>String beerType = String.valueOf(color.getSelectedItem());</code>
 Why do you need to convert the value returned by ''Spinner.getSelectedValue()'' to a String? It's because that method returns a value of type ''Object''. See the [[http://developer.android.com/reference/android/widget/Spinner.html|Spinner documentation page]] and search for "getSelectedValue". Why do you need to convert the value returned by ''Spinner.getSelectedValue()'' to a String? It's because that method returns a value of type ''Object''. See the [[http://developer.android.com/reference/android/widget/Spinner.html|Spinner documentation page]] and search for "getSelectedValue".
  
-===== Codecheck 2 =====+===== p. 65: Codecheck 2 =====
 The app through p. 65. The app through p. 65.
 +{{youtube>_pNMNfbp1Nw?600x360&rel=0}}
 +\\
  
-{{youtube>dQw4w9WgXcQ?600x360&rel=0}}+===== p. 66: Quicktip ===== 
 +Creating a new class in Android Studio 
 +{{youtube>HNhzmUel8nU?600x360&rel=0}}
 \\ \\
  
Line 164: Line 165:
 </code> </code>
  
 +===== p. 69 =====
 +The [[http://developer.android.com/reference/java/lang/StringBuilder.html|StringBuilder]] class.
  
- +===== p. 71: Finished ===== 
- +{{youtube>mkq6viA6uHw?600x360&rel=0}} 
 +\\
  
  
android_learning/headfirst_android_development_notes/chapter_2.1452113009.txt.gz · Last modified: 2016/01/06 20:43 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki