0

I have a quick click button to start activity by intent in my android application, it succeed to target activity ,but back to the desktop, I can not understand. please guide me to resolve this.

Intent intent = new Intent(getContext(), ActivityDetailActivity.class);
startActivity(intent);

enter image description here enter image description here

alanyuan
  • 1
  • 1

1 Answers1

1

You need to call intent like this :

Intent intent = new Intent(MainActivity.this, ActivityDetailActivity.class);
startActivity(intent);
Deepak Kumar
  • 995
  • 9
  • 18
Abdennacer Lachiheb
  • 2,110
  • 5
  • 24
  • 52