android_learning:headfirst_android_development_notes:chapter_6
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
android_learning:headfirst_android_development_notes:chapter_6 [2016/01/31 21:09] – [p. 249: Creating a ListActivity] mithat | android_learning:headfirst_android_development_notes:chapter_6 [2016/01/31 21:20] (current) – [Chapter 6 notes] mithat | ||
---|---|---|---|
Line 2: | Line 2: | ||
<WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
- | When creating Activities in Android Studio 1.5, if you specify an **Empty** rather than a **Blank** layout template, | + | When creating Activities in Android Studio 1.5, if you specify an **Empty** rather than a **Blank** layout template, |
The notes that follow assume you are creating **Empty** Activities. | The notes that follow assume you are creating **Empty** Activities. | ||
Line 78: | Line 78: | ||
===== p. 239 ===== | ===== p. 239 ===== | ||
If you use Android Studio' | If you use Android Studio' | ||
- | {{youtube> | + | {{youtube> |
You'll find it easier if you add the needed '' | You'll find it easier if you add the needed '' | ||
Line 134: | Line 134: | ||
===== p. 250-252: Adapters ===== | ===== p. 250-252: Adapters ===== | ||
- | The Adapter is a software engineering design pattern. The behind | + | The Adapter is a software engineering design pattern. The essence of an Adapter object is that it functions as " |
In the DrinkCategoryActivity, | In the DrinkCategoryActivity, | ||
- | The way the source of data for this project | + | The source of data for the DrinkCategoryActivity |
In the meantime, here's a version of the ArrayAdapter code that adapts a simple string array for use with the ListView instead of the '' | In the meantime, here's a version of the ArrayAdapter code that adapts a simple string array for use with the ListView instead of the '' | ||
<WRAP center round info 90%> | <WRAP center round info 90%> | ||
- | ListActivities have a ListView built into them. | + | A ListActivity has a ListView built into it. |
To get a reference to a ListActivity' | To get a reference to a ListActivity' | ||
</ | </ | ||
- | |||
<file java DrinkCategoryActivity.java> | <file java DrinkCategoryActivity.java> | ||
Line 194: | Line 193: | ||
- Browse for the method you want to override, select it, and click //OK//. | - Browse for the method you want to override, select it, and click //OK//. | ||
- | '' | + | '' |
- | You may want to experiment with a handler that (again) just makes a Toast: | + | Instead, you may want to experiment with a handler that (again) just makes a Toast: |
<code java> | <code java> | ||
// Show a Toast when an item is clicked | // Show a Toast when an item is clicked | ||
Line 212: | Line 211: | ||
===== p. 263 ===== | ===== p. 263 ===== | ||
- | In the code here, you can see the advantage of creating a class to represent and contain your data. It makes accessing an object and all pertinent | + | In the code here, you can see the advantage of creating a class to represent and contain your data. It makes accessing an object and all pertinent |
===== p. 268 ===== | ===== p. 268 ===== | ||
- | I would add to the first point ("Sort your ideas ...") that you should use a top-level/ | + | I would add to the first point ("Sort your ideas ...") that you should use a top-level/ |
android_learning/headfirst_android_development_notes/chapter_6.1454274556.txt.gz · Last modified: 2016/01/31 21:09 by mithat