You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LoaderCursor</a> — A complete version of the
492
492
snippet shown above.</li>
493
493
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html"> LoaderThrottle</a> — An example of how to use throttling to
494
-
reduce the number of queries a content provider does then its data changes.</li>
494
+
reduce the number of queries a content provider does when its data changes.</li>
495
495
</ul>
496
496
497
497
<p>For information on downloading and installing the SDK samples, see <a
Copy file name to clipboardExpand all lines: docs/html/resources/articles/faster-screen-orientation-change.jd
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ though.</p>
58
58
59
59
<p>When your application displays a lot of data, or data that is expensive to fetch,
60
60
the automatic destruction/creation of the activities can be lead to a
61
-
painful user experience. Take the example of <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/">Photostream</a>,
61
+
painful user experience. Take the example of <a href="http://code.google.com/p/apps-for-android/source/browse/#git%2FPhotostream%2Fsrc%2Fcom%2Fgoogle%2Fandroid%2Fphotostream">Photostream</a>,
62
62
a simple Flickr browsing application. After you launch the application and choose a Flickr account, the
63
63
application downloads a set of 6 photos (on a T-Mobile G1) from the
64
64
Flickr servers and displays them on screen. To improve the user
@@ -80,9 +80,9 @@ offers a great API exactly for that purpose.</p>
80
80
81
81
<p>The Activity class has a special method called
82
82
{@link android.app.Activity#onRetainNonConfigurationInstance()}. This method
83
-
can be used to pass an arbitrary object <em>your future self</em> and Android
83
+
can be used to pass an arbitrary object to <em>your future self</em> and Android
84
84
is smart enough to call this method only when needed. In the case of Photostream,
85
-
the application <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/PhotostreamActivity.java#226">used this method</a>
85
+
the application used this method
86
86
to pass the downloaded images to the future activity on orientation change.
87
87
The implementation can be summarized like so:</p>
88
88
@@ -96,7 +96,7 @@ public Object onRetainNonConfigurationInstance() {
96
96
97
97
<p>In the new activity, in <code>onCreate()</code>, all you have to do to
98
98
get your object back is to call {@link android.app.Activity#getLastNonConfigurationInstance()}.
99
-
In Photostream, <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/PhotostreamActivity.java#251">this method is invoked</a>
99
+
In Photostream, this method is invoked
100
100
and if the returned value is not null, the grid is loaded with the list of
101
101
photos from the previous activity:</p>
102
102
@@ -128,3 +128,6 @@ only, not the drawables. Finally, remember that
128
128
<code>onRetainNonConfigurationChange()</code> should be used only to retain
129
129
data that is expensive to load. Otherwise, keep it simple and let Android
130
130
do everything.</p>
131
+
132
+
<p>Also read the guide to <a href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
0 commit comments