android - How to change AlertDialog size in the program? -
i have alertdialog , i'd adjust size fit text length , height. follows:
alertdialog dialog = new alertdialog.builder(thisactivity); dialog.setmessage(curitem.gettitle()); dialog.show(); textview textview = (textview) dialog.findviewbyid(android.r.id.message); textview.settextsize(7); textview.setgravity(1); i can change text size , font. can't adjust dialog's size. how can make dialog size fit text length , height?
you try
dialog.getwindow().setlayout(layoutparams.wrap_content, layoutparams.wrap_content); or other integer value want.
Comments
Post a Comment