title: Linkify an address
body: <p>I am having a problem with the code below</p>
  
  <pre><code>setContentView(R.layout.activity_main);
      TextView myLocation = (TextView)findViewById(R.id.txtAddress);
      myLocation.setText("123 Main St New York, NY");
      Linkify.addLinks(myLocation , Linkify.MAP_ADDRESSES);
      mainLayout.addView(myLocation);    
  </code></pre>
  
  <p>My problem is with the part that says</p>
  
  <pre><code>mainLayout.addView(myLocation);
  </code></pre>
  
  <p>it is complaining that "mainLayout cannot be resolved" that is the exact error that it is saying what i have put into the quotes.</p>
  
  <p>does anyone have a suggestion on how to fix this?</p>