Kah0ona wrote: > I have a simple main.xml file with a GridView inside a LinearLayout > (orientation=vertical). The GridView has numColumns specified at 3 and > there are exactly 9 objects in the grid, creating a 3x3 matrix, where > each columnWidth is fixed at 30dp. Both layout_height and _width are > specified as "wrap_content". > > Under the gridview is a simple TextView with a hardcoded string in it. > > Now on the bottom this wrap_content works; i can tell by putting a > different background color, to see the edges of the gridview. But on > the right side, it fills up to fill the screen, as if fill_parent was > specified! What am I doing wrong here? What is the reason that it > doesn't wrap the content horizontally, but it DOES vertically?
Possibly by default android:stretchMode behaves as "AUTO_FIT". Try android:stretchMode="NO_STRETCH", or possibly android:stretchMode=" STRETCH_COLUMN_WIDTH" or "STRETCH_SPACING", in your layout XML for your GridView, to see if one of those settings is more to your liking. -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: All titles, revisions, & ebook formats, just $35/year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

