On Mon, Feb 13, 2012 at 8:27 AM, John Goche <[email protected]>wrote:
> On Mon, Feb 13, 2012 at 4:48 PM, Tor Norbye <[email protected]> wrote: > > > Go to Preferences -> Android -> Editors and uncheck the first option > > ("Format XML files using the standard Android XML style rather than > > the configured Eclipse XML style (additional options below)". > > Thanks, that worked! > > > The builtin Eclipse XML formatter isn't suitable for formatting XML files > > the "standard" Android way (where for example layouts and value files are > > formatted differently), so in Android projects we use an alternate > formatter > > (which also sorts attributes etc). If you uncheck the option above, it > will > > just use the default Eclipse XML formatter instead. > > Not sure what the benefits of having attributes sorted rather than appear > in > the order the user wants them to be is, but I guess I'm not going to run > into > any problem if I format the XML files my own preferred way. Otherwise, > please > let me know. The order doesn't matter -- just like the formatting and whitespace itself doesn't matter -- but for clarity some developers prefer to list ids and attributes first, and in layouts the layout params before the others etc. -- Tor -- 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

