Brion VIBBER has submitted this change and it was merged.

Change subject: Do not keep all of past page fragments fully in memory
......................................................................


Do not keep all of past page fragments fully in memory

We're still saving their state, so the pages will come right back
up. We might want to discard them after some depth to preserve
memory, but that can come later.

This means we lose the scroll position when you hit back, but
that needs to be solved anyway in the 'fragment re-created'
case for supporting rotates, etc - so will get to it eventually.

Change-Id: I0f4368bf9cd2b6d5365e1c8db28a3c140c07863f
---
M wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java 
b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java
index 63bc012..e08a5bf 100644
--- a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java
+++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java
@@ -37,7 +37,7 @@
     private void displayNewPage(PageTitle title) {
         PageViewFragment pageFragment = new PageViewFragment(title);
         getSupportFragmentManager().beginTransaction()
-                .add(R.id.content_frame, pageFragment)
+                .replace(R.id.content_frame, pageFragment)
                 .addToBackStack(null)
                 .commit();
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/93423
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f4368bf9cd2b6d5365e1c8db28a3c140c07863f
Gerrit-PatchSet: 7
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to