Fix scene back press inherit
This commit is contained in:
1 parent
3578477121
commit
5916e57bc8
2 files changed
+10
-10
No files matched your search
@@ -167,10 +167,6 @@ public abstract class Scene {
|
||||
onResume();
|
||||
}
|
||||
|
||||
void out() {
|
||||
onOut();
|
||||
}
|
||||
|
||||
void setFitPaddingBottom(int b) {
|
||||
onGetFitPaddingBottom(b);
|
||||
}
|
||||
@@ -237,9 +233,6 @@ public abstract class Scene {
|
||||
protected void onResume() {
|
||||
}
|
||||
|
||||
protected void onOut() {
|
||||
}
|
||||
|
||||
/**
|
||||
* It will be called if nav bar is transparent.
|
||||
* @param b the nav bar's height
|
||||
@@ -307,12 +300,19 @@ public abstract class Scene {
|
||||
getStageActivity().detachSceneFromStage(this);
|
||||
}
|
||||
|
||||
public void onBackPressed() {
|
||||
void onBackPressedInternal() {
|
||||
if (!endCurtainAnimation() && !sSceneManager.endLegacyScene()) {
|
||||
sSceneManager.finishScene(this);
|
||||
onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Not all back press will call it
|
||||
*/
|
||||
public void onBackPressed() {
|
||||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* End curtainAnimation if it is running
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user