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
Amira Elsayed Ismail
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()).