I want to stretch the row of a GridView to match the height of the screen in Android. How do I do this?
Asked
Active
Viewed 7,731 times
3
-
does that mean you have only one row in your grid view.Give your layout , that can help to give right answers. This can be achieved either by keeping the height as fill parent . – png Apr 25 '12 at 11:31
-
Possible duplicate of [GridView row height](https://stackoverflow.com/questions/2375962/gridview-row-height) – halfer Aug 05 '18 at 19:46
1 Answers
1
You are in control over your row heights, by virtue of what you put in them. Since your cells appear to have more than one widget, they are presumably wrapped in a LinearLayout or something. Set your LinearLayouts to be some specific height, and the rows will all be that height.
Personally, I think you should be resizing your images if you are going to have text above and below each image on a per-cell basis.
With the Reference commonsware link

Community
- 1
- 1

Parag Chauhan
- 35,760
- 13
- 86
- 95
-
1did u copy/paste Commonsware answer? :))) http://stackoverflow.com/a/2379461/304270 funny..no credits.. :S – Ewoks May 07 '12 at 11:49
-
@Ewoks offcourse yes when i post question no one can give answer...after search on net got solution from commonsware's anwer.Also check my answer – Parag Chauhan May 07 '12 at 11:51
-
now when u edited for adding reference links seems to be much nicer answer ;) – Ewoks May 07 '12 at 14:05