title: Cannot make a static reference to the non-static method getString(int) from the type Context
body: <p>With reference to the lunchlist example in "Android PRogramming Tutorials" by Mark L.Murphy,
  In the below static class code (page 84) :</p>
  
  <pre><code>static class RestaurantHolder {
      private TextView name=null;
      private TextView address=null;
      private ImageView icon=null;
      RestaurantHolder(View row) {
          name=(TextView)row.findViewById(R.id.title);
          address=(TextView)row.findViewById(R.id.address);
          icon=(ImageView)row.findViewById(R.id.icon);
      }
     void populateFrom(Restaurant r) {
          name.setText(r.getName());
          address.setText(r.getAddress());
          if (r.getType().equals("sit_down")) {
            icon.setImageResource(R.drawable.ball_red);
          }
          else if (r.getType().equals("take_out")) {
            icon.setImageResource(R.drawable.ball_yellow);
          }
          else {
            icon.setImageResource(R.drawable.ball_green);
          }
        }
      }
  </code></pre>
  
  <p>I'm trying to replace </p>
  
  <pre><code>r.getType().equals("take_out")
  </code></pre>
  
  <p>with</p>
  
  <pre><code>r.getType().equals(getString(R.string.TakeAway))
  </code></pre>
  
  <p>but I'm getting the error "Cannot make a static reference to the non-static method getString(int) from the type Context"</p>
  
  <p>Sorry it's probably a silly question but i really need help.</p>