Alex Rivera | Logout

Building Android Apps without XML

Asked 2012-03-14T22:55:36.490
16

Do I have to use XML to build the interface in Android Apps? I don't like XML and I would rather write the interfaces out in Java.

In iOS, you can write your interfaces using Interface Builder/Storyboards, or you can just write them by hand in code, which I think is better.

Do I have to use XML with Android?

Edit
Report

1 Answer

4

I've personally, constructed a large visual library. Windows, ddlb's, date pickers, lists, custom image buttons, text edit areas.. Not a lick of XML.. I've tested layouts on a little phone, and on a 7in tablet. All good.

It can be done, but it's a lot of work. The plus is, my controls look like my controls. They have a flavor to them that is utterly under my control.

Everything is of course abstracted, so when I'm writing "the behavioral logic" that's all I care about.

Oh another plus.. when I take the code to another language (c++, c# or objective c) the apps look the same, because I have the exact same abstraction (with in limits of the languages).

answered 2012-07-27T12:54:01.627

Your Answer