[java] implement proper spacing objects, with support for default spacing #87

Merged
foghina merged 1 commits from spacing into master 2015-05-14 07:39:19 -07:00
foghina commented 2015-05-14 06:10:11 -07:00 (Migrated from github.com)

Using float arrays for spacing everywhere is silly and makes calculations hard. This patch makes Spacing an actual object (not just a util class) that holds on to style-set spacing and default spacing (e.g. for native components defining their own padding).

Also, this makes default spacing resolution happen in get(), so that the order in which set() and setDefault() are called doesn't matter anymore. Before, with updateSpacing(), setting default spacing overwrote style-set spacing.

Using float arrays for spacing everywhere is silly and makes calculations hard. This patch makes Spacing an actual object (not just a util class) that holds on to style-set spacing and default spacing (e.g. for native components defining their own padding). Also, this makes default spacing resolution happen in `get()`, so that the order in which `set()` and `setDefault()` are called doesn't matter anymore. Before, with `updateSpacing()`, setting default spacing overwrote style-set spacing.
Sign in to join this conversation.
No description provided.