Reputation: 199
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?
Upvotes: 3
Views: 966
Reputation: 799
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
Upvotes: 1
Reputation: 1323
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.
Upvotes: 1