简体   繁体   中英

The method getNumColumns() is undefined for the type GridView

if (getAbsListView() instanceof GridView && Build.VERSION.SDK_INT >= 11) {
                delay += getAnimationDelayMillis() * ((mLastAnimatedPosition + 1) % ((GridView) getAbsListView()).getNumColumns());
            }

The method getNumColumns() is undefined for the type GridView

Manifest Settings:

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

getNumColumns()可用于API 11中的GridView,因此您可以更改其minSdkVersion或使用其API 11功能与API 8中提供的功能一起创建自定义GridView'。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM