android - GridView as child of FrameLayout with layout_weight -
how make hxw of gridview
same hxw of parent view (framelayout
) ?
xml :
<framelayout android:id="@+id/frame_menu" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="8"> <gridview android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/gridview" android:numcolumns="2" android:layout_gravity="center" /> </framelayout>
set gravity
android:gravity="fill_horizontal"
or android:gravity="fill"
; , use android:stretchmode="columnwidth"
..
if fails try use auto_fit
Comments
Post a Comment