Is there a way to force GridView to only be a single row? Right now by default it will extend its height to accommodate all views supplied by its adapter
This isn't Jeopardy
schwiz
2010-09-16 05:55:51
In a way, yes, but restrict to a single row and possibly don't display a scrollbar. I can try to check it out.
2010-09-16 13:45:46
I don't think there's anything built in like that. I'm just a little confused on what you're trying to accomplish, exactly. If you're just wanting a single visible row of images, I would think a tableview set to stretch columns would work, or a linear layout. Can you clarify some on this?
kcoppock
2010-09-16 14:23:33
Hi yes, basically say I have 1000 images - just have the grid view display the first N that can fit within its current layout width - so maybe like 5 might end up actually fitting. The rest would be completely truncated.
2010-09-17 03:29:01
In that case, What I would do personally is just throw some function in there to determine the screen width, and calculate how many images will fit, then just add those as new ImageViews to an existing horizontal LinearLayout, centered with padding.
kcoppock
2010-09-17 05:10:39