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 revisionLast revisionBoth sides next revision | ||
android_learning:headfirst_android_development_notes:chapter_5 [2016/01/24 03:43] – mithat | android_learning:headfirst_android_development_notes:chapter_5 [2016/01/24 04:44] – [p. 219] mithat | ||
---|---|---|---|
Line 87: | Line 87: | ||
**Be careful about file names.**\\ Image file names can only have lowercase letters, numbers, and the underscore in them. | **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 ===== |
android_learning/headfirst_android_development_notes/chapter_5.txt · Last modified: 2016/01/24 04:45 by mithat