I am not getting addView() method for object of view i.e v in my code below?
<p>I want to add button dynamically in this view i.e. v   </p>

<pre><code>public class MyviewActivity extends Activity {
    /** Called when the activity is first created. */

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        LayoutInflater inflater=this.getLayoutInflater();
        View v=inflater.inflate(R.layout.main, null, true);//view
    }
}
</code></pre>
