summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/FragmentManager.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-03-03 21:48:24 -0800
committerDianne Hackborn <hackbod@google.com>2011-03-03 22:17:16 -0800
commite3a7f628c6d9fef42be24999b3137ebe5c6f3525 (patch)
tree48ea9dc2b28e2d27c4da5c104491b31d087d2192 /core/java/android/app/FragmentManager.java
parent6c8d76527c938eb49182a6fd0677ccbc1618e7a8 (diff)
downloadframeworks_base-e3a7f628c6d9fef42be24999b3137ebe5c6f3525.zip
frameworks_base-e3a7f628c6d9fef42be24999b3137ebe5c6f3525.tar.gz
frameworks_base-e3a7f628c6d9fef42be24999b3137ebe5c6f3525.tar.bz2
Fix Fragment.onInflate() to actually work correctly.
Like, um, it needs to be given the Activity since this is called before the activity is attached. And it was called after the entire fragment and its *view* was created when being restored from saved state. And the documentation was whacked. Also fix the IME selector to dismiss when you tap outside of it. Change-Id: Icbcafe7558965a570bdef9cda3441b1f0f7a317c
Diffstat (limited to 'core/java/android/app/FragmentManager.java')
-rw-r--r--core/java/android/app/FragmentManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index d8d0a5b..ab60cf0 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -660,6 +660,12 @@ final class FragmentManagerImpl extends FragmentManager {
}
if (f.mState < newState) {
+ // For fragments that are created from a layout, when restoring from
+ // state we don't want to allow them to be created until they are
+ // being reloaded from the layout.
+ if (f.mFromLayout && !f.mInLayout) {
+ return;
+ }
if (f.mAnimatingAway != null) {
// The fragment is currently being animated... but! Now we
// want to move our state back up. Give up on waiting for the