android_learning:headfirst_android_development_notes:chapter_5
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_5 [2016/01/24 02:08] – mithat | android_learning:headfirst_android_development_notes:chapter_5 [2016/01/24 04:45] (current) – [Additional notes] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <WRAP center round info 60%> | ||
- | Under development. | ||
- | </ | ||
- | |||
====== Chapter 5 notes ====== | ====== Chapter 5 notes ====== | ||
Line 81: | Line 77: | ||
===== p. 205 ===== | ===== p. 205 ===== | ||
- | Create a throwaway project for this final section of the chapter and experiment with as many of the Views covered | + | Create a throwaway project for this final section of the chapter and experiment with as many of the Views covered as possible. |
+ | |||
+ | ===== p. 215 ===== | ||
+ | A good source of images that you can use without worrying about licensing is [[https:// | ||
+ | |||
+ | Another good resource is, [[https:// | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | **Be careful about file names.**\\ Image file names can only have lowercase letters, numbers, and the underscore in them. | ||
+ | </ | ||
+ | |||
+ | ===== p. 219 ===== | ||
+ | Your text suggest a ScrollView can be used as a root ViewGroup: | ||
+ | <file xml content_main.xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | tools: | ||
+ | tools: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | ... | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | However, in my experience this leads to unpredictable results (top of the ScrollView being obscured, etc.). A more reliable strategy seems to be nesting a ScrollView inside a root ViewGroups: | ||
+ | <file xml content_main.xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | app: | ||
+ | tools: | ||
+ | tools: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | ... | ||
+ | |||
+ | < | ||
+ | android: | ||
+ | android: | ||
+ | android: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Android Studio produces a warning stating that the '' | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | In the examples above, I am using string literals for the text attributes---only because this is throwaway, quick-n-dirty, | ||
+ | </ | ||
- | ===== Additional notes ===== | + | ===== Additional notes on the UI builder |
If you examine the UI builder on a layout' | If you examine the UI builder on a layout' | ||
android_learning/headfirst_android_development_notes/chapter_5.1453601288.txt.gz · Last modified: 2016/01/24 02:08 by mithat