1

While using TaskStackBulider for removing previous pages,

 Intent i = new Intent(DeepLinkingActivity.this, HomePageclass);
                    i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                    i.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
                    i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
                    i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
                    i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

                    TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
                    if (i != null) {
                        stackBuilder.addNextIntentWithParentStack(i);
                    }
                    stackBuilder.startActivities();

It is clearing all previous pages ,But it shows a white screen before loading HomePage.Can anybody know about this issue?In Home page , i used

android:launchMode="singleTask"   
KP_
  • 1,854
  • 25
  • 43
  • I was just wondering, were you able to solve this issue? I am getting a similar behaviour, and sometimes, on some phones, the white screen remains frozen and nothing happens afterwards. – Aram Tchekrekjian Feb 29 '16 at 22:13

1 Answers1

-3

Why not just startActivity(i) and finish() ?

Pavel Biryukov
  • 1,076
  • 12
  • 19