I've got an activity that occupies a portion of the screen (it has a style of style/android:Theme.Holo.Dialog.NoActionBar
) and thus the other activity in the stack is visible beneath it.
When a button on the activity is clicked it displays a system dialog and the activity should disappear from view but the activity must still be present as its passed as a callback to the system dialog.
I tried setting the root view's (a RelativeLayout) visibility to INVISIBLE but that just turns the activity black and is visible beneath the system dialog. Setting the view's alpha to 0.0 also has the same effect.
Setting the view's visibility to GONE has the desired effect but there is a weird sort of animation type thing where the activity goes black and shrinks down on size to a tiny view just before the system dialog appears. This happens quite quickly but looks weird. Its something the OS must be doing as I'm certainly not doing anything to create this effect.
Is there another way I hide the activity that gets the desired result and doesn't a weird side effect artifact animation?