Use overridePendingTransition with multiple screens

100 Views Asked by At

I'm trying to use overridePendingTransition in my app but I'm using multiples screens in the same xml (I'm programming a android game) and when I switch from one screen to another I use the Visibility property, in this case is there any way to use the overridePendingTransition?

Example:

void switchToScreen(int screenId) {

        // make the requested screen visible; hide all others.
        for (int id : SCREENS) {
            findViewById(id).setVisibility(screenId == id ? View.VISIBLE : View.GONE);
        }
0

There are 0 best solutions below