Not Applicable for the Arguments
<p>I'm trying to show a progress message when a preference is selected:</p>

<pre><code>        Preference prefLocation = (Preference) findPreference("location");
    prefLocation.setOnPreferenceClickListener(new OnPreferenceClickListener() {

        public boolean onPreferenceClick(Preference preference) {
            ProgressDialog pDialog = ProgressDialog.show(this, "Location" , "Finding location...", true);
            return true;
        }
    });
</code></pre>

<p>However I'm getting an error in Eclipse: </p>

<pre><code>The method show(Context, CharSequence, CharSequence, boolean) in the type ProgressDialog is not applicable for the arguments (new Preference.OnPreferenceClickListener(){}, String, String, boolean)
</code></pre>

<p>However, when I execute the line before the setOnPreferenceClickListener, it compiles fine!</p>

<p>I'm probably revealing my severe inexperience in Java, but would appreate a clue!</p>
