When I use the customview does not support transparent
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
>
new MaterialDialog.Builder(getActivity())
.backgroundColorRes(R.color.transparent)
.customView(R.layout.dialog_welcom, false)
.show();
You'll need your own dialog theme for this.
This library is designed to simplify dialogs that use Material design.
+1 for dialog transparency
Solution:
MaterialDialog dialog = new MaterialDialog.Builder(getContext()..content(R.string.content).build();
// make dialog itself transparent
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
// remove background dim
dialog.getWindow().setDimAmount(0);
dialog.show();
Hello @ranieripieper i tried as you suggested. It not worked. But if i apply to alert dialog like usual. the background become transparent as well.
Hello @afollestad is there any way to set the header background full of width to a specified color? Please help. Thanks.
Most helpful comment
Solution: