I am creating an Android widget. My widget has a View that when clicked opens an Activity that’s look like an Dialog.
I have updated AndroidManifest.xml to style this activity like a dialog.
<activity
android:name=".Widget.Widget_OeffneDialog"
android:theme="@android:style/Theme.Dialog">
</activity>
That runs fantastic.
Now I open the app from this Widget and click on the home button (the app is now in the background) and then click on the wdget the Dialog shows – but the rest of the app shows behind the dialog.
Like here:

I do not want to see the previous activity below the dialog activity – how do I do this?
When you are launching the Widget_OeffneDialog activity from the launcher, Android is simply resuming the instance that is currently in the background – along with whatever backstack and history it contains.
Try forcing your widget to launch a new instance of the activity instead.