0

Fragment での無限スクロールで PullToRefreshGridView (ScrollView のようなもの) を使用します。PullToRefreshGridView には、インターネットからダウンロードした画像である ImageView が多数含まれています。ユーザーが ImageView をクリックすると、画像に関する詳細情報を含む新しいアクティビティが開始されます。問題は、ユーザーが DetailedImageInfoActivity で戻るキーを押すと、PullToRefreshGridView がすべての画像の再読み込みを開始し、スクロール位置が失われることです。どうすればこれを回避できますか?

4

1 に答える 1

1

You should save all activity data you want to reuse when going back in the onSaveInstanceState() method and restore the data when the activity comes back to the foreground in the onCreate() method.

于 2013-01-16T14:38:08.440 に答える