0

Is there a way I could display a textview when each image on a gallery comes to focus? as in when I am scrolling through each and every image to show a a toast or a textview about each image. as I am using each image in the gallery to start an activity. So i need to display something like a textview to notify the user.

is this possible?

UPDATE

myGallery.setOnItemSelectedListener(new OnItemSelectedListener() {

        @Override
        public void onItemSelected(AdapterView<?> parent, View view,
                int id, long position) {
            // TODO Auto-generated method stub
            if(position == 4)
            {                   
                tv.setText("Test");

            }
        }

        @Override
        public void onNothingSelected(AdapterView<?> arg0) {
            // TODO Auto-generated method stub

        }
    });
}

this is what i have done. but hte textview doesnt seem to display? any idea?

Mr.Noob
  • 1,005
  • 3
  • 24
  • 58

0 Answers0