title: Android - "The following classes could not be found: - (Change to com.example.random.ScrollViewExt, Fix Build Path, Edit XML, Create Class)"
body: <p>I have extended the ScrollView class to create a class so that  can listen for the onScroll event. But it says that the class which i have extended cannot be found. I have tried the options given and none of them seem to work. Here is the code for the XML</p>
  
  <pre><code>   &lt;com.example.random.ScrollViewExt
     android:id="@+id/scrollview1"
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"&gt;
  
     &lt;LinearLayout android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
     android:paddingBottom="@dimen/activity_vertical_margin"
     android:paddingLeft="@dimen/activity_horizontal_margin"
     android:paddingRight="@dimen/activity_horizontal_margin"
     android:paddingTop="@dimen/activity_vertical_margin" &gt;
  
     &lt;TextView
      android:id="@+id/text1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/hello_world" /&gt;
  
      &lt;/LinearLayout&gt;
      &lt;/com.example.random.ScrollViewExt&gt;
  </code></pre>
  
  <p>And here is the code for the custom class.</p>
  
  <pre><code>    package com.example.random;
  
      import android.widget.ScrollView;
      import android.content.Context;
       import android.util.AttributeSet;
  
  
      public class ScrollViewExt extends ScrollView {
          private ScrollViewListener scrollViewListener = null;
          public ScrollViewExt(Context context) {
                super(context);
           }
  
           public ScrollViewExt(Context context, AttributeSet attrs, int defStyle) {
                super(context, attrs, defStyle);
          }
  
          public ScrollViewExt(Context context, AttributeSet attrs) {
              super(context, attrs);
          } 
  
           public void setScrollViewListener(ScrollViewListener scrollViewListener) {
               this.scrollViewListener = scrollViewListener;
          } 
  
          @Override
           protected void onScrollChanged(int l, int t, int oldl, int oldt) {
              super.onScrollChanged(l, t, oldl, oldt);
               if (scrollViewListener != null) {
                   scrollViewListener.onScrollChanged(this, l, t, oldl, oldt);
                }
            }
       }
  </code></pre>
  
  <p>Any idea on what I could do?</p>