views:

36

answers:

2

I have an Activity A, and there is a button B in the view. If somebody presses B then I want a pop-up which can take some part of screen making the A invisible in that area but rest of A is visible but not active. How can I achieve this?

A: 

The Dialog class is perfect to do that. you can find easy examples here.

Sephy
+2  A: 

If you want to do this using an Activity instead of a Dialog, you can do this by setting the activity's theme to android:theme="@android:style/Theme.Dialog" in the manifest - this will make the activity appear like a dialog (floating on top of whatever was underneath it).

oli
somehow it didn't work for me :(. I tried to set up the theme using setTheme(android.R.style.Theme_Dialog).
bhups
Have you tried setting the theme to the activity in the manifest instead?
oli