Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Support animation in Activity intent builder #1029

@dalewking

Description

@dalewking

Related to #1027 and sort of an alternative to it.

Since API level 5 you could follow a call to startActivity or finish with a call to overridePendingTransitions to control the animation of the entering and exiting activities. Would be nice if this were supported in the fluent intent builder generated for activities.

I see 2 ways to go with this. First you can have the start methods return an object that implements a withAnimation method so you might have this:

MyActivity_.intent(this).start().withAnimation(enterAnimation, exitAnimation);

Alternatively, it could be separate methods called before start that save the values for use after starting the activity as in this:

MyActivity_.intent(this).withEntryAnimation(in).withExitAnimation(out).start();

While the second flows better and does not rely on knowing the order of parameters it potentially could be confusing. If you instead of start called get to get the intent the animation calls did nothing. Its possible to prevent this with additional types, but that is a bit more work on AA coders.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions