title: How can I get reference on TextView from XML layout in AlertDialog?
body: <p>I have a curious problem with getting reference on TextView, SeekBar and other widgets. My AlertDialog looks like this:</p>
  
  <pre><code>public class LineDialog extends AlertDialog {
  private static SeekBar seekBar1, seekBar2, seekBar3;
  private static TextView textView1, textview2, textView3;
  
  protected LineDialog(final Context context, final DrawView drawView) {
      super(context);
  
      LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View dialogLayout = inflater.inflate(R.layout.line_dialog, null);
  
      setView(dialogLayout);
      setTitle("Line properties");
      textView1 = (TextView) findViewById(R.id.textView1); // TODO Code crash here :(
      setButton("Ok", new DialogInterface.OnClickListener() {
  
          @Override
          public void onClick(DialogInterface dialog, int which) {
              seekBar1 = (SeekBar) findViewById(R.id.seek1);
              // some other code...
          }
      });
  }
  </code></pre>
  
  <p>When I want get reference in Line where is </p>
  
  <pre><code>textView1 = (TextView) findViewById(R.id.textView1);
  </code></pre>
  
  <p>Logcat send me an Error</p>
  
  <pre><code>requestFeature() must be called before adding content
  </code></pre>
  
  <p>But when I get reference in onClick() method in LineDiealog(AlertDialog) everything works fine. Unfortunately this is too late, because I need this reference before LineDialog.show() is called...</p>