A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release anziché aosp-main per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Le transizioni app sincronizzate sono una funzionalità di Android 9
che migliora l'architettura di transizione app esistente. Quando un utente apre, chiude o passa da un'app all'altra, il processo SystemUI o Avvio (schermata Home) invia una richiesta per controllare l'animazione fotogramma per fotogramma con sincronizzazione garantita tra le animazioni delle visualizzazioni e quelle delle finestre. Quando SystemUI o Avvio disegna un nuovo frame nell'ambito di un'animazione, richiede una trasformazione diversa sulla superficie dell'app in animazione che determina la composizione dell'app sullo schermo e contrassegna la richiesta, una transazione della superficie, da sincronizzare con il frame attualmente in fase di disegno.
In questo modo è possibile creare nuove animazioni di transizione delle app che non sono possibili su Android 8.x e versioni precedenti. Ad esempio, l'animazione di avvio dell'app può trasformare le icone della schermata Home nell'area dell'app e l'animazione di avvio della notifica può trasformare le notifiche nell'area dell'app.
Esempi e origine
Per questa funzionalità, consulta i seguenti riferimenti.
Per un'implementazione di riferimento per l'animazione di lancio della notifica, consulta
ActivityLaunchAnimator.kt.
Implementazione
Puoi implementare questa funzionalità in Avvio app/interfaccia utente di sistema in base alle tue esigenze oppure puoi utilizzare
l'implementazione AOSP in SystemUI/Launcher3.
Convalida
Per convalidare il rendimento delle animazioni, misura il rendimento dell'app di controllo, ovvero SystemUI o Avvio, durante le animazioni come descritto in Testare il rendimento dell'UI.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)."]]