Android XML

197 views
Skip to first unread message

Nate

unread,
Apr 5, 2011, 4:50:10 AM4/5/11
to Moritz Post, tablelay...@googlegroups.com
Thoughts on the Android XML layout stuff:

1) Built-in layouts are not very powerful. Weak layouts means you need many of them, which means many APIs to learn. A more powerful layout could replace most of the built-in layouts and doesn't necessarily have to be harder to use. Swing has a similar problem that has never been addressed.

2) Built-in layouts are terribly verbose to use. Eg:
setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
Another example (notice my shameless advertisement :p):
http://stackoverflow.com/questions/4817449/how-to-have-image-and-text-center-within-a-button

3) "android" namespaces all over the place. This is a ridiculous waste of space.

4) No code completion. This wouldn't be so bad, except AFAIK there isn't a 1:1 mapping of XML attributes to Java code. It isn't always just setting Java beans (eg android:layout_*).

5) You can't type the layout and see the results. You must flip back and forth between subtabs in Eclipse.

Sign up to the discussion group yet? :) Reply all please, if you feel!

-Nate
Reply all
Reply to author
Forward
0 new messages