Android XML Code format

It’s been a while since I last posted something about android programming.
From my point of view, this is a great thing, there is an untold story lying here! :)

Working with the Android UI requires a lot of XML “syntaxing”. (I’m sorry, I do not like the use of the words “programming” or “develpment” for XML).
Eclipse was a beautiful feature, called “Code formatter” where you press Ctrl + Shift + F (Format) and it nicely formats your code.
It works like a charm as long as the code is Java. When the code is XML, it does tide the code, but it is still non easily readable.

example of formatted but not well readable XML code:

Fortunately, there is a way for the eclipse code formatter to tide the XML code even more and make it way more readable.
Just go to Preferences -> XML -> XML Files -> Editor and check the “Split multiple attributes each on a new line”.

Now you have this:

enjoy! =)

Share

Major problems with Subversion and Eclipse

The use of Subversion with Eclipse is producing major problems.

Today I found out tha by default, Eclipse Java Builder copies all the non-java files under the source folder into the build output folder. This causes a problem if you are using Subversion, which creates a .svn folder under every workset folder.

So the solution ito prevent Eclipse from copying the .svn folders, is to go to Preferences->Java->Compiler->Building, expand the “Output folder”, and add “.svn” to “Filtered Resources”.

http://www.digizenstudio.com/blog/2005/05/07/prevent-eclipse-from-copying-svn-folders/

Share

Look at “this”

Happened randomly with no intention at all while developing (Android of course), first time really noticing something like this.

Stupid, though I like it very much :P

Share