On Oct 22, 8:05 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> MiguelParazwrote:
> > Hi,
> > I would like a table-style layout where the cell sizes are
> > automatically computed, without using AbsoluteLayout to position
> > them.
>
> > For example, the table has width 320 and height 240. For a 4x4 cell
> > table, each cell is of width 80 and height 60.
>
> > Inside each cell, I'd like the images centered inside. For example, if
> > the image is of width 40 and height 30, they will be positioned at
> > (20, 15) inside each cell.
>
> > I can't see how TableLayout supports - does it?
>
> Not the "automatically computed" part. There is no layout that achieves
> your desired effect and does the "automatically computed" part.GridView
> does the "automatically computed" work, but it is not a layout, but a
> selection widget (extends AdapterView).


Hi Mark,
GridView plus using ImageView.ScaleType.CENTER does achieve the effect
I want.
The drawback is that I need to set the ImageViews and their intents in
code.
It's no big deal for now, but going forward I'd like to make this into
a Layout so I can do the layout in XML.

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

Reply via email to