title: Android icon error
body: <p>I copied this code from a tutorial site because I am trying to learn it. But I am getting an error at</p>
  
  <pre><code>package com.android.test;
  import android.R;
  import android.app.Activity;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.graphics.Matrix;
  import android.graphics.drawable.BitmapDrawable;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.ImageView;
  import android.widget.SeekBar;
  import android.widget.Spinner;
  import android.view.ViewGroup.LayoutParams;
  import android.widget.LinearLayout;
  import android.widget.ImageView.ScaleType;
  public class Rotate extends Activity {
       @Override
       public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           LinearLayout linearLayout = new LinearLayout(this);
  
     Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
  </code></pre>
  
  <p><strong>On this last line, I get an error where ".icon" is written. It says, "icon cannot be resolved or is not a field."</strong></p>
  
  <blockquote>
    <p>int width = bitmap.getWidth();
           int height = bitmap.getHeight();</p>
  
  <pre><code>   Matrix matrix = new Matrix();
     matrix.postRotate(90);
  
     Bitmap rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0,
  </code></pre>
    
    <p>width,
             height, matrix, true);
           BitmapDrawable bmd = new BitmapDrawable(rotatedBitmap);</p>
  
  <pre><code>   ImageView imageView = new ImageView(this);
     imageView.setImageDrawable(bmd);
     imageView.setScaleType(ScaleType.CENTER);
  
     linearLayout.addView(imageView, new LinearLayout.LayoutParams(
       LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
     setContentView(linearLayout);
       }
   }
  </code></pre>
  </blockquote>