Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android activity transparency

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?

like image 899
zataar Avatar asked Apr 08 '26 15:04

zataar


2 Answers

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.

like image 107
Scott Avatar answered Apr 11 '26 04:04

Scott


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

like image 23
JRE.exe Avatar answered Apr 11 '26 04:04

JRE.exe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!