How to set Title,Icon for custom dialog in android
<p>I've a class which extends Dialog in android.It shows custom dialog well.But i couldn't set icon &amp; title for that dialog.How could i do that?</p>

<p><strong>My code:</strong></p>

<pre><code>public class helpDialog extends Dialog implements OnClickListener {
    Button okButton;
    String Description;
    TextView text;
    public helpDialog(Context context, String desc) {
        super(context);
        Description=desc;

        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        /** Design the dialog in main.xml file */
        setContentView(R.layout.custom);
        text=(TextView)findViewById(R.id.text);
        text.setText(Description);
        okButton = (Button) findViewById(R.id.submit);
        okButton.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        /** When OK Button is clicked, dismiss the dialog */
        if (v == okButton)
        dismiss();
    }
}
</code></pre>

<p><strong>My custom.xml:</strong></p>

<p>
</p>

<pre><code>&lt;TextView
    android:id="@+id/text"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="20dp"
    android:textColor="#000000"
    android:gravity="center"
    android:text="Help alert for iDispatch"
    android:textSize="18dp" /&gt;

&lt;Button
    android:id="@+id/submit"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="OK"
    android:textColor="#FFFFFF" /&gt;
</code></pre>

<p></p>
