How to open a Dialog without darkening the Android background screen [closed]

1

I have an Activity, and in this I call a Dialog, but when I open this 'popup' the Background Activity screen that called it darkens, but I wish it did not happen. Can you do that?

    
asked by anonymous 30.10.2015 / 13:38

1 answer

1

You can set a specific theme for the activity, so it will not darken when opening any Dialog:

<resources>
  <style name="Dialog" parent="AppTheme">
    <item name="android:backgroundDimEnabled">false</item>
  </style>
</resources>

And in your manifest, you move this theme to the activity you do not want to darken when opening the dialog:

<activity android:name=".MinhaActivity" android:theme="@style/Dialog">
    
30.10.2015 / 14:55