No, your best option is to create a custom layout. It's pretty easy to do,
and it will be easier than trying to change GridView's behavior.

On Sat, Sep 3, 2011 at 11:38 PM, Shri Borde <[email protected]> wrote:

> TableLayout is for cases where you want a specific number of columns.
> However, I would like the number of columns to adjust based on the width of
> the screen/parent ViewGroup as done by GridLayout. And I do not actually
> want the grid to scroll - I want its height to expand as much as needed to
> display all the rows. So overriding GridView and modifying its behavior
> seems like the best option.
>
> Thanks for the pointers and the discussion.
>
> On Fri, Sep 2, 2011 at 5:28 PM, Mark Murphy <[email protected]>wrote:
>
>> On Fri, Sep 2, 2011 at 8:12 PM, Shri Borde <[email protected]> wrote:
>> > Actually, I am using a GridView in a ListView, not a LinearLayout.
>>
>> You cannot reliably put scrollable things in other scrollable things.
>>
>> > I am using the GridView as a table, and it seems
>> > reasonable to want to display the table in a ListView. There needs to be
>> > some way to accomplish this.
>>
>> Use a TableLayout.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> Android 3.1 Programming Books: http://commonsware.com/books
>>
>> --
>> 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]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> 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]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
[email protected]

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to