Patent ID: 9703466
Date: 2017-07-11
CPC Classifications: G06F

Claim:
1. A method for implementing rotation of a floating window, comprising: providing, by a terminal device, an image container supporting a rotation attribute for a user interface (UI) floating window view to be displayed; adding, by the terminal device, the UI floating window view into the image container; when an orientation corresponding to a stack-top application in an activated-state application stack of a system and/or an orientation detected by a gravity sensor of the system is changed, acquiring, by the terminal device, a rotation angle of the UI floating window view, redrawing the UI floating window view which has been rotated according to the rotation angle and the image container, and acquiring a rotation recovery matrix; and when a user click event is detected, performing, by the terminal device, rotation recovery transformation on coordinates of a user click position according to the rotation recovery matrix and the image container, to obtain coordinates in the UI floating window view which coordinates correspond to the user click position before the UI floating window view is rotated, so that the event can be delivered to an internal UI component of the floating window which corresponds to the event before the UI floating window view is rotated.