I have made the custom dialog for my application.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myButton = (Button) findViewById(R.id.ClkBtn);
myButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
myDialog = new Dialog(ExPopup.this);
myDialog.setContentView(R.layout.mydialog);
myDialog.setTitle("My Dialog");
myDialog.setCancelable(true);
Button button = (Button) myDialog.findViewById(R.id.Btn1);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
myDialog.dismiss();
}
});
myDialog.show();
}
});
But in this I got the border with custom dialogbox. I dont want that border. Then what should i have to remove border from that custom dialog ??
You have to replace the dialog’s window content view. I think you can use this in your dialog constructor:
Where “your_dialog_view” should be your new window view for the custom dialog.. 😀