Skip to content

Commit

Permalink
refactor: SceneActivity add getHomeSceneArguments(Intent)
Browse files Browse the repository at this point in the history
  • Loading branch information
qii committed Dec 22, 2020
1 parent c408f59 commit a9c8066
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -15,6 +15,7 @@
*/
package com.bytedance.scene.ui;

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
Expand All @@ -39,7 +40,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
getWindow().getDecorView().setSystemUiVisibility(getWindow().getDecorView().getSystemUiVisibility()
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
Bundle arguments = getHomeSceneArguments(getIntent());
this.mDelegate = NavigationSceneUtility.setupWithActivity(this, getHomeSceneClass())
.rootSceneArguments(arguments)
.supportRestore(supportRestore()).build();
}

Expand All @@ -54,4 +57,9 @@ public void onBackPressed() {
protected abstract Class<? extends Scene> getHomeSceneClass();

protected abstract boolean supportRestore();

@Nullable
protected Bundle getHomeSceneArguments(Intent intent) {
return null;
}
}

0 comments on commit a9c8066

Please sign in to comment.