Error with listview in dialog
<p>I have been on this error now for a while. I am trying to open a list view in my dialog but its not opening for me this is my code.</p>

<p><a href="http://img819.imageshack.us/img819/2526/37805964.jpg" rel="nofollow">LOGCAST</a></p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mybasicapp"
    android:versionCode="1"
    android:versionName="1.0" &gt;
    &lt;uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" /&gt;
    &lt;application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" &gt;
        &lt;activity
            android:name=".Slashscreen"
            android:label="@string/title_activity_main" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity
            android:name=".menu"
            android:label="@string/title_activity_main" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MENU" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity
            android:name=".tutorialsone"
            android:label="@string/title_activity_main" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="com.mybasicapp.TUTORIALSONE" /&gt;
                &lt;category android:name="android.intent.category.DEFAULT" /&gt;
</code></pre>

<p>Java code:</p>

<pre><code>   public class menu extends Activity{


Button ImagebuttonOpenDialog;

 String KEY_TEXTPSS = "TEXTPSS";
 static final int CUSTOM_DIALOG_ID = 0;

 ListView dialog_ListView;

 String[] listContent = {
   "January", "February", "March", "April",
   "May", "June", "July", "August", "September",
   "October", "November", "December"};


protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ImagebuttonOpenDialog = (Button)findViewById(R.id.imgbtn1);
    ImagebuttonOpenDialog.setOnClickListener(new Button.OnClickListener(){

        public void onClick(View arg0) {
            showDialog(CUSTOM_DIALOG_ID);
           }});

            }

         @Override
         protected Dialog onCreateDialog(int id) {

          Dialog dialog = null;

          switch(id) {
             case CUSTOM_DIALOG_ID:
              dialog = new Dialog(menu.this);
              dialog.setContentView(R.layout.custom);
              dialog.setTitle("Custom Dialog");

              dialog.setCancelable(true);
              dialog.setCanceledOnTouchOutside(true);

              dialog.setOnCancelListener(new OnCancelListener(){

            public void onCancel(DialogInterface dialog) {
             // TODO Auto-generated method stub
             Toast.makeText(menu.this,
               "OnCancelListener",
               Toast.LENGTH_LONG).show();
            }});

              dialog.setOnDismissListener(new OnDismissListener(){

            public void onDismiss(DialogInterface dialog) {
             // TODO Auto-generated method stub
             Toast.makeText(menu.this,
               "OnDismissListener",
               Toast.LENGTH_LONG).show();
            }});

              //Prepare ListView in dialog
              dialog_ListView = (ListView)dialog.findViewById(R.id.dialoglist);
              ArrayAdapter&lt;String&gt; adapter
               = new ArrayAdapter&lt;String&gt;(this,
                 android.R.layout.simple_list_item_1, listContent);
              dialog_ListView.setAdapter(adapter);
              dialog_ListView.setOnItemClickListener(new OnItemClickListener(){

            public void onItemClick(AdapterView&lt;?&gt; parent, View view,
              int position, long id) {
             // TODO Auto-generated method stub
             Toast.makeText(menu.this,
               parent.getItemAtPosition(position).toString() + " clicked",
               Toast.LENGTH_LONG).show();
             dismissDialog(CUSTOM_DIALOG_ID);
            }});

                 break;
             }

          return dialog;
         }

         @Override
         protected void onPrepareDialog(int id, Dialog dialog, Bundle bundle) {
          // TODO Auto-generated method stub
          super.onPrepareDialog(id, dialog, bundle);

          switch(id) {
             case CUSTOM_DIALOG_ID:
              //
                 break;
             }

         }

        }
</code></pre>

<p>activity_main xml</p>

<pre><code>   &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
     android:layout_height="match_parent"
   android:background="@drawable/carbon" &gt;

&lt;FrameLayout
    android:id="@+id/frameLayout1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="0dp"
    android:background="@drawable/bottombar" &gt;
&lt;/FrameLayout&gt;

&lt;ImageButton
    android:id="@+id/imgbtn1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_marginLeft="42dp"
    android:layout_marginTop="79dp"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imgbtn2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignTop="@+id/imgbtn1"
    android:layout_marginRight="46dp"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imgbtn1"
    android:layout_below="@+id/imgbtn1"
    android:layout_marginTop="36dp"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton4"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imgbtn2"
    android:layout_alignTop="@+id/imageButton3"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton5"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imageButton3"
    android:layout_below="@+id/imageButton3"
    android:layout_marginTop="49dp"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton6"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imageButton4"
    android:layout_alignTop="@+id/imageButton5"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton7"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imageButton5"
    android:layout_below="@+id/imageButton5"
    android:layout_marginTop="42dp"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton8"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imageButton6"
    android:layout_alignTop="@+id/imageButton7"
    android:src="@android:drawable/btn_star" /&gt;

&lt;ImageView
    android:id="@+id/imageView11"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:src="@drawable/kj" /&gt;
</code></pre>

<p></p>

<p>custom.xml</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/customdialog"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="20dp"
android:minWidth="300dp"&gt;
&lt;ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_launcher"/&gt;

&lt;ListView
    android:id="@+id/dialoglist"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" /&gt;

&lt;ImageButton
    android:id="@+id/imageButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/kj" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>ALSO
    I looked over the java code again and found that my code had (button) where in my XML had image button i have change my java code so you can see where i am at the moment..still no luck.I don't know how to copy log cast </p>
