I have been trying to make my Alert Dialog with rounded corners but somehow I am not able to. I have tried and I failed. I tried to follow this blog http://blog.stylingandro
I have try the same problem with below one and it works for me. Even for ICS also.
1. First i have put the theme to my AlertDialog.
final Dialog nag = new Dialog(this,android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
nag.requestWindowFeature(Window.FEATURE_NO_TITLE);
nag.setCancelable(true);
nag.setContentView(R.layout.pop_exit);
Button btnNO = (Button)nag.findViewById(R.id.btn_popup_NO);
Button btnYES = (Button)nag.findViewById(R.id.btn_popup_YES);
btnNO.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
nag.cancel();
}
});
btnYES.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
System.exit(0);
}
});
nag.show();
2. Then have implemented the Custom Layout for the Dialog view
pop_exit.xml
3. Now add shape to the Background of parent layout of pop_exit.xml
round.xml // shape file
I just do it. It will works for you also for ICS.
Hope it will help you. If not then let me know.
Enjoy Coding...
:)