views:

22

answers:

1

I have a problem on going back (clicking the Back button) from sub-activity to main activity: from my main activity I launch a new one (with passing some extras):

Intent i = new Intent(getApplicationContext(), SearchResults.class);
i.putExtra(SearchResults.RESULTS_EXTRA_KEY, searchResult);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);

In the started activity I am getting data from extras and showing, etc. So everything works very well until I click Back button to return back to main activity. Then main activity appears but directly after - grays-out. I can't do anything there anymore... This "grayed-out" style looks something like there should be a dialog displayed, but there is no dialog shown, just the whole activity is pushed down/disabled instead...

One another interesting thing I noticed - that activity is still alive in background, because if I click "Search" button the Quick Search Box appears on top of my activity and if I click Back button then (to cancel it) - it disappears and my activity then becomes fully functional again (gray-out effect simply disappears...)

Tried watching logcat, but it shows nothing useful, no exceptions thrown, just this text always comes up:

W/KeyCharacterMap(  564): No keyboard for id 0
W/KeyCharacterMap(  564): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

What could cause this problem?

A: 

Appears it was bug of my own: just before launching sub-activity my code also triggered showing dialog, but, I guess, it was never shown because sub-activity jumped on top of it... Removing dialog trigger solved the problem.

Laimoncijus