3

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 . Commented Apr 25, 2012 at 11:31
  • Possible duplicate of GridView row height Commented Aug 5, 2018 at 19:46

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

3 Comments

did u copy/paste Commonsware answer? :))) stackoverflow.com/a/2379461/304270 funny..no credits.. :S
@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
now when u edited for adding reference links seems to be much nicer answer ;)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.