1

Im working on a school project and it's my first time on android development. I've searched the whole web but couldn't find any answers to my problem. I have a list of images and i would like to put them on one screen and the user would be able to navigate through these images without changing the whole screen. Also Im trying to put an AutoComplete search box to call any image from the list on the same screen. I tried to use viewFlipper method but did not work out. Is there any other way to do it?

fozkul
  • 117
  • 1
  • 5

1 Answers1

1

You could add an onClick listener to the ImageView. Something like this:

ImageView imgFavorite = (ImageView) findViewById(R.id.favorite_icon);
imgFavorite.setClickable(true);
imgFavorite.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                //Change the image here.
            }
        });

Source: Android ImageView's onClickListener does not work

Community
  • 1
  • 1
Davek804
  • 2,804
  • 4
  • 26
  • 55