@Viktor - I am calling alert dialog on clicking a button , I am setting contentView in On create , on click of a button calling the alertDialog code.
On Dec 10, 10:50 pm, viktor <victor.scherb...@gmail.com> wrote: > Did you set layout after setting content view? > > It works for me, but I extend the Dialog. > > On 10 çÒÄ, 14:39, sat <sathvikm...@gmail.com> wrote: > > > > > > > > > AlertDialog.Builder builder = new AlertDialog.Builder(this); > > š š š š š š builder.setTitle("Title"); > > š š š š š š builder.setItems(items, new > > DialogInterface.OnClickListener() { > > š š š š š š š š public void onClick(DialogInterface dialog, int item) > > { > > š š š š š š š š š š Toast.makeText(getApplicationContext(), > > items[item], Toast.LENGTH_SHORT).show(); > > š š š š š š š š } > > š š š š š š }); > > š š š š š š AlertDialog alert = builder.create(); > > > I am using above code to show alert dialog , By default it fills the > > screen in width and wrap_content in height. > > How tocontrolthe width and height of default alert dialog ? > > I tried , alert.getWindow().setLayout(100,100); // It dint work. > > How to get the layout params on the alert window and set manually the > > width and height ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en