title: reading images from memory card
body: <p>This code reads images from DRAWABLE folder of android :</p>
  
  <pre><code>import android.widget.ImageView;
  import android.widget.ZoomControls;
  import android.annotation.SuppressLint;
  import android.app.Activity;
  import android.graphics.Matrix;
  import android.graphics.PointF;
  import android.os.Bundle;
  import android.util.FloatMath;
  import android.view.MotionEvent;
  import android.view.View;
  import android.widget.ImageView;
  
  public class info extends Activity {
      Bitmap bmp = BitmapFactory.decodeFile("sdcard/THQ/Para01/page1.jpg");
      ImageView img;
      Matrix matrix = new Matrix();
      Matrix savedMatrix = new Matrix();
      PointF startPoint = new PointF();
      PointF midPoint = new PointF();
      float oldDist = 1f;
      static final int NONE = 0;
      static final int DRAG = 1;
      static final int ZOOM = 2;
      int mode = NONE;
  
      // img.setImageBitmap(bmp);
      private int imCurrentPhotoIndex = 0;
  
      private int[] imPhotoIds = new int[] { R.drawable.info, R.drawable.info1,
              R.drawable.info2, R.drawable.info3, R.drawable.info4,
              R.drawable.info5, R.drawable.info6 };
  
      Button ibd1, ibd2;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          // fullscreen starts
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
          // fullscreen code ends
  //img.setb
          setContentView(R.layout.info);
          showPhoto(imCurrentPhotoIndex);
  
          ibd1 = (Button) findViewById(R.id.next);
          ibd2 = (Button) findViewById(R.id.prev);
  
  
  
          ibd1.setOnClickListener(new View.OnClickListener() {
  
              public void onClick(View v) {
                  imCurrentPhotoIndex++;
  
                  if (imCurrentPhotoIndex &lt; 7)
                      showPhoto(imCurrentPhotoIndex);
                  else
                      imCurrentPhotoIndex--;
  
                  // ///
  
              }
          });
  
          ibd2.setOnClickListener(new View.OnClickListener() {
  
              public void onClick(View v) {
                  imCurrentPhotoIndex--;
  
                  if (imCurrentPhotoIndex &gt; -1)
                      showPhoto(imCurrentPhotoIndex);
                  else
                      imCurrentPhotoIndex++;
  
                  // ///
  
              }
          });
  
      }
  
      protected void onSaveInstanceState(Bundle outState) {
          outState.putInt("photo_index", imCurrentPhotoIndex);
          super.onSaveInstanceState(outState);
      }
  
      @Override
      protected void onRestoreInstanceState(Bundle savedInstanceState) {
          imCurrentPhotoIndex = savedInstanceState.getInt("photo_index");
          showPhoto(imCurrentPhotoIndex);
          super.onRestoreInstanceState(savedInstanceState);
      }
  
      private void showPhoto(int photoIndex) {
          ImageView imageView = (ImageView) findViewById(R.id.image_view);
          // imageView.setImageResource(imPhotoIds[photoIndex]);
          imageView.setImageResource(imPhotoIds[photoIndex]);
  
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          // getMenuInflater().inflate(R.menu.starting_point, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p>Could you help me please to make it read and display image from folder "<code>sdcard\THQ\something.png</code>" .</p>