Click Image Preview - Android

I am a beginner Android developer. I used the code provided on the Google Android developer site and developed a gallery widget .

Now I want to configure it. When the image is clicked at the moment, it shows the index, instead I want to show a preview in the space available under the gallery.

According to my understanding, I need to change the code somewhere here:

g.setOnItemClickListener(new OnItemClickListener() {
    public void onItemClick(AdapterView parent, 
            View v, int position, long id) {

        Toast.makeText(HelloGallery.this, "" + position,
            Toast.LENGTH_SHORT).show();

Instead of a toast, I want to use some function that will lead to a view. Can someone help me.

Thanks in advance.

+3
source share
1 answer

checkout this and see an example gallery and ImageView Views

+2

Source: https://habr.com/ru/post/1786606/


All Articles