View view = (View) LayoutInflater.from(ctx).inflate(R.layout.preference_report_bug_layout, null); EditText editText = view.findViewById(R.id.bug_description_edittext); builder.setView(view);