title: ImageAdapter No Enclosing Error
body: <p>I'm currently working on an application to allow the user to select an ImageView from a GridView gallery and display it on its own and in all its beauty. </p>
  
  <p>The GridView is on a fragment and then will pass the data to an activity to show the selected image. My entire project is working up until initialising the ImageAdapter. I receive an error stating that there is no enclosing instance of type GalleryView. I have tried and tried and then tried some more, was reluctant to post the question but I'm still no closer to resolving the issue. </p>
  
  <pre><code>public class SingleImageGallery extends Activity {
  
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.single_image_view);
  
      Intent i = getIntent();
      int position = i.getExtras().getInt("id");
      ImageAdapter imageAdapter = new ImageAdapter(this);
  
      ImageView imageView = (ImageView) findViewById(R.id.SingleView);
      imageView.setImageResource(imageAdapter.pics[position]);
    }
  }
  </code></pre>