title: Show Android Webview with transparent background
body: <p>i would like to load an animated gif. I found out that i could load it in a WebView. Now i have created a class extending from WebView. It looks like this:</p>
  
  <pre><code>public class GifWebView extends WebView {
  
  public GifWebView(Context context, String path) {
    super(context);
  
    loadUrl(path);
  
    setBackgroundColor(Color.TRANSPARENT);
    setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);
  
    }
  }
  </code></pre>
  
  <p>Unfortunately the background is black. Do you know a solution? I tried it on Android 4.1.2. I have already searched on stackoverflow but I did not find a way to solve the problem.</p>