i'd like to create a custom dialog using this code snippet from the SDK - verbatim.
it doesn't work. i think there's a problem with the hi-lighted <<<<<<<<<<<< line. won't findViewById() try to find the element in the current window as opposed to the dialog that's being inflated. AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.custom_dialog, (ViewGroup) findViewById(R.id.layout_root)); // <<<<<<<<<< [snip] builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); -- 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