title: How to add a view shared by intent in a layout
body: <p>I shared a custome view with 'intent'. I got it in the second activity with "getSerializableExtra".</p>
  
  <p>I can't add this view in my layout. I think it's a problem of "context" :</p>
  
  <pre><code>Intent intent = getIntent();  
  
  int nbTextView = intent.getIntExtra(MainActivity.EXTRA_NUMBER, 0);   
  
  MyTextView[] text= (MyTextView[]) intent.getSerializableExtra(MainActivity.EXTRA_TEXT);
  
  
  this.myLayout= (LinearLayout) findViewById(R.id.layoutProp2);  
  
  myLayout.addView(text[0]); // I think this part is a problem
  </code></pre>
  
  <p>Thank you all for your help.</p>