2

I am sucess to display images from sdcard in grid view using PhotoSwipe. Now I want to click on any image from the grid view and that image is shown in next page with full display. But I have problem that I have no fix image so that I cant use direct image name in "href" and "src" tag, it is dynamic. So how I do this using PhotoSwipe, its urgent. In previous post I find out the solution as Click here to view image, but I have no particular image, my image is dynamic came from sdcard.

Thanks in advance....

1 Answers1

0

IF you find the position of Image it is easy to go ahead.

After getting the position you will redirect it to the particular activity.

...you can find your position from the below code.

  GridView gridview = (GridView) 
findViewById(R.id.gridview); 
            gridview.setAdapter(new ImageAdapter(this)); 
            gridview.setOnItemClickListener(new OnItemClickListener() 
{ 
                public void onItemClick(AdapterView<?> parent, View v, 
int position, long id) { 
                    Toast.makeText(HelloGridView.this, "" + position, 
Toast.LENGTH_SHORT).show(); 
                } 
            }); 
        } 
    } 

I used toast for only display the position ... once you get your position just move it with intent to your next activity.

NovusMobile
  • 1,813
  • 2
  • 21
  • 48
  • I am using javascript not android code, I am sucess to find the location of all photos in thumbnails(grid), now shown in next page in full view. – user1166500 Feb 02 '12 at 07:43
  • Actually, I have capture image from mobile phone and store images in my own folder of sdcard, now there is link in my html page to show that images,I succesfully show images in thumbnails,now I want to click on particular image and display full view in next page. I take picture using Phonegap API and display image using PhotoSwipe of Jquery. – user1166500 Feb 02 '12 at 08:39