Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release, bukan aosp-main, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Mengimplementasikan transisi aplikasi yang disinkronkan
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Transisi Aplikasi yang Disinkronkan adalah fitur di Android 9
yang meningkatkan arsitektur transisi aplikasi yang ada. Saat pengguna membuka,
menutup, atau beralih antar-aplikasi, proses SystemUI atau Peluncur (layar utama)
akan mengirimkan permintaan untuk mengontrol animasi frame demi frame dengan sinkronisasi
yang terjamin antara animasi tampilan dan animasi jendela. Saat SystemUI
atau Peluncur menggambar frame baru sebagai bagian dari animasi, SystemUI atau Peluncur akan meminta transformasi
yang berbeda pada platform aplikasi animasi yang menentukan cara aplikasi disusun
di layar, dan menandai permintaan, transaksi platform, untuk disinkronkan
dengan frame yang sedang digambar.
Hal ini memungkinkan animasi transisi aplikasi baru yang tidak dapat dilakukan di Android
8.x dan yang lebih rendah. Misalnya, animasi peluncuran aplikasi
dapat mengubah ikon layar utama dengan lancar ke platform aplikasi dan
animasi peluncuran notifikasi
dapat mengubah notifikasi ke platform aplikasi.
Anda dapat menerapkan fitur ini di Peluncur/UI Sistem sesuai kebutuhan atau Anda dapat menggunakan
implementasi AOSP di SystemUI/Launcher3.
Validasi
Untuk memvalidasi performa animasi, ukur performa
aplikasi pengontrol, yaitu SystemUI atau Peluncur, selama animasi seperti yang dijelaskan
dalam
Menguji performa UI.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Implement synchronized app transitions\n\nSynchronized App Transitions is a feature in Android 9\nthat enhances the existing app transition architecture. When a user opens,\ncloses, or switches between apps, the SystemUI or Launcher (homescreen) process\nsends a request to control the animation frame-by-frame with guaranteed\nsynchronization between view animations and window animations. When the SystemUI\nor Launcher draws a new frame as part of an animation, it requests a different\ntransform on the animating app surface that determines how the app is composed\non the screen, and marks the request, a surface transaction, to be synchronized\nwith the frame it's currently drawing.\n\nThis allows for new app transition animations that are not possible on Android\n8.x and lower. For example, the\n[app launch animation](/static/docs/core/display/images/app-launch-animation.mp4)\ncan transform homescreen icons seamlessly into the app surface and the\n[notification launch animation](/static/docs/core/display/images/notification-launch-animation.mp4)\ncan transform notifications into the app surface.\n\nExamples and source\n-------------------\n\nSee the following references for this feature.\n\n- [`ActivityOptions.makeRemoteAnimation`](https://android.googlesource.com/platform/frameworks/base/+/33a701a55c28dd20390acee1ba7881a500830d7d/core/java/android/app/ActivityOptions.java#843)\n- [`RemoteAnimationAdapter`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/view/RemoteAnimationAdapter.java)\n- [`RemoteAnimationRunner`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/view/IRemoteAnimationRunner.aidl)\n- [`Activity.registerRemoteAnimations`](https://android.googlesource.com/platform/frameworks/base/+/f84e2f60fec6f6d2ecfb3b90ddf075101f4b902f/core/java/android/app/Activity.java#7672)\n\nFor a reference implementation for the notification launch animation, see\n[`ActivityLaunchAnimator.kt`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt).\n\nImplementation\n--------------\n\nYou can implement this feature on Launcher/System UI as required or you can use\nthe AOSP implementation in SystemUI/Launcher3.\n| **Note:** This feature increases the load on the GPU and CPU during animations.\n\nValidation\n----------\n\nTo validate the performance of the animations, measure the performance of the\ncontrolling app, i.e. SystemUI or Launcher, during the animations as described\nin\n[Test UI performance](https://developer.android.com/training/testing/performance)."]]