Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/225.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在多个屏幕上使用overridePendingTransition_Android_Screen_Android Screen Support_Android Screen_Overridependingtransition - Fatal编程技术网

Android 在多个屏幕上使用overridePendingTransition

Android 在多个屏幕上使用overridePendingTransition,android,screen,android-screen-support,android-screen,overridependingtransition,Android,Screen,Android Screen Support,Android Screen,Overridependingtransition,我试图在我的应用程序中使用overridePendingTransition,但在同一xml(我正在编写一个android游戏)中使用多个屏幕,当我从一个屏幕切换到另一个屏幕时,我使用可见性属性,在这种情况下,是否有任何方法可以使用覆盖结束转换 例如: void switchToScreen(int screenId) { // make the requested screen visible; hide all others. for (int id : S

我试图在我的
应用程序中使用
overridePendingTransition
,但在同一
xml
(我正在编写一个android游戏)中使用多个
屏幕
,当我从一个屏幕切换到另一个屏幕时,我使用
可见性
属性,在这种情况下,是否有任何方法可以使用
覆盖结束转换

例如:

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);
        }