On Thu, May 15, 2014 at 11:49 AM, dashman <[email protected]> wrote:

> I think both accomplish similar end goal right?


I suppose you *could* do it with a style like that, but you shouldn't.
That's the purpose of dimens - to declare units of measurement that can
vary across different device configurations.

The purpose of an attribute is to define a configurable property of a view,
which can then be set in Xml or at runtime. Padding is already a property
of View, so creating your own is redundant. Then you'd have to apply this
style to each and every view which you'd want to modify. Even then, your
attribute would only be understood by a CustomView which you implemented to
specifically read and use this attribute, further restricting how and when
you could use it.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to