11. 11
It’s a phone not a PC
• Less memory, less computing power
• Battery is its food
• Internet connection is not always on and stable
• Some operations cost user money
• Lot of hardware combination
• Different screen size
• With/without GPS
• Capacitive/Resistive/No touch screen
• ....
13. 13
What is a good
mobile application?
• Decent user interface
• Better performance
• Consume less power
14. 14
A Good User
Interface
• Should be pretty but not only pretty
• Should be also
• Reasonable
• Predictable
• Responsive
• Easy to operate by fingers
15. 15
What you should
avoid
• Complex and meaningless gestures
• Meaningless animations
• Inconsistent UI behaviors
• Too many operating steps
• Hidden steps
• Long run logic in UI thread
• Block user (Progress dialog is not so good)
• Any assumption
16. 16
Performance
• Always think about the worst case
• IO costs
• Network is slow
• Long run (or busy) process consumes
battery
• Background is good but also evil
23. 23
Application
Fundamentals
• By default, every application runs on its
own process
• Applications could share process
• Each process has its own JVM
• By default, each application has a
unique Linux UID
• It’s possible to share same UID for two
different application
• Every process has its own memory limit
32. 32
Why you might need
Android sources?
• Android document sucks
• Trust no one! Truth is in the sources
• Many applications could be taken as
examples
37. 37
Layout
• Create a new layout
• Add a button
• Assign an ID to this button
• Add on click action to this button
• Loading layout resource
• Accessing button from codes