Creating Custom AlertDialog ? What is the root view?
<p>what i am trying to do:</p>

<p>Create a custom Alert Dialog. Buttons just like any Alert Dialog but above are two TextEdit input boxes.  I don't want to create a custom Dialog but a customized Alert Dialog</p>

<p>Here is what I am trying #3:
<a href="http://developer.android.com/guide/topics/ui/dialogs.html" rel="nofollow">http://developer.android.com/guide/topics/ui/dialogs.html</a></p>

<p>It says:</p>

<pre><code>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));
TextView text = (TextView) layout.findViewById(R.id.text);
text.setText("Hello, this is a custom dialog!");


builder = new AlertDialog.Builder(mContext);
builder.setView(layout);
alertDialog = builder.create();
</code></pre>

<p>Documentation says:</p>

<pre><code>View layout = inflater.inflate(R.layout.custom_dialog,
                           (ViewGroup) findViewById(R.id.layout_root));
</code></pre>

<p>where the first parameter is the layout resource ID and the second is the ID of the root View.</p>

<p>Problem is I don't know what the layout root is?  this is a dialog I am going to kick of in an Activity.  Should I use the layout id if the activity?  Is layout_root pulled out of a hat?</p>

<p>Also tried:</p>

<pre><code>  View layout = inflater.inflate(R.layout.my_custom_layout,
                                   (ViewGroup)   findViewById(android.R.id.content).getRootView());
</code></pre>

<p>result null pointer.</p>
