Scene is designed to replace the use of Activities and Fragments for navigation and page segmentation in Android applications. It addresses the following issues:
Activity, Poor performance, with the average startup time of even an empty Activity exceeding 100ms.
Fragment, Poor compatibility, Google Navigation Component destroys a Fragment’s view when it becomes invisible.
Scene provides a simple, reliable, and extensible API for lightweight, high-performance navigation and page management.
We also offer a set of migration solutions to help developers gradually transition from Activities and Fragments to Scene.
Get Started
Add it to your root build.gradle at the end of repositories:
A normal Dialog’s Window is independent and in front of the Activity’s Window,
so if try to push a Scene in a opening Dialog, it will cause the Scene to appear behind it.
You can close the dialog box when click, or use transparent Scene to implement the dialog instead of a system Dialog.
Apps using Scene
TikTok
Douyin
Xigua Video
Toutiao
KeSong
License
Copyright (c) 2019 ByteDance Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Scene Framework
Android Single Activity Framework compatible with Fragment.
Scene is a lightweight library of navigation and UI composition based on view.
Download the latest Sample APK
Introduction
Scene is designed to replace the use of Activities and Fragments for navigation and page segmentation in Android applications. It addresses the following issues:
Scene provides a simple, reliable, and extensible API for lightweight, high-performance navigation and page management. We also offer a set of migration solutions to help developers gradually transition from Activities and Fragments to Scene.
Get Started
Add it to your root build.gradle at the end of repositories:
Add it to your build.gradle, latest_version :
For simple usage, just let your Activity inherit from SceneActivity:
A simple Scene example:
Fragment
Compose
https://github.com/bytedance/scene/wiki/Compose
Sample
Scene sample is built using Gradle. On Linux, simply run:
Document
https://github.com/bytedance/scene/wiki
Issues
Dialog
A normal Dialog’s Window is independent and in front of the Activity’s Window, so if try to push a Scene in a opening Dialog, it will cause the Scene to appear behind it. You can close the dialog box when click, or use transparent Scene to implement the dialog instead of a system Dialog.
Apps using Scene
License