--- android/Side9/src/dk/thoerup/side9/PictureView.java 2010/11/03 05:21:48 1186 +++ android/Side9/src/dk/thoerup/side9/PictureView.java 2010/11/06 06:42:09 1187 @@ -25,7 +25,7 @@ TextView mDescription; TextView mCaption; ImageView mImageView; - ArrayList mImagePaths; + ArrayList mImages; int mIndex; @@ -37,7 +37,7 @@ super.onCreate(savedInstanceState); setContentView(R.layout.pictureview); - mImagePaths = (ArrayList) getIntent().getSerializableExtra("images"); + mImages = (ArrayList) getIntent().getSerializableExtra("images"); mIndex = getIntent().getIntExtra("index", 0); @@ -63,7 +63,7 @@ } private void loadImage() { - ImageEntry currentImage = mImagePaths.get(mIndex); + ImageEntry currentImage = mImages.get(mIndex); mBitmap = BitmapFactory.decodeFile( currentImage.path ); mImageView.setImageBitmap(mBitmap); @@ -77,7 +77,7 @@ String pathParts[] = currentImage.path.split("/"); String fileName = pathParts[ pathParts.length -1]; - String desc = "" + (mIndex +1) + "/" + mImagePaths.size() + " - " + fileName; + String desc = "" + (mIndex +1) + "/" + mImages.size() + " - " + fileName; mDescription.setText(desc); } @@ -98,7 +98,7 @@ switch(item.getItemId()) { case CONTEXT_VIEWIMG: - String uri = "file://" + mImagePaths.get(mIndex); + String uri = "file://" + mImages.get(mIndex).path; Intent i = new Intent(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse(uri), "image/jpeg"); @@ -127,7 +127,7 @@ float diff = firstX - x; if (diff > 150) { - int newIndex = Math.min(mIndex+1, mImagePaths.size() -1); + int newIndex = Math.min(mIndex+1, mImages.size() -1); loadImage(newIndex); firstX = null; return false;