Yes, I know. It sounds weird, but I can't think of any other way to explain it.
I start Activity MainActivity. It calls startActivity(B). B calls startActivity(C). In C, I have a button with an onClickListener that looks like this:
startActivity(new Intent(getApplicationContext(), MainActivity.class));
When I hit the button, I get to activity B, not Main!
LogCat shows this:
Activitymanager Starting activity: ... MainActivity
ActivityManager Starting activity: ... B
So, it looks like my MainActivity (A) gets started and then something-or-someone-mysterious starts activity B immediately.
Ideas? I'm at a loss...
Thanks!
Llappall
EDIT:
A couple of notes to clarify:
1) I'm not overriding any lifecycle methods in MainActivity. I just have onCreate.
2) MainActivity's layout shows an image that covers the whole screen. I capture where the user touches in the image's OnTouchListener and, depending on that, I call different intents. The code looks like this:
if (touchX > 0 && touchX < 0.5 && touchY > 0.25
&& touchY < 0.46) {
Intent i = new Intent(context, ShowListsActivity.class);
i.putExtra("option", 0);
startActivity(i);
} else if // if the location of the click is different I call another .class