Hi, I am going crazy to show a few images from Media.INTERNAL_CONTENT_URI or Media.EXTERNAL_CONTENT_URI. I need to show a few images from Internal or External memory, using an Activity similar to ImageSwitcher1.java from ApiDemo.
I know if the image is on Internal or External memory and I know also the image name. I modified the getView function of ImageSwitcher1.java so: public View getView(int position, View convertView, ViewGroup parent) { ImageView i = new ImageView(mContext); try{ cur.moveToPosition(position); Uri ur=null; if (cur.getInt(7)==1) ur = Media.INTERNAL_CONTENT_URI; else ur = Media.EXTERNAL_CONTENT_URI; Uri uri=Uri.withAppendedPath(ur, cur.getString(5)); i.setImageURI(uri); i.setAdjustViewBounds(true); i.setLayoutParams(new Gallery.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); i.setBackgroundResource(R.drawable.picture_frame); } catch(Exception ex){ } return i; } The problem is that is showed correctly only the first image, then crash. Where can I find a sample that show images from internal and external content ? help please. thanks Stefano --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---