Lecture 2 Flashcards
What is a Layout concerned with?
Organising component views in rectangular areas
Each rectangular area in a layout may be fixed or scrollable
T or F
T
Each rectangular area normally overlaps with another in a layout
T or F
F
What are the challenges of Layouts?
Must work on multiple resolutions and orientations without losing functionality
Should look good and be usable (right text size etc.)
What is the difference between screen resolution and screen density?
Resolution: Total number of pixels in a display
Density: Number of pixels that fit into an inch
What is density independence?
The uniform display of UI elements on screens with different densities
How many millimeters per inch on android?
25.4
How many points per physical inch on android?
72
Are points density independent?
Yes
What do dp and sp stand for on android?
Density independent pixels
Scale independent pixels
Are dp and sp density independent?
Yes
How many dp and sp per physical inch?
160
What are density buckets? How many are there and what are they?
Categories of densities for which images must be optimised on android
6 - Low, medium, TV, high, extra high, extra extra high
Difference between margin and padding?
Margin on outside
Padding on inside
What are fill_parent/match_parent and wrap_content layout properties?
wrap_content wants to be just big enough to enclose its contents
fill_parent and match_parent try to be the same size as the parent