Adding LinearLayout to a LinearLayout in android
<p>I have found lots of question here regarding adding <code>LinearLayout</code> dynamically. I haven't found any reference or any tutorial or books suggested where I could know complete details of the and steps to add a <code>LinearLayout</code> dynamically.</p>

<pre><code>    LinearLayout parentLayout = (LinearLayout) findViewById(R.id.master);
    LinearLayout Linear1 = new LinearLayout(this);
    Linear1.setOrientation(LinearLayout.HORIZONTAL);
    Linear1.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
            LayoutParams.WRAP_CONTENT));
    parentLayout.addView(Linear1);
</code></pre>

<p>This is the code snippet I am using for adding a Layout. The problem is that the min api required is 11. I have designed my app targeting api 10. So its very bad news for me. Please tell me is there any other way to add <code>LinearLayout</code> dynamically for the lower apis?</p>

<p><strong>Error Message:</strong>  Call requires API level 11 (current min is 8): new android.app.ActionBar.LayoutParams</p>
