From 6558056e8fccc32f9e1dc59e46d09f8d916b7538 Mon Sep 17 00:00:00 2001 From: George Mount Date: Fri, 29 Aug 2014 08:15:48 -0700 Subject: API Review: Change SharedElementListener to SharedElementCallback. Bug 15863001 Bug 17289526 Changed SharedElementListener to SharedElementCallback Renamed methods to use "on" prefix. Adjusted javadoc to reflect usage in Fragments. Change-Id: I7cc517c269a8e417cb5c3a0948bdd3b654d42472 --- core/java/android/app/Fragment.java | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'core/java/android/app/Fragment.java') diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index dbee81e..672ef7b 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -495,8 +495,8 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene private Boolean mAllowReturnTransitionOverlap; private Boolean mAllowEnterTransitionOverlap; - SharedElementListener mEnterTransitionListener = SharedElementListener.NULL_LISTENER; - SharedElementListener mExitTransitionListener = SharedElementListener.NULL_LISTENER; + SharedElementCallback mEnterTransitionCallback = SharedElementCallback.NULL_CALLBACK; + SharedElementCallback mExitTransitionCallback = SharedElementCallback.NULL_CALLBACK; /** * State information that has been retrieved from a fragment instance @@ -1621,31 +1621,31 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene } /** - * When custom transitions are used with Fragments, the enter transition listener + * When custom transitions are used with Fragments, the enter transition callback * is called when this Fragment is attached or detached when not popping the back stack. * - * @param listener Used to manipulate the shared element transitions on this Fragment + * @param callback Used to manipulate the shared element transitions on this Fragment * when added not as a pop from the back stack. */ - public void setEnterSharedElementTransitionListener(SharedElementListener listener) { - if (listener == null) { - listener = SharedElementListener.NULL_LISTENER; + public void setEnterSharedElementTransitionCallback(SharedElementCallback callback) { + if (callback == null) { + callback = SharedElementCallback.NULL_CALLBACK; } - mEnterTransitionListener = listener; + mEnterTransitionCallback = callback; } /** - * When custom transitions are used with Fragments, the exit transition listener + * When custom transitions are used with Fragments, the exit transition callback * is called when this Fragment is attached or detached when popping the back stack. * - * @param listener Used to manipulate the shared element transitions on this Fragment + * @param callback Used to manipulate the shared element transitions on this Fragment * when added as a pop from the back stack. */ - public void setExitSharedElementTransitionListener(SharedElementListener listener) { - if (listener == null) { - listener = SharedElementListener.NULL_LISTENER; + public void setExitSharedElementTransitionCallback(SharedElementCallback callback) { + if (callback == null) { + callback = SharedElementCallback.NULL_CALLBACK; } - mExitTransitionListener = listener; + mExitTransitionCallback = callback; } /** -- cgit v1.1