identity: add the shared predictive-back peek (Modifier.predictiveBack)

The standard Android back-gesture preview — the surface scales to ~90%, rounds
its corners and shifts toward the swiped edge as the gesture is dragged, then
commits or springs back. Plus rememberReduceMotion() to honour the system
"remove animations" setting. Drawn from Calendula's CalendarTransitions so both
apps preview back the same way; adds the activity-compose dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-28 14:31:11 +02:00
parent 10e0ca0b06
commit 2085b82a5e
3 changed files with 91 additions and 0 deletions

View File

@@ -36,4 +36,6 @@ dependencies {
implementation(libs.androidx.ui)
implementation(libs.androidx.foundation)
implementation(libs.androidx.material3)
// activity-compose for PredictiveBackHandler + BackEventCompat (the back-gesture peek).
implementation(libs.androidx.activity.compose)
}