Cualquier evento de causa de rotación no dispara Android

I'm developing rotating layout with some image buttons over it, without rotation the Image button events works fine, but when I rotate the layout the button events keep the previous place of the button not the new place so when I click it it fire the event of another button and this is not good

I have tried to do it using touch event but I had the same problem, also i have tried to make a canvas and draw bitmaps over it and handle it using drawable .getBounds().contains(x, y);

but it didn't work also

can anyone advice me in this problem please?

preguntado el 09 de marzo de 12 a las 13:03

1 Respuestas

When an activity rotates it is destroyed (onDestroy() & onPause()) and recreated unless specified in the manifest (under activity add android:configChanges="orientation|keyboard"). Make sure your event listeners are being connected to your view when the activity is recreated (onResume()).

respondido 09 mar '12, 15:03

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