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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -