Fix SceneDialog in multiple SceneManager
This commit is contained in:
1 parent
951e7323e3
commit
c832589ac6
11 files changed
+57
-30
No files matched your search
@@ -419,25 +419,16 @@ public class SimpleDialog extends SceneDialog implements View.OnClickListener,
|
||||
return this;
|
||||
}
|
||||
|
||||
public @NonNull SimpleDialog build() {
|
||||
public @NonNull SimpleDialog show(Scene scene) {
|
||||
// Avoid memory leak
|
||||
mContext = null;
|
||||
|
||||
SimpleDialog dialog = new SimpleDialog();
|
||||
SimpleDialog dialog = (SimpleDialog) SceneDialog.createSceneDialog(scene, SimpleDialog.class);
|
||||
dialog.setBuilder(this);
|
||||
dialog.show(new SimpleDialogCurtain(mStartX, mStartY));
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public void show() {
|
||||
show(null);
|
||||
}
|
||||
|
||||
public void show(Curtain curtain) {
|
||||
if (curtain == null) {
|
||||
curtain = new SimpleDialogCurtain(mStartX, mStartY);
|
||||
}
|
||||
build().show(curtain);
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnCreateCustomViewListener {
|
||||
|
||||
Reference in new issue
Block a user