Thanks guys, I now understand the empathy on XML a little better. :) /Casper
On 8 Aug., 00:12, Mark Murphy <mmur...@commonsware.com> wrote: > Casper Bang wrote: > > It wasn't until I found Mark Murphy's "The Busy Coder's > > Guide to Android Development" that I starting feeling a bit more > > comfortable with all the XML > > That is due to the subliminal "angle brackets are your friends" I have > in the watermark on the pages. > > ;-) > > > Also, Roman Guy replied in another thread, that you can't do the same > > with Java as you can with XML (although that seems odd, all other XML > > view technologies I know of ultimately translates into a Java > > component tree): > >http://groups.google.com/group/android-beginners/browse_thread/thread... > > His second post was a bit confusing to me, but I think he was trying to > echo the point he tried to emphasize in his first post. > > When you get to the Resources chapter in the aforementioned book, > there's a section at the end that covers resource sets. Those allow you > to have different resources loaded based on different criteria, from > user language to screen resolution to the existence of a QWERTY > keyboard, and beyond. While it is technically possible to do all of that > in Java, you'll drown in a sea of if(), switch(), and ternary operators. > > Similarly, while it is technically possible to use containers like > RelativeLayout fully in Java, it is *much* more verbose than setting > them up in XML. > > Finally, one key reason why any development platform uses XML for > anything is to help support the creation of tools to manipulate it. > Admittedly, that hasn't happened much with Android, outside of the main > SDK tools and stuff like MOTODEV's extensions on the same. But it is > much easier to build tools to generate and modify XML-based UIs than it > is to build tools to generate and modify Java-based UIs, IMHO. > > Those sorts of arguments may not matter much to you, which is why the > Java-based approach is available and valid. I use it sometimes myself, > though not terribly often. Choose the approach that you like. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---