title: findViewById in non activity class
body: <p>I know there are some topics in StackOverFlow asking this But all of them are answering in special cases No one answers this question generally.<br>
  Can anyone say how to use findViewById in non activity classes?<br>
  For Example in my case I want to define a webview:</p>
  
  <pre><code>WebView view=(WebView)findViewById(R.id.webview);
  </code></pre>
  
  <p>But I can't and I really don't understand why android makes everything complicated.Why you can use everything in main activity but you can't use many of them in non activity class :(<br>
  <strong>UPDATE</strong><br>
  I can't extend my class as activity cause it extends sth else.<br>
  <strong>UPDATE</strong><br>
  This is the class:</p>
  
  <pre><code>        class DownloadTask extends AsyncTask&lt;String, Void, Void&gt;  {
      protected Void doInBackground(String... sUrl) {
          ...
                          WebView view=(WebView)findViewById(R.id.webview);
                          final Snackbar snackbar = Snackbar.make(view,"message",Snackbar.LENGTH_LONG);
          ...
      }
  }
  </code></pre>
  
  <p>I'm gonna use the webview in a Snackbar.</p>