3

Is it possible to have your android activity run on top of the current running activity in a transparent mode so you can see through it the activity below it? If possible, can you have different levels of transparency?

zataar
  • 199
  • 1
  • 1
  • 7
  • When you say "current running activity" - even if the second activity is transparent, the first activity will stop "running" when the second starts. – Squonk Feb 11 '12 at 18:40
  • Possible duplicate of [How to create Transparent Activity in Android?](http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android) – Frxstrem Feb 11 '12 at 19:00

2 Answers2

1

In manifest.xml

android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"

In Main.xml

android:background="#20FFFFFF"

#00FFFFFF -  Full Transparency
#10FFFFFF -  90% Transparency
#20FFFFFF -  80% Transparency
#30FFFFFF -  70% Transparency
#40FFFFFF -  60% Transparency
#50FFFFFF -  50% Transparency
#60FFFFFF -  40% Transparency
#70FFFFFF -  30% Transparency
#80FFFFFF -  20% Transparency
#90FFFFFF -  10% Transparency
#99FFFFFF -  01% Transparency

20 is transparency level and FFFFFF is color

JRE.exe
  • 801
  • 1
  • 15
  • 28
1

You can apply a dialog theme or a translucent theme to your activity. More info here: Styles and Themes under the "Apply a theme to an Activity or application" section.

Scott
  • 1,263
  • 1
  • 12
  • 23