title: Android inflating custom view in XML ClassNotFound error
body: <p>I have some problems with my XML code i hope you can help me with.</p>
  
  <p>I have this class in this package:</p>
  
  <pre><code>package com.example.myview
  
  public class CustomDialog extends DialogPreference {
  
      public CustomDialog(Context context, AttributeSet attrs) {
          super(context, attrs);
          // TODO Auto-generated constructor stub
      }
  
      public CustomDialog(Context context, AttributeSet attrs, int defStyle) {
          super(context, attrs, defStyle);
          // TODO Auto-generated constructor stub
      }
  }
  </code></pre>
  
  <p>And then i have this preference xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;com.example.myview.CustomDialog
          android:dialogMessage="Are you sure you wish delete you account"
          android:key="deleteAccountPreference"
          android:negativeButtonText="Cancel"
          android:positiveButtonText="Okay"
          android:summary="@string/preferences_deleteaccount_summary"
          android:title="@string/preferences_deleteaccount_title" /&gt;
  
  &lt;/PreferenceScreen&gt;
  </code></pre>
  
  <p>And when i run the code i get this error:</p>
  
  <pre><code>03-16 17:03:18.032: E/AndroidRuntime(20224): android.view.InflateException: Binary XML file line #4: Error inflating class com.example.myview.CustomDialog
  ...
  03-16 17:03:18.032: E/AndroidRuntime(20224): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.myview.CustomDialog" on path: .
  </code></pre>
  
  <p><strong>To summarize my problem, i wanna know how to change the path the xml file is looking at, or figure out why it can't inflate my custom view.</strong></p>
  
  <p>Thanks in advance :)</p>