I want to stretch the row of a GridView to match the height of the screen in Android. How do I do this?
2
- 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– png2012-04-25 11:31:05 +00:00Commented Apr 25, 2012 at 11:31
- Possible duplicate of GridView row heighthalfer– halfer2018-08-05 19:46:00 +00:00Commented Aug 5, 2018 at 19:46
Add a comment |
1 Answer
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
3 Comments
Ewoks
did u copy/paste Commonsware answer? :))) stackoverflow.com/a/2379461/304270 funny..no credits.. :S
Parag Chauhan
@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
Ewoks
now when u edited for adding reference links seems to be much nicer answer ;)