setAdapter() causes NullPointerException in (Sherlock)DialogFragment

view story

http://stackoverflow.com – I'm trying to set an ArrayAdapter for a ListView inside the onCreateDialog() method of a (Sherlock)DialogFragment. I'm getting just NullPointerException but I think the path to the layout and string-array is correct, because when I set the Adapter directly for the AlertDialog.Builder the List is shown. public class InputMyDialogFragment extends SherlockDialogFragment implements OnClickListener { private ListView listView; private ArrayAdapter<String> adapter; private String[] myItemArray; @Override public Dialog onCreateDialog(Bundle savedInstanceState) { (HowTos)