Android GUI Tools (previously Re: {Philippine Android} Re: Intellij Idea)

45 views
Skip to first unread message

Marc Lester Tan

unread,
May 28, 2011, 11:09:09 PM5/28/11
to philippine-and...@googlegroups.com
Hi Keith,

Nice article there. Do note that there are several ways of preventing copy/paste nightmare when developing android UI. You can use themes and styles to move out all of the repeating style properties in your components to a single xml. You can also use the <include> tag to reuse certain layouts (for example, header or navigation bar) and the latest ADT 11 provides visual refactoring where you can extract styles as well as generate includes automatically from selected layout container. 


In the code, you can always inflate any xml layout and attach it to where ever you want. That gives you the ability to provide consistent L&F like for example, rows in your ListView or to layout your dialogs.

Another way of preventing code duplication is to use Library Project:


This is often used when creating paid and free versions of your app. So you define the common stuff of your app in the library such as the UI, styles and logic and then just override those when writing the normal Android project that uses the library you created. In this way, you will only have single code base for two different versions of your app preventing code duplication and putting several checks in your code for checking paid or free version.




On Sun, May 29, 2011 at 10:33 AM, Keith Bennett <keithr...@gmail.com> wrote:
Hi, everyone.  This discussion inspired me to finally write about my
pet peeve with GUI builders and data driven GUI configuration.

The article is at:

http://krbtech.wordpress.com/2011/05/28/android-guis-the-case-against-gui-builders-and-data-driven-gui-configuration/

(or http://snipurl.com/27xpi6)

Feel free to comment here or there...

- Keith

--
You received this message because you are subscribed to the Google Groups "Philippine Android" group.
To post to this group, send email to philippine-and...@googlegroups.com.
To unsubscribe from this group, send email to philippine-android-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/philippine-android-developers?hl=en.





Keith Bennett

unread,
May 30, 2011, 6:56:13 PM5/30/11
to Philippine Android
Marc -

Great information!

You've exposed a significant portion of my article as incorrect, and
based on my limited knowledge of the Android platform. That's exactly
what I asked for. ;)

If you don't mind, I'll modify the article accordingly, and point to
your message for further information...unless you put it in a blog
article, then I'll point to that (hint, hint). ;)

I would still be curious, though...

* Regarding Android's anti-duplication measures that you mentioned,
have you had the need to use them, and if you've used them, how well
implemented are they? Is using them straightforward and intuitive?

* Do GUI builders support these reusable components?

* Do you have any feedback about using XML as a programming language?

* In your experience, observation, or expectations, how likely is it
that development teams would actually use these features to avoid
duplication? My observations about Java Swing were that many
developers continued imitating approaches shown in oversimplified
example code way beyond their appropriate use; if this is also true
among Android developers, then these features might not be used (of
course, it would be unfair to blame the framework for this). While a
developer can similarly abuse Java (or Ruby) code, duplicating things
that could be extracted into a single place, developers are more
accustomed to eliminating duplication in source code than in
configuration files -- therefore my contention that using a
programming language rather than a configuration language would result
in less duplication.

Cheers,
Keith


On May 28, 11:09 pm, Marc Lester Tan <mail...@gmail.com> wrote:
> Hi Keith,
>
> Nice article there. Do note that there are several ways of preventing
> copy/paste nightmare when developing android UI. You can use themes and
> styles to move out all of the repeating style properties in your components
> to a single xml. You can also use the <include> tag to reuse certain layouts
> (for example, header or navigation bar) and the latest ADT 11 provides
> visual refactoring where you can extract styles as well as generate includes
> automatically from selected layout container.
>
> http://www.youtube.com/watch?v=Oq05KqjXTvs&feature=player_profilepage...
>
> In the code, you can always inflate any xml layout and attach it to where
> ever you want. That gives you the ability to provide consistent L&F like for
> example, rows in your ListView or to layout your dialogs.
>
> Another way of preventing code duplication is to use Library Project:
>
> http://developer.android.com/guide/developing/projects/index.html
>
> This is often used when creating paid and free versions of your app. So you
> define the common stuff of your app in the library such as the UI, styles
> and logic and then just override those when writing the normal Android
> project that uses the library you created. In this way, you will only have
> single code base for two different versions of your app preventing code
> duplication and putting several checks in your code for checking paid or
> free version.
>
> --
> Cheers,
>
> *Marc Lester Tan *
>
> Singapore #: +6597896575
>
> http://www.appalert.cohttp://www.appcellar.comhttp://moonphase.pendukosoftware.comhttp://blogs.marctan.com
>
> <http://www.proudlypinoy.org/>
>
> On Sun, May 29, 2011 at 10:33 AM, Keith Bennett <keithrbenn...@gmail.com>wrote:
>
>
>
> > Hi, everyone.  This discussion inspired me to finally write about my
> > pet peeve with GUI builders and data driven GUI configuration.
>
> > The article is at:
>
> >http://krbtech.wordpress.com/2011/05/28/android-guis-the-case-against...
>
> > (orhttp://snipurl.com/27xpi6)
Reply all
Reply to author
Forward
0 new messages