From a9c806651fb68e1420ffdc434e0e7d0f9a5d5a9b Mon Sep 17 00:00:00 2001 From: qii Date: Tue, 22 Dec 2020 17:59:19 +0800 Subject: [PATCH] refactor: SceneActivity add getHomeSceneArguments(Intent) --- .../main/java/com/bytedance/scene/ui/SceneActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/scene_ui/src/main/java/com/bytedance/scene/ui/SceneActivity.java b/library/scene_ui/src/main/java/com/bytedance/scene/ui/SceneActivity.java index 742f976c..b208e85d 100644 --- a/library/scene_ui/src/main/java/com/bytedance/scene/ui/SceneActivity.java +++ b/library/scene_ui/src/main/java/com/bytedance/scene/ui/SceneActivity.java @@ -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; @@ -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(); } @@ -54,4 +57,9 @@ public void onBackPressed() { protected abstract Class getHomeSceneClass(); protected abstract boolean supportRestore(); + + @Nullable + protected Bundle getHomeSceneArguments(Intent intent) { + return null; + } }