user1835954
user1835954

Reputation: 51

How to Remove White border of Custom Dialog box in Android?

I want to Remove White border of my custom Dialog box.I find a lot on Stack Overflow.But Still not get the Solution.How to Remove this white Border.Please Someone help me for my this issue.Thanks in Advance.

Upvotes: 3

Views: 1930

Answers (1)

NAP-Developer
NAP-Developer

Reputation: 3796

try this use Dialog Instead of AlertDialog.Builder and for remove border line from Dialog:

Dialog dialog = new Dialog(this,android.R.style.Theme_Translucent_NoTitleBar);

and You have to replace the dialog's window content view. I think you can use this in your dialog constructor:

this.getWindow().setContentView(R.layout.your_dialog_view);

Upvotes: 5

Related Questions