getApplication use in onClick method
<p>I use Application to access my data.
And while buttom be click, I want to use the data which in Application.
I use below code:</p>

<pre><code>b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
MyData md = (MyData)this.getApplication();
md.setName("");
md.setIP("");
}
});
</code></pre>

<p>But the error show:</p>

<pre><code>The method getApplication() is undefined for the type new View.OnClickListener(){}
</code></pre>

<p>How to use getApplication in onClick method?</p>
