You have several questions mixed in there, but the big one seems to be
can you make a dynamic UI at run time (not XML at compile time) and
the answer is yes. The XML stuff is just a convenience, you can do all
of the same things in code, and dynamically if need be.

For an example have a look at the API demos, ScrollView2 makes a bunch
of dynamic buttons.  It's not a table/grid, but you can do that too,
same idea.

On Apr 3, 7:56 am, simon <[EMAIL PROTECTED]> wrote:
> Hi.
> I want to make an app that displays a List (or Table) with a dynamic
> number of columns. I want to be able to assign data via a Cursor to a
> dynamic number of TextViews (or whatever) which represent a table row.
> For example:
> I can't use a SimpleCursorAdapter like this:
>
>      new SimpleCursorAdapter(this, R.layout.table_row, dataCursor,
> from, to);
>
> because at build time, i do not know how much TextViews will be in a
> table row. i don't know how large from and to will be. i can't use XML
> files. it should be dynamic.
>
> Is there a possibility, to build a UI-Layout dynamically in java? The
> old fashioned way like Swing or AWT?
> What am i supposed to pass to the constructor of an Adapter instead of
> "R.layout.table_row" then? How do i handle other parameters like that?
> Is there another possibility?
>
> Thanx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to