Abrir la siguiente imagen cuando se presiona el botón en Android

Hi i am very new to android so i dont know much about it

mi pregunta es

How do i store an image and related sound, text somewhere and get it back to display and how to implement the next button when its pushed the next image with next sound and text is displayed.


preguntado el 10 de marzo de 12 a las 01:03

I don't quite understand what your question is. while for How to i store an image and related sound, text somewhere, I think you may want to take a look at View.setTag(), that's how you store things with a view, and then you can use View.getTag() to get things back. -

sorry that was typo,let me explain clearly I have some images in array , i put them in the GridView , now when i Click any image it starts another activity where the image clicked is shown , so now i want to implement a "Next" button so that when i click the next button the next image of the gridView is shown and so on, further , in my layout i have ImageView,TextView ( image name ), Next button and one play button , so dont know how do i make relation between them and change all of them when next button is pushed ! thank you fro replying. -

1 Respuestas

Keep images (drawables) ids in an array e.g Array array = new Array(){R.id.one, R.id.two};

Keep your sound file in res/raw folder and put sound id as same above in an array. E.g. Array sound_array = new Array(){R.raw.horn_sound, R.id.peep_sound};

Keep counter and loop over the arrays....

respondido 10 mar '12, 05:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.