Reputation: 3608
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)?
Upvotes: 0
Views: 328
Reputation: 10856
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?
https://stackoverflow.com/a/18224754/942224
https://stackoverflow.com/a/23109450/942224
Upvotes: 2
Reputation: 14810
change
android:colorBackground="#ff0000"
to
android:background="#ff0000"
for your RelativeLayout
Upvotes: 0