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
  • 1,035
  • 10
  • 18
Abdennacer Lachiheb
  • 4,388
  • 7
  • 30
  • 61