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

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

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -