requestFeature() must be called before adding error
===

This one I do not understand at all, I am trying to display a custom dialog with no title like this

    d.setContentView(R.layout.incident_dialog_layout);
    d.requestWindowFeature(Window.FEATURE_NO_TITLE);

doing this gives me an error 

    07-25 11:56:23.737: E/AndroidRuntime(15680): android.util.AndroidRuntimeException: requestFeature() must be called before adding content
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:215)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.app.Dialog.requestWindowFeature(Dialog.java:1031)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at ecm2.android.MainActivity.createNewDialog(MainActivity.java:1121)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at ecm2.android.MainActivity$ListViews.onListItemClick(MainActivity.java:614)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.widget.AdapterView.performItemClick(AdapterView.java:298)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.widget.AbsListView.performItemClick(AbsListView.java:1086)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:2855)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.widget.AbsListView$1.run(AbsListView.java:3529)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.os.Handler.handleCallback(Handler.java:615)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.os.Handler.dispatchMessage(Handler.java:92)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.os.Looper.loop(Looper.java:137)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at java.lang.reflect.Method.invokeNative(Native Method)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at java.lang.reflect.Method.invoke(Method.java:511)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    07-25 11:56:23.737: E/AndroidRuntime(15680): 	at dalvik.system.NativeStart.main(Native Method)

ok that simple enough just change where the request is. So I then change it to this

    d.requestWindowFeature(Window.FEATURE_NO_TITLE);
    d.setContentView(R.layout.incident_dialog_layout);

dialog works until I start a new activity when I go back and click on the item that creates the dialog I get this error


    07-25 11:51:19.182: E/AndroidRuntime(15376): android.util.AndroidRuntimeException: requestFeature() must be called before adding content
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:215)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.app.Dialog.requestWindowFeature(Dialog.java:1031)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at ecm2.android.MainActivity.createNewDialog(MainActivity.java:1120)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at ecm2.android.MainActivity$ListViews.onListItemClick(MainActivity.java:614)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.widget.AdapterView.performItemClick(AdapterView.java:298)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.widget.AbsListView.performItemClick(AbsListView.java:1086)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:2855)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.widget.AbsListView$1.run(AbsListView.java:3529)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.os.Handler.handleCallback(Handler.java:615)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.os.Handler.dispatchMessage(Handler.java:92)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.os.Looper.loop(Looper.java:137)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at java.lang.reflect.Method.invokeNative(Native Method)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at java.lang.reflect.Method.invoke(Method.java:511)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    07-25 11:51:19.182: E/AndroidRuntime(15376): 	at dalvik.system.NativeStart.main(Native Method)

so what does it want me to do then since I cant have it after I set the content nore can I have it before I sent the content?????