当gridview noofColumn ="autofit"模式时,如何在Gridview中获取列数
如何获得单行no列
<GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:gravity="center"
android:numColumns="auto_fit"
android:stretchMode="columnWidth" />
Run Code Online (Sandbox Code Playgroud) getNumColumns()for GridViewAPI自API 11起可用,有没有办法在API 8中获得此方法?