Am using gridview to display an image and a textview.
After implementing this,
1) some times the alignment seems to be dancing while moving the gridivew 2) Some times the gridview get disappeared.
Can u plz advise how to resolve it ?
Thanks in advance.
@Prasath, Set the Layout params for your images in Grid view. Your issue will be resolved. Since Grid view has issue with scrolling of uneven height objects. That's why your GridView disappears.
https://stackoverflow.com/a/5958097/2188257 this solution partialy solved the problem for me. When you set a fixed number of lines for the textview inside gridItems it doesnt fall apart anymore, but then you get the problem of having fixed number of lines for the text. its a problem cause i would like to reuse the layout for a grid menu on more than one place, and in some i have grids with big labels with 4-5 lines, and in a main menu labelshave just one line, but have to have 5 fixed lines because of other grids. I guess the solution could be to measure each element in the adapter and later setting layoutParams for the grid with max values... or creating multiple xml files for different uses of the grid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With