Depending on an extra value of the Intent that starts my Activity the
Activity should show up with translucent or solid background.
Therefore, I use the following code in my Activity's onCreate method:
if (getIntent().getBooleanExtra("transparent", false)) {
setTheme(android.R.style.Theme_Translucent);
}
else {
setTheme(android.R.style.Theme_Black);
}
setContentView(R.layout.main);
However, with this code the background of my Activity never becomes
translucent, even if setTheme(android.R.style.Theme_Translucent) is
called. (The same code works well when using themes that only set font
sizes).
I assume that the background for my Activity is already set during
inflation of the Activity and that setContentView only puts my View
(i.e. R.layout.main) on top of this background.
Is there a way to change translucency of my Activity from Java code?
Thanks for your help.
Droidsan.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en