I want to develop an application with some advance features like shake feature, orientation of images, zoom in/out, scrolling, etc. For instance, the
user can shake the phone in order to erase an entered text. Also, by rotating the phone
clockwise or anti-clockwise, the orientation of the underlying images will change.
How would I do that?
For shaking:
You will need to use the phone’s accelerometer sensor. You can find many examples of this if you Google (for example: Android: I want to shake it)
For rotations:
When the phone detects an orientation change, Android will destroy and recreate your application. There are lifecycle methods (see http://developer.android.com/reference/android/app/Activity.html) that are called that allow you to save and restore your application’s current state. Again, if you Google:
http://developer.android.com/guide/topics/resources/runtime-changes.html
http://www.androidguys.com/2008/10/14/rotational-forceson-your-android-app/