Chapter 5 Notes
Title: Dealing with Sizes
Summary
This chapter covers the consequences of different sized pixels and how we treat them.
Oh that screen drivers were built report screen size and to take unchanging units like inches and translate them based on the hardware. This would be a non-issue as we would always specify things in inches. BUT of course we would be discussing the exponential scaling curve that dictates how much you can scale down... (think dpi as a scaling factor). Then the curve might be $$Scale~Factor = B e^{-x}$$
Programming Concepts Summary
Concept |
Page |
Consequences of different sized pixels |
87-89 |
Orientation changes are supported by default, but can be turned off. |
95 |
Font Sizes |
97 |
Programs
WhatSizePage
Page 91.
Concepts:
- Demonstrates the different sizes on different screens. Note: THIS PROGRAM DOES NOT USE DUIs! Instead it uses
- Demonstrates the event pattern by responding to size changes.
- Demonstrates how to use a timer to fire events.
- Dealing with Accessibility configuration changes.
Classes:
No new classes.
MetricalBoxViewPage
Page 96
Concepts:
Demonstrates the differences in platforms when setting the same value for the DUI unit on different platforms using a BoxView.
No new classes.
FontSizesPage
Page 97
Concepts:
- Demonstrates the named font sizes compared to point font sizes.
No new classes.
EstimatedFontSizePage
Page 100
Concepts:
- Demonstrates sizing fonts based on view size.
No new classes.
FitToSizeClockPage
Page 103
Concepts:
- Lambda expressions
Device.StartTimer demonstrated.
Classes:
Device.StartTimer - Allows you to fire and event on a timer.
AccessibilityTestPage
Skip in class
Page 106
Concepts:
- What happens when an accessibility setting has changed? Larger Text.
No new classes.
EmpiricalFontSizePage
Page 109
Concepts:
- Divide and conquer method Log(n)... See notes on PDF.