Tim*_*son 27 java android android-intent
我从活动A调用活动B,其中包含使用以下代码的视频视图:
Intent intent = new Intent(this, B.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivityForResult(intent, 0);
Run Code Online (Sandbox Code Playgroud)
我正在使用Intent.FLAG_ACTIVITY_NO_ANIMATION以避免在调用新活动时转换动画.但它不适合我和黑屏在转型期间即将到来.有没有办法避免这种过渡动画和黑屏,以便用户不会知道在新屏幕中调用视频视图?
tec*_*unc 58
试着打电话:
Intent intent = new Intent(this, B.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivityForResult(intent, 0);
overridePendingTransition(0,0); //0 for no animation
Run Code Online (Sandbox Code Playgroud)