android - Making GridView items square -


i items of gridview square. there 2 columns , items width fill_parent (e.g. take horizontal space possible. items custom views.

how make items height equal variable width?

there simpler solution when gridview columns stretched. override onmeasure of gridview item layout with...

@override public void onmeasure(int widthmeasurespec, int heightmeasurespec) {     super.onmeasure(widthmeasurespec, widthmeasurespec); } 

Comments

Popular posts from this blog

sql - text truncated using perl DBI insert -

c++ - Is it possible to compile a VST on linux? -

php - Pass object by reference or value -