I am using a listview with a custom adapter in a layout. Now i am trying to bring that layout containing list to my alertdialog. I tried to bring simple layouts not containing list to alert dialog with this code and its is working good. But i am unable to bring the list containing layout into alertdialog.
AlertDialog.Builder dialog = new AlertDialog.Builder( this );
dialog.setView( getLayoutInflater().inflate( R.layout.smill, null ) );
dialog.setIcon(R.drawable.androidsmile);
dialog.setInverseBackgroundForced(true);
dialog.setTitle( "Select smiley");
dialog.setPositiveButton( "Cancel", null );
dialog.show();