beyond the hello world -golf scores
DESCRIPTION
Beyond the Hello World -Golf Scores. Frank Xu Gannon University. Reference. Learn how to develop for Android, Beyond HelloWorld http://www.youtube.com/watch?v=rm-hNlTD1H0. main.xml. Layout of Main.xml. TextView = label (Java). Property ( Name,Values pair) . - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/1.jpg)
Beyond the Hello World-Golf Scores
Frank XuGannon University
![Page 2: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/2.jpg)
Reference•Learn how to develop for Android,
Beyond HelloWorld•http://www.youtube.com/watch?v=rm-hNl
TD1H0
![Page 3: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/3.jpg)
![Page 4: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/4.jpg)
![Page 5: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/5.jpg)
main.xml
![Page 6: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/6.jpg)
Layout of Main.xml
![Page 7: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/7.jpg)
TextView = label (Java)
![Page 8: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/8.jpg)
Property (Name,Values pair)
![Page 9: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/9.jpg)
How to change resource “hello” to “title”?•Change “hello” to “title” in string.xml•Change property value of Text from
“@string/hello” to “@string/title” in main.xml
![Page 10: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/10.jpg)
Change size of TextView
Px: pixleDp: Density-independent Pixels. an abstract unit that is based on the physical density of the screen. Sp: Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference.
![Page 11: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/11.jpg)
![Page 12: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/12.jpg)
Add buttons
Drag&drop
![Page 13: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/13.jpg)
Add button
![Page 14: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/14.jpg)
How to Change ID and Text
![Page 15: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/15.jpg)
Add More Components
![Page 16: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/16.jpg)
Mapping UI to XML
![Page 17: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/17.jpg)
Rearrange components
1. Add LinearLayoutScorePanel2. Move up and down3. Rearrange components use up
and down
![Page 18: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/18.jpg)
Main.xml again
![Page 19: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/19.jpg)
LayoutParams•Describes how big the view wants to be
for both width and height.•FILL_PARENT
▫Renamed MATCH_PARENT in API Level 8 and higher
▫The view wants to be as big as its parent (minus padding)
•WRAP_CONTENT▫The view wants to be just big enough to
enclose its content (plus padding)
![Page 20: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/20.jpg)
![Page 21: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/21.jpg)
Layout Width
![Page 22: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/22.jpg)
Button Layout
Take as much as space as possible
![Page 23: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/23.jpg)
New Look•Can you finish
yours like this?•Hints
▫Scores Gravity: center Padding: 10sp
▫- weight: 1▫+weight:1▫99 weight: none▫OK weight: 0.5
![Page 24: Beyond the Hello World -Golf Scores](https://reader035.vdocuments.us/reader035/viewer/2022062501/56815fce550346895dcecf22/html5/thumbnails/24.jpg)
Test your UI