How to avoid black screen when calling another activity in Android?

I am invoking an activity with the intent of the main activity. However, during the call, there are few system dialog boxes displayed, so a black screen will be displayed. How can I avoid such a black screen

resolvent:

Please check the flag you set in your intention

If you have finished (); Or flag_ ACTIVITY_ CLEAR_ Task – displays a blank screen on the ICs device because the current activity has been cleared before starting another activity

Intent intent = new Intent(getApplicationContext(), Activity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
overridePendingTransition (0, 0);

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>