not an enclosing class
<p>My menu option button is in a different class than the class that fetches HTTP data. And it's giving me "PhotoGalleryFragment is not an enclosing class" error for </p>

<pre><code>new PhotoGalleryFragment.FetchItemsTask("top-rated").execute();
</code></pre>

<p>PhotoGalleryActivity.java - In here, I am trying to make it so when the "Top Rated Movie" button is pressed, it passes the "top-rated" argument for the FetchItemsTask to run and change the API url and change the returned JSON from "popular" to "top-rated"</p>

<pre><code>    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.topRatedMovies) {
            Toast.makeText(getApplicationContext(), "Top Rated Movie selected", Toast.LENGTH_LONG).show();

            new PhotoGalleryFragment.FetchItemsTask("top-rated").execute();
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
</code></pre>

<p>PhotoGalleryFragment.java - In here, I'm trying to fetch the data. </p>

<pre><code>public  class FetchItemsTask extends AsyncTask&lt;Void,Void,List&lt;MovieItem&gt;&gt; {
    private String mQuery;
    public FetchItemsTask(String query) {
        mQuery = query;
    }

    @Override
    protected List&lt;MovieItem&gt; doInBackground(Void... params) {
        return new MovieFetchr().fetchItems(mQuery);
    }

    @Override
    protected void onPostExecute(List&lt;MovieItem&gt; items) {
        mItems = items;
        for (int i = 0; i &lt; mItems.size(); i++) {
        }
        setupAdapter();
    }

}
</code></pre>

<p>How would I fix something like this? Thanks.</p>