Upload
sylwester-madej
View
103
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Entire course: http://soldiersofmobile.com/android-course/ Video (In Polish): http://www.youtube.com/watch?v=WU6xjakyf4Y Introduction to: - layouts - resources and assets - adapters and ListView + homework Source code used can be found at: https://github.com/smdremedy/kni-lunchtime This is a second part of Practical Android Course conducted at Warsaw University of Technology.
Citation preview
ANDROID II
CONTACTSYLWESTER MADEJ@[email protected]
TODAY'S MISSION● Learn LinearLayouts● Play with some views● Get to know onClick vs onClickListener● Understand resources and assets● Learn some Git/Eclipse tricks
ANDROID UI● procedural (java code)● declarative (xml)
LAYOUTS AND VIEWS
COMPOSITE PATTERN
LAYOUT PARAMS● layout_width, layout_height● wrap_content vs match_parent● layout_weight● layout_gravity, gravity● mm, in, px, dp(dip), sp● mdpi 160ppi -> 1dp=1px
RESOURCES: TYPES● layout● drawable● color● values:
– strings.xml– dimens.xml– styles.xml
RESOURCES: SELECTORS● density (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)● lang (en, pl...)● orientation (land)● version (v14)● sw (720dp)● size (small, large)
DEMO I
Let's do some layouts● activity_login● add colors● add styles.xml + enable it● add dimens● make it look nice● move to strings.xml
TOOLS: HIERARCHY VIEWER
Quick demo
DEMO II
ListView + ArrayAdapterGoogle Gson
HOMEWORK II● Homework:
Create ItemDetailsActivity simillar to this.
This activity should be opened after one of meals was selected on list and should return to list with info was meal ordered.
Want more?
NEXT MISSION● Learn Ajax calls (Aquery or Volley)● Load images dynamically● Implement login/logout● Use preferences (save session)● Make first working (kind of) app!
FOR MORE GO TO:SoldiersOfMobile.com