how can i change the size of button in alertdailog in code without using xml ? I'm not using view ..
Thank you
The code :
alertbox3.setNeutralButton("Cancel",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { } });
Why do you want to? The system will construct a standard dialog layout on your behalf that follows conventions that the user expects and is familiar with. In general you should not go out of your way to circumvent this.
you should use a customView for your case to change the button layout. see the following link on how to make your own view for alertDialog.
How to implement a custom AlertDialog View
you may try this code:
and http://developer.android.com/reference/android/widget/Button.html
look at this link aslo . Link1 and LInk2
Try this : https://stackoverflow.com/a/15910202/305135