title: Cannot resolve method findViewByID
body: <p>I'm very new to android development, so I'm sorry if I can't understand what exactly is going on here.</p>
  
  <p>I've created a shape, as can be seen below. This is contained within shape.xml within the drawable folder:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;shape
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle" &gt;
  
  &lt;solid
      android:color="@color/lboro_pink"/&gt;
  
  &lt;stroke
      android:width="50dp"
      android:color="@color/lboro_blue"/&gt;
  
  &lt;padding android:left="1dp"
      android:top="1dp"
      android:right="1dp"
      android:bottom="1dp"/&gt;
  
  &lt;corners
      android:bottomRightRadius="7dp"
      android:bottomLeftRadius="7dp"
      android:topLeftRadius="7dp"
      android:topRightRadius="7dp"/&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>Now within my activity_main.xml I have this TextView:</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/grid_1"
      android:background="@drawable/shape"
      android:layout_height="wrap_content"
      android:layout_width="wrap_content"
      android:layout_weight="1"
      android:text="@string/event_1"/&gt;
  </code></pre>
  
  <p>Now this is my MainActivity.java:</p>
  
  <pre><code>import android.app.Activity;
  import android.graphics.drawable.Drawable;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.MenuInflater;
  import android.widget.ImageView;
  import android.widget.TextView;
  import android.content.res.Resources;
  
  
  public class MainActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      ImageView image = (ImageView) findViewById(R.id.test_image);
  
      Resources res = getResources();
      Drawable shape = res. getDrawable(R.drawable.shape);
  
      TextView tv = (TextView)findViewByID(R.id.grid_1);
      tv.setBackground(shape);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.main_activity_actions, menu);
      return super.onCreateOptionsMenu(menu);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  }
  </code></pre>
  
  <p>I've been trying to follow <a href="http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape" rel="nofollow">this</a> doc in order to do this, and by using their code I just get the error that it "Cannot resolve method findViewByID". I've searched for answers, but just can't understand what they're trying to explain, when the official android doc says to do this.</p>
  
  <p>All I'm trying to do with this is apply the shape I've created as the background to a TextView.</p>
  
  <p>Any help is greatly appreciated. Thank you :)</p>