Android Workshop Day 2

Embed Size (px)

DESCRIPTION

Android Workshop GUI Basics day 2

Citation preview

  • 1. Android Workshop Day 2 Android GUI Basics Senad Uka April 2014

2. Get it! http://mhalka.com/tag/day2/ 3. Contents Goal of day 2 Multiple screens Layouts overview List view Changing styles Referencing GUI elements in code 4. Goal of Day 2 Create and test GUI in ADT Code activity transitions Homework: start implementing business logic of the application 5. Multiple screens Biggest issue Density Screen size Orientation Device independent pixels (dp) 6. Size and Density 7. Screen Size in dp xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp 8. Describing UI in XML 9. In practice... 10. In practice... 11. Linear Layout 12. Relative Layout 13. Frame Layout 14. ListView ListView is a view group that displays a list of scrollable items transformed into a view by an Adapter instance. 15. GridView GridView is a ViewGroup that displays items transformed into views by ListAdapter instance in a two-dimensional, scrollable grid. 16. Styling UI 17. Styling UI http://android-holo-colors.com/ Download and unzip into project directory 18. Inflating views 19. Referencing Elements 20. Transitioning between Activites