On Tue, Apr 5, 2011 at 10:15 AM, Leo <allway...@gmail.com> wrote: > It is not just a matter of learning xml. I know xml fully well, and > haven't used the gui tool yet. I only create layouts with handwritten > xml. But when you encounter two attributes like "gravity" and > "layout_gravity" you scratch your head and question why the names are > not more intuitive (for something that sound so close). >
This isn't really related to UI builder tools or the IDE, it is just an aspect of the platform APIs. By convention, attributes with a "layout_" prefix are parsed by the parent layout manager. So "layout_gravity" applies to the view's layout manager if it supports the gravity attribute, controlling how the layout of it happens. "gravity" is just a regular attribute for the view, controlling its internal behavior; for example it tells TextView how to position the text inside itself. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en