Jetpack komponieren Animation beim Starten einer anderen Aktivität
Posted: 28 Feb 2025, 02:07
Ich erstelle eine Launcher -App in komponieren und für die Animation mache ich < /p>
onClick = {
val centerX = position.x.toInt() + 24 // Half of 48.dp
val centerY = position.y.toInt() + 24 // Half of 48.dp
val options =
ActivityOptions.makeScaleUpAnimation(activity?.window?.decorView, centerX, centerY, 0, 0)
context.startActivity(intent, options.toBundle())
}
< /code>
Dies führt zu einer Skala -Animation aus korrekten Koordinaten, aber es gibt keine Symbolanimation. Gibt es einen Weg in Jetpack, um eine andere App mit einer Symbolanimation zu starten?
onClick = {
val centerX = position.x.toInt() + 24 // Half of 48.dp
val centerY = position.y.toInt() + 24 // Half of 48.dp
val options =
ActivityOptions.makeScaleUpAnimation(activity?.window?.decorView, centerX, centerY, 0, 0)
context.startActivity(intent, options.toBundle())
}
< /code>
Dies führt zu einer Skala -Animation aus korrekten Koordinaten, aber es gibt keine Symbolanimation. Gibt es einen Weg in Jetpack, um eine andere App mit einer Symbolanimation zu starten?