简体   繁体   中英

PullToRefreshListView not supported in Android Jelly Bean

I had implemented the PullToRefreshListView from johan in an app which works great on every other version of Android except the new Jelly Bean. Does anyone know what might be the reason for this or if there exists a solution to this problem? I have tested this on the android version 4.1.1 with Samsung Galaxy S3.

Also, is it possible to set a filter within the app so that it can recognize if the device is running android version > 4.0. This might be a temporary solution.

Thanks Rajat

Turns out this is an actual problem in Jelly Bean. The solution is in the author's page:

You need to change the following lines in the PullToRefreshListView class:

@Override
protected void onAttachedToWindow() {
    super.onAttachedToWindow();
    setSelection(1);
}

More here

All the best

您要求的临时解决方案在此博客文章中进行了详细介绍,称为“延迟加载”。

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