title: Android: How can I pass parameters to AsyncTask's onPreExecute()?
body: <p>I use an <code>AsyncTask</code> for loading operations that I implemented as an inner class. </p>
  
  <p>In <code>onPreExecute()</code> I show a loading dialog which I then hide again in <code>onPostExecute()</code>. But for some of the loading operations I know in advance that they will finish very quickly so I don't want to display the loading dialog. </p>
  
  <p>I wanted to indicate this by a boolean parameter that I could pass to <code>onPreExecute()</code> but apparently for some reason <code>onPreExecute()</code> doesn't take any parameters.</p>
  
  <p>The obvious workaround would probably be to create a member field in my AsyncTask or in the outer class which I would have to set before every loading operation but that does not seem very elegant. Is there a better way to do this?</p>