android:background="" is giving error -


I do not have to give any background to the activity. When I leave this property empty, I get an error.

And I have tried to use @null as a code, but it shows a black background.

Can someone guide me, how can I make it transparent?

You should use styles such as res / values ​​/ styles.xml , there is a theme definition:

  & lt; Style name = "myself" & gt; & Lt; Item name = "Android: Background" & gt; @Android: Color / Transparent & lt; / Item & gt; & Lt; Item name = "android: windowIs floating" & gt; True & lt; / Item & gt; & Lt; / Style & gt;  

As far as I know, you have to set the window floating, otherwise the runtime will not bring a translucent backdrop (possibly due to the performance reasons ... but I did this between the platform reload Seen behavior change, you can try without first).

Then set the topic of your activity in the manifest:

  & lt; Activity Android: name = "..." Android: Theme = "@ Style / Myself" ... />  

This should work.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -