Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3393,6 +3393,7 @@ package android.app { method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public void cancel(); method public void closeOptionsMenu(); method public void create(); method public void dismiss(); method public boolean dispatchGenericMotionEvent(android.view.MotionEvent); method public boolean dispatchKeyEvent(android.view.KeyEvent); core/java/android/app/AlertDialog.java +2 −8 Original line number Diff line number Diff line Loading @@ -147,12 +147,8 @@ public class AlertDialog extends Dialog implements DialogInterface { /** * Gets one of the buttons used in the dialog. Returns null if the specified * button does not exist in the dialog. * <p> * Prior to API 20, this function could only be called after the dialog was * shown. In later versions, this function may be called at any time; * however, calling this function locks in various attributes including * buttons and icons. * button does not exist or the dialog has not yet been fully created (for * example, via {@link #show()} or {@link #create()}). * * @param whichButton The identifier of the button that should be returned. * For example, this can be Loading @@ -160,8 +156,6 @@ public class AlertDialog extends Dialog implements DialogInterface { * @return The button from the dialog, or null if a button does not exist. */ public Button getButton(int whichButton) { // Superclass handles re-entrance and multiple calls. dispatchOnCreate(null); return mAlert.getButton(whichButton); } Loading core/java/android/app/Dialog.java +16 −15 Original line number Diff line number Diff line Loading @@ -105,9 +105,6 @@ public class Dialog implements DialogInterface, Window.Callback, private boolean mShowing = false; private boolean mCanceled = false; /** Whether the execution path is currently in onCreate(). */ private boolean mInOnCreate = false; private final Handler mHandler = new Handler(); private static final int DISMISS = 0x43; Loading Loading @@ -241,6 +238,18 @@ public class Dialog implements DialogInterface, Window.Callback, return mShowing; } /** * Forces immediate creation of the dialog. * <p> * Note that you should not override this method to perform dialog creation. * Rather, override {@link #onCreate(Bundle)}. */ public void create() { if (!mCreated) { dispatchOnCreate(null); } } /** * Start the dialog and display it on screen. The window is placed in the * application layer and opaque. Note that you should not override this Loading Loading @@ -359,10 +368,8 @@ public class Dialog implements DialogInterface, Window.Callback, // internal method to make sure mcreated is set properly without requiring // users to call through to super in onCreate void dispatchOnCreate(Bundle savedInstanceState) { if (!mCreated && !mInOnCreate) { mInOnCreate = true; if (!mCreated) { onCreate(savedInstanceState); mInOnCreate = false; mCreated = true; } } Loading Loading @@ -461,20 +468,14 @@ public class Dialog implements DialogInterface, Window.Callback, } /** * Finds a child view with the given identifier. * <p> * Prior to API 20, this function could only be used after the first call * to {@link #show()}. In later versions, this function may be used at any * time; however, the first call to this function "locks in" certain dialog * characteristics. * Finds a child view with the given identifier. Returns null if the * specified child view does not exist or the dialog has not yet been fully * created (for example, via {@link #show()} or {@link #create()}). * * @param id the identifier of the view to find * @return The view with the given id or null. */ public View findViewById(int id) { if (!mCreated) { dispatchOnCreate(null); } return mWindow.findViewById(id); } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3393,6 +3393,7 @@ package android.app { method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public void cancel(); method public void closeOptionsMenu(); method public void create(); method public void dismiss(); method public boolean dispatchGenericMotionEvent(android.view.MotionEvent); method public boolean dispatchKeyEvent(android.view.KeyEvent);
core/java/android/app/AlertDialog.java +2 −8 Original line number Diff line number Diff line Loading @@ -147,12 +147,8 @@ public class AlertDialog extends Dialog implements DialogInterface { /** * Gets one of the buttons used in the dialog. Returns null if the specified * button does not exist in the dialog. * <p> * Prior to API 20, this function could only be called after the dialog was * shown. In later versions, this function may be called at any time; * however, calling this function locks in various attributes including * buttons and icons. * button does not exist or the dialog has not yet been fully created (for * example, via {@link #show()} or {@link #create()}). * * @param whichButton The identifier of the button that should be returned. * For example, this can be Loading @@ -160,8 +156,6 @@ public class AlertDialog extends Dialog implements DialogInterface { * @return The button from the dialog, or null if a button does not exist. */ public Button getButton(int whichButton) { // Superclass handles re-entrance and multiple calls. dispatchOnCreate(null); return mAlert.getButton(whichButton); } Loading
core/java/android/app/Dialog.java +16 −15 Original line number Diff line number Diff line Loading @@ -105,9 +105,6 @@ public class Dialog implements DialogInterface, Window.Callback, private boolean mShowing = false; private boolean mCanceled = false; /** Whether the execution path is currently in onCreate(). */ private boolean mInOnCreate = false; private final Handler mHandler = new Handler(); private static final int DISMISS = 0x43; Loading Loading @@ -241,6 +238,18 @@ public class Dialog implements DialogInterface, Window.Callback, return mShowing; } /** * Forces immediate creation of the dialog. * <p> * Note that you should not override this method to perform dialog creation. * Rather, override {@link #onCreate(Bundle)}. */ public void create() { if (!mCreated) { dispatchOnCreate(null); } } /** * Start the dialog and display it on screen. The window is placed in the * application layer and opaque. Note that you should not override this Loading Loading @@ -359,10 +368,8 @@ public class Dialog implements DialogInterface, Window.Callback, // internal method to make sure mcreated is set properly without requiring // users to call through to super in onCreate void dispatchOnCreate(Bundle savedInstanceState) { if (!mCreated && !mInOnCreate) { mInOnCreate = true; if (!mCreated) { onCreate(savedInstanceState); mInOnCreate = false; mCreated = true; } } Loading Loading @@ -461,20 +468,14 @@ public class Dialog implements DialogInterface, Window.Callback, } /** * Finds a child view with the given identifier. * <p> * Prior to API 20, this function could only be used after the first call * to {@link #show()}. In later versions, this function may be used at any * time; however, the first call to this function "locks in" certain dialog * characteristics. * Finds a child view with the given identifier. Returns null if the * specified child view does not exist or the dialog has not yet been fully * created (for example, via {@link #show()} or {@link #create()}). * * @param id the identifier of the view to find * @return The view with the given id or null. */ public View findViewById(int id) { if (!mCreated) { dispatchOnCreate(null); } return mWindow.findViewById(id); } Loading