android : activity view not getting set when launched with FLAG_ACTIVITY_SINGLE_TOP
===

I have a "main" activity . In the on create function i am calling setcontent view. Now while this main activity is on top i get a notification. In the notification i am setting "main " as the intent to be invoked on click. Here i am setting FLAG_ACTIVITY_SINGLE_TOP flag .

On click of notification i can see that onnewintent of main is getting called. from onnewintent i am launching another activity "showData".What i can see is that onclick of notification, the orientation of the screen changes but i am still in the notification drop down menu . (Neither main or showdata screen is visible) ).The orientation changes because the showdata has orientation landscape as fixed. Now if i press back, i can see the showdata screen.

This issue happens when mainactivity is on top while clicking the notification.
If in any other activity, showData is getting displayed correctly

Thanks a lot for your answer and time