Insert attr resources for declare styleable members

First, when a <declare-styleable> element contains an <attr> element,
and that attr element contains children (<flag> or <enum>), the R file
should contain an attribute definition for this <attr> (just like it
already does for non-framework attributes that specify a format
attribute).

Second, we need to preserve the order of the attributes in a declare
styleable element, so use a LinkedHashMap rather than a plain HashMap.

Change-Id: I8477461cfb8d382c18f0b4897fc355dc0947bb6a
7 files changed