My question is straight and simple. Open the camera app on any android device. In portrait mode (default 90 degree), there’s a bottom frame that consists of buttons for camera features such as Flash, Image Capture, Accessing Gallery etc. Rotate the device to landscape in any direction – (180 degree or 0 degree) and the bottom bar remains stuck to the window space right next to the device menu buttons position. How is that feature achieved? Anchoring a frame to a specific location of the window such that device orientation changes, and thereby reconfiguring the device coordinate system (X and Y values change for each frame in the entire view/window) has no effect in redrawing the frame. Can this be achieved easily by specifying attributes to a layout xml file? Or does this involve programming complex code? If programming is the only option, I’d try and prefer to keep it as simplistic as possible.
Thanks.
Rotate animation should be used.
1) If the display window is stuck in a particular orientation using the android:screenOrientation attribute in the Activity’s declaration in the manifest file, android:layoutAnimation attribute can be used for the ViewGroup implementation in the layout file. This attribute takes a layoutAnimation file that points to any one of the Transformation Animations files that should be used.
2) If the inflated layout is referenced programmatically, the layout animation can be performed dynamically in program code multiple times as and how required, based on the use-cases, with different transformation animation files.