title: Method Not Found On Java Static Class
body: <p>I am using the Android Universal Image Loader.</p>
  
  <p>In all the sample code, the views are created via XML. I need to create my views via Java (no inflating). I am trying to cast the View view as a PhotoDisplayView object instead and call .test(). But .test() cannot be found.</p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent)
          {
              final ViewHolder holder;
              View view = convertView;
              if (view == null) {
                  view = new PhotoDisplayView(parent.getContext());
                  holder = new ViewHolder();
                  assert view != null;
                  holder.imageView = (PhotoDisplayView)view.test();//test() CANNOT BE FOUND
                  view.setTag(holder);
              } else {
                  holder = (ViewHolder) view.getTag();
              }
  }
  </code></pre>
  
  <p>Here is my static class</p>
  
  <pre><code>static class PhotoDisplayView extends FrameLayout
      {
          public ImageView imageView;
          public ProgressBar progressBar;
  
          public PhotoDisplayView(Context context)
          {
              super(context);
              imageView = new ImageView(context);
              progressBar = new ProgressBar(context);
          }
  
          public void test()
          {
              Log.d("TEST","TEST");
          }
      }
  </code></pre>
  
  <p>I don't understand why casting it as a PhotoDisplayView object wont give me access to its functions? Im taking a view object and casting it as a subclassed version of it. Why can't it find the method?</p>
  
  <p>Note: If I declare the object as a PhotoDisplayView instead of a View I do have access to the method</p>