Rob
Rob

Reputation: 762

Android GridView Column Stretching

I have a GridView that is being used to display a number of rows of digits (see picture).

I want each row to begin with a heading that says "Row n" for the nth row.

However, the TextView containing "Row n" is being occluded by the other digits. The more digits being displayed, the worse the occlusion.

How can I allow my "Row n" TextView to be displayed in full?

screenshot

FYI: The gridview has gravity: center, stretch mode: columnWidth, height and width are fill parent.

The textview containing "Row n" has gravity: LEFT, the digits have gravity: CENTER_HORIZONTAL

Upvotes: 1

Views: 3992

Answers (2)

AlexanderZ
AlexanderZ

Reputation: 521

As far as I could tell when dealing with the same problem, GridView columns must all be the same width. The only way to make the whole "Row n:" label visible would be to reduce the number of columns, thus making each column wider, otherwise try using a TableView instead.

Upvotes: 2

Orest
Orest

Reputation: 1897

Try setting wrapContent as TextView width

Upvotes: 1

Related Questions