xml布局

<WebView
android:id="@+id/wv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:layerType="software" />

代码里这么写

WebView mWebVew  = (WebView) findViewById(R.id.wb_content); 
// 设置背景色 
mWebView.setBackgroundColor(0); 
// 设置填充透明度
mWebView.getBackground().setAlpha(0)

 

相关文章:

  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-10-15
  • 2021-07-23
相关资源
相似解决方案