Apply background color in parent view of webview
. and make webview background transperent like this way.
mWebView.setBackgroundColor(0x00000000);
EDIT:
How to make custom Dialog?
Question
I'm using the following layout for dialog window:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:colorBackground="#ff0000">
<WebView
android:id="@+id/webViewNote1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:colorBackground="#ff0000" />
As you can see I tried to change the color in the RelativeLayout and in the WebView but nothing happen and I still have a white background.
Any idea how to change background in regular dialog (not alert dialog)?
Solution
Apply background color in parent view of webview
. and make webview background transperent like this way.
mWebView.setBackgroundColor(0x00000000);
EDIT:
How to make custom Dialog?
OTHER TIPS
change
android:colorBackground="#ff0000"
to
android:background="#ff0000"
for your RelativeLayout