在Android活动转换期间,当从启动画面到登录页面时,会出现屏幕 Flink ,但奇怪的是,从登录到注册页面时不会出现:
x1c 0d1x的数据
有没有办法解决这个问题?
我已经看到了其他几种解决方案,例如:
- getWindow(). setEnter(null); getWindow().setExitTransition(null);
- 启动画面代码中“finish()”语句后的“overridePendingTransition(0,0)”。
- https://mikescamell.com/shared-element-transitions-part-5/
下面是我的启动画面活动活动开关和动画的Java代码:
// on below line we are calling handler to run a task
// for specific time interval
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(SplashScreen.this, signIn.class);
// intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
// Get the shared element (the View) that will be transitioned between activities
View sharedElement = findViewById(R.id.logoView);
// Create the transition animation options
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(SplashScreen.this,
Pair.create(sharedElement,"shared_logo_transition"));
// Start the new activity with the transition animation
startActivity(intent, options.toBundle());
finish();
//overridePendingTransition(0, 0);
}
}, 1000);
字符串
1条答案
按热度按时间khbbv19g1#
字符串