摘要 |
Disclosed is a method for enabling a JAVA application program interface to rotate when a mobile device screen rotates, said method comprising the following steps: a processor detects that a change in the orientation of a mobile device has occurred and triggers rotation of the screen; an underlying application program sends a screen rotation event to the platform application layer; the platform application layer controls the local application program to rotate along with the display interface, and then sends the screen rotation event to the JAVA kernel via the JAVA adaptation layer; the JAVA kernel modifies the screen-size parameters; the JAVA kernel calls the mobile device screen-size update interface of the JAVA application program; the JAVA application program reads the new screen-size parameters in the screen-size alter function of the mobile device and refreshes the interface display on the basis of same. The present invention makes use of a minimum amount of development work to achieve a method for enabling a JAVA application program interface to rotate when a mobile device screen rotates, allowing mobile devices having rotatable screens to offer a more complete user experience.
|