Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

scene

> 编程语言
Open source

Android Single Activity Framework compatible with Fragment.

2.5K stars0 likes1 views
WebsiteGitHub

About

Android Single Activity Framework compatible with Fragment.

Scene is a lightweight library of navigation and UI composition based on view.

  • ✅ Fully compatible with the Jetpack Fragment framework
  • ✅ Simple navigation stack management, with support for multiple navigation stacks
  • ✅ Enhanced lifecycle management and event distribution
  • ✅ Simplifies complex cross-page and shared element animations
  • ✅ Supports modification and automatic restoration of Activity and Window properties
  • ✅ Enables data exchange between Scenes, including permission requests and grants within a Scene
  • ✅ Supports saving and restoring Scene state via Parcelable
  • ✅ No R8/Proguard configuration required

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:

  1. Activity, Poor performance, with the average startup time of even an empty Activity exceeding 100ms.
  2. 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:

gradle
//build.gradle
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
kotlin
//or settings.gradle.kts
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        ...
        maven { url = uri("https://jitpack.io") }
    }
}

Add it to your build.gradle, latest_version :

…
…

For simple usage, just let your Activity inherit from SceneActivity:

kotlin
class MainActivity : SceneActivity() {
    override fun getHomeSceneClass(): Class<out Scene> {
        return MainScene::class.java
    }

    override fun supportRestore(): Boolean {
        return false
    }
}

A simple Scene example:

…

Fragment

…

Compose

https://github.com/bytedance/scene/wiki/Compose

Sample

Scene sample is built using Gradle. On Linux, simply run:

./gradlew installDebug

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

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaactivityandroidandroid-architectureandroid-library

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言