请问android中如何设置透明,使得能背景没有,就是能够直接看到图片,让字相当于悬浮在背景之上的效果,或者是能通过css之类的来实现么?
[quote]To achieve transparency both the view's background drawable, which is inherited, and the WebView's backgroundColor variable must be assigned values of 0. The first may be accomplished through either a call to setBackgroundDrawable(), or the android:background tag in the xml. The second is set by calling setBackgroundColor().[/quote]
[quote]As always you tend to figure these things out as soon as you ask the question. For the benefit of others, the layout that I'm using, LinearLayout, can take a background parameter that can be a colour or a resource.
So in my views .xml file I simply added a
android:background="@+drawable/backgroundmain"
and use
web.setBackgroundColor(0);
To make the webview transparent to see the background image behind.[/quote]