Search code examples
androidandroid-activityandroid-gallery

how to dim the current activity?


Is there a way to dim the Current activity when calling the new activity? as in the new activity should be above the previous activity. The new activity that i have is a gallery. It comes when the finish button in the previous activity is clicked. So i want this gallery to be placed above the previous activity


Solution

  • Try setting the background of your gallery Activity to a transparent color. You might need to create a custom theme and more details can be found here: http://developer.android.com/guide/topics/ui/themes.html

    This is probably going to be completely transparent, so not quite what you want. But, for example:

    <activity android:theme="@android:style/Theme.Translucent">