title: How to add a layout to a View before the View is used in the activity with setContentView(View)?
body: <p>How to add a layout to a View before the View is used in the activity with setContentView(View)?
  I am trying to add LinearLayout to a Layout View programatticaly how do I accomplish this?</p>
  
  <pre><code>public class MyActivity extends Activity {
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          Context context = getApplicationContext();
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
          LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
          LinearLayout bar = new LinearLayout(context);
  
          setContentView(R.layout.activity_my);
      }
  }
  </code></pre>