WO2017215564A1 - 显示视图控件动态效果的方法及装置 - Google Patents
显示视图控件动态效果的方法及装置 Download PDFInfo
- Publication number
- WO2017215564A1 WO2017215564A1 PCT/CN2017/087926 CN2017087926W WO2017215564A1 WO 2017215564 A1 WO2017215564 A1 WO 2017215564A1 CN 2017087926 W CN2017087926 W CN 2017087926W WO 2017215564 A1 WO2017215564 A1 WO 2017215564A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- rotation angle
- displacement
- view control
- displacement length
- image window
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
Definitions
- the present invention relates to the field of Internet technologies, and in particular, to a method and apparatus for displaying a dynamic effect of a view control.
- Image windows are often embedded in browser pages to display static or dynamic view controls (Image View).
- image View static or dynamic view controls
- some of the system's native or third-party developed applications will also embed such image windows, more commonly including the desktop background of the operating system, or the window showing the cloudy and rainy icons in the weather application.
- the dynamic effect of the view control is often preset by the program, such as the raindrop falling from the top to the bottom, or the information label is cyclically displaced according to a predetermined trajectory.
- This dynamic effect style is dull and cannot respond to user actions without interactive performance.
- An object of the present invention is to provide a method and apparatus for displaying a dynamic effect of a view control, which can solve the problem that the image window lacks an interactive function.
- the present invention provides a method for displaying a dynamic effect of a view control, comprising:
- the present invention also provides an apparatus for displaying a dynamic effect of a view control, comprising:
- a detecting unit configured to detect a rotation angle of the terminal relative to the preset coordinate axis on the terminal body
- a determining unit configured to determine a displacement direction and a displacement length of the view control in the image window according to the rotation angle, where the image window is a visualization component provided by the terminal;
- a display unit configured to display a dynamic effect of the view control moving in the image window according to the displacement direction and the displacement length.
- the present invention also provides an apparatus for displaying a dynamic effect of a view control, comprising:
- a direction sensor configured to detect a rotation angle of the terminal relative to a preset coordinate axis on the terminal body
- a processor configured to determine a displacement direction and a displacement length of the view control in the image window according to the rotation angle, the image window being a visualization component provided by the terminal;
- a display configured to display a dynamic effect of the view control moving in the image window according to the displacement direction and the displacement length;
- a memory configured to store executable instructions of the processor
- a bus configured to couple the direction sensor, the processor, the display, and the memory.
- the method and device for displaying the dynamic effect of the view control can capture the posture change of the terminal in the three-dimensional space by detecting the rotation angle of the terminal relative to the preset coordinate axis, and determine the displacement of the view control in the image window according to the posture change.
- the direction and displacement length shows the dynamic effect of the view control moving in the image window.
- the present invention can adjust the dynamic effect of the animation element in the image window based on the change of the terminal holding mode, thereby realizing the image display mode with the human-computer interaction function.
- FIG. 1 is a flowchart of a method for displaying a dynamic effect of a view control according to an embodiment of the present invention
- FIG. 2 is a schematic view showing a terminal X-axis, a Y-axis, and a Z-axis in an embodiment of the present invention
- 3a-1 and 3a-2 are schematic views showing the rotation of the terminal about the X axis in the embodiment of the present invention.
- 3b-1 and 3b-2 are schematic views showing the rotation of the terminal about the Y axis in the embodiment of the present invention.
- 3c-1 and 3c-2 are schematic views showing the rotation of the terminal about the Z axis in the embodiment of the present invention.
- 4a, 4b, 4c, 4d respectively show a schematic view of the angle between the extension line and the Y axis in which the displacement direction is located in the embodiment of the present invention
- 5a and 5b are schematic views respectively showing the relationship between the rotation angle and the displacement direction in the embodiment of the present invention.
- 6a and 6b respectively show schematic views of an image window including a view control in an embodiment of the present invention
- FIG. 7 is a flowchart of another method for displaying a dynamic effect of a view control according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of a mapping table provided by an embodiment of the present invention.
- 9a-1 and 9a-2 are schematic views respectively showing the relationship between the displacement length and the rotation angle value in the embodiment of the present invention.
- 9b-1 and 9b-2 are respectively schematic diagrams showing the relationship between the displacement length and the rotation angle value in the embodiment of the present invention.
- 10a and 10b are schematic diagrams showing another relationship between the displacement length and the rotation angle value in the embodiment of the present invention.
- 11a and 11b are schematic views respectively showing dynamic effects of rotation of a terminal around a Y-axis in an embodiment of the present invention
- 12a and 12b are respectively schematic views showing the dynamic effect of the rotation of the terminal around the X axis in the embodiment of the present invention
- 13a and 13b are schematic views respectively showing the dynamic effect of the rotation of the terminal around the Z axis in the embodiment of the present invention
- 15a and 15b are schematic diagrams showing dynamic effects of rotation of a terminal around an X-axis and a Z-axis in an embodiment of the present invention
- FIG. 16 is a block diagram showing the structure of an apparatus for displaying a dynamic effect of a view control according to an embodiment of the present invention.
- FIG. 17 is a block diagram showing another composition of an apparatus for displaying a dynamic effect of a view control according to an embodiment of the present invention.
- FIG. 18 is a block diagram showing the composition of an apparatus for displaying a dynamic effect of a view control according to an embodiment of the present invention.
- the embodiment of the invention provides a method for displaying the dynamic effect of the view control.
- the method is applied to the terminal side, and the terminal includes but is not limited to: a mobile phone, a tablet computer, and a wearable device.
- the terminal includes but is not limited to: a mobile phone, a tablet computer, and a wearable device.
- all the portable devices having the terminal rotation angle detecting function and the image output function can implement the method provided by the embodiments of the present invention.
- the method includes at least steps 101 to 103.
- the terminal obtains the rotation angle parameter through its own detection component, which can be built in the terminal or integrated on the terminal housing.
- the detecting component may specifically be a direction sensor.
- the preset coordinate axis is set by using the terminal body as a reference system, as shown in FIG. 2, the X axis parallel to the wide side of the mobile phone, the Y axis parallel to the long side of the mobile phone, and the plane perpendicular to the screen of the mobile phone are Z axis.
- the mobile phone is turned to the right by 90°, and the rotation angle of the mobile phone about the Y axis is -90°; on the contrary, referring to FIG. 3b-2, when the right side of the mobile phone is gradually raised until the mobile phone is perpendicular to the horizontal desktop, The phone is flipped 180° to the left, and the angle of rotation of the phone around the Y axis is +90°.
- the phone screen is placed face up on the horizontal table, so that the phone rotates clockwise or counterclockwise on the horizontal plane, the phone will rotate around the Z axis, and the direction sensor can The angle of rotation of the phone relative to the Z axis is detected.
- the angle of rotation of the mobile phone around the Z axis ranges from [0°, 360°).
- the rotation angles around the Z axis when the top of the mobile phone is oriented in the four directions of the east, the south, the west, and the north are: 90°, 180°. , 270° and 0°.
- the direction sensor can detect the rotation angle of the three-axis rotation of the mobile phone around Z, X, and Y in real time, and record them as parameters values[0], values[1], and values[2], respectively.
- the terminal can adjust the dynamic effect of the view control in the image window by using the rotation angle of any one of the coordinate axes, or combine the rotation angle of any two or three coordinate axes to synthesize the dynamic effect of the view control in the image window. This will be described in the following examples.
- the mapping relationship between the rotation angle of the terminal relative to the preset coordinate axis and the displacement direction of the view control in the image window may be pre-configured in the terminal, and the relationship may be set based on specific design requirements. Set.
- the mapping relationship between the rotation angle of the terminal relative to the preset coordinate axis and the displacement direction of the view control in the image window may be configured as: the extension line of the displacement direction and the coordinate axis are preset The angle between the angle values. Taking the terminal around the Y-axis as an example, Figures 4a, 4b, 4c, and 4d show several different angle values. When the terminal rotates around the Y-axis, the view control in the image window can follow the Figure 4a.
- the view control in the image window can be moved in the direction indicated by the dotted line shown in FIG. 4a with an angle of 90° with respect to the Y axis, or, see FIG. 4b, the image
- the view control in the window can be moved in the direction indicated by the dotted line with the angle of 45° with the Y axis shown in FIG. 4b, or, as shown in FIG. 4c, the view control in the image window can be clamped with the Y axis according to FIG. 4c.
- the angle is moved in the direction indicated by the dashed line of 30°, or, referring to Fig. 4d, the view control in the image window can be moved in the direction indicated by the broken line parallel to the Y-axis shown in Fig. 4d.
- the specific displacement direction of the view control on the extension line can also be set based on specific design requirements. Still taking the Y-axis as an example, when the view control is an element such as a cloud or a balloon, in order to pursue the floating effect of the lightweight object, the displacement direction of the view control can be configured to be inconsistent with the rotation direction of the terminal, for example, in FIG.
- the view control when When the left side of the terminal is lifted up to rotate right around the Y axis, the view control can be configured to move to the left side of the image window; in contrast, when the view control is an element such as a small ball or a brick, in pursuit of a heavy object
- the scrolling design effect can be configured to configure the view control's displacement direction to coincide with the direction of rotation of the terminal.
- Figure 5b when the left side of the terminal is lifted up to rotate right around the Y axis, the view control can be configured to the right of the image window. Side movement.
- the mapping relationship or calculation relationship between the rotation angle of the terminal relative to the preset coordinate axis and the displacement length of the view control in the image window may also be pre-configured in the terminal.
- the terminal can also configure different displacement forms for the view control in the image window, such as parabolic curve motion, or wave-breaking roundabout motion, or jumping motion based on preset offline points on the motion track.
- different displacement forms for the view control in the image window such as parabolic curve motion, or wave-breaking roundabout motion, or jumping motion based on preset offline points on the motion track.
- This embodiment mainly implements a dynamic moving effect for a view control in an image window, where the image window is a visual component provided by the terminal, and the calling interface of the visual component can be provided by the operating system of the terminal, a native application of the operating system or a third party.
- the application can present the image window in the form of an interface call.
- the view control refers to an image element rendered in an image window.
- the view control may be an image view control, such as trees, clouds, fingers, etc. in FIG. 6a, or the view control may also be a text view control, such as the characters displayed in the dialog box in FIG. 6b.
- These image elements are one of the components of the image window.
- the image elements usually exist in the form of controls, which can be individually designed and controlled during program development and operation.
- the view control that can be moved in the image window can be preset. This embodiment does not limit the attributes and the number of the view control.
- the terminal When moving the view control according to the displacement direction and the displacement length, the terminal needs to continuously draw and present image frames of many static image windows. These image frames are connected in series to realize the dynamic effect of the view control.
- the view control when the view control generates a displacement of a length step value, the terminal draws and presents a corresponding image frame.
- the length step value refers to a minimum unit length of movement of the view control, and the length step value can be set in advance. In practical applications, the length step value can be measured by the number of pixels. For example, the length step value can be set to 10 pixels, 5 pixels, and the like. In the case where the dynamic effect fluency is strict, the minimum granularity of the length step value may be 1 pixel. In this case, if the displacement length is 1000 pixels, then theoretically, the terminal needs to draw 1000 image frames. Shows the complete dynamic effects of the view control.
- the flow shown in FIG. 1 is repeatedly performed, because the detection of the change of the rotation angle of the terminal relative to the preset coordinate axis by the direction sensor is performed in real time, and the terminal rotates.
- the direction sensor continuously returns a new rotation angle value of the terminal relative to the preset coordinate axis.
- the terminal executes the flow shown in FIG. 1 to obtain the rotation angle, determine the corresponding displacement direction and displacement length, and display the corresponding dynamic effect accordingly.
- the overall dynamic effect corresponding to the rotation process is the accumulation of dynamic effects caused by each rotation angle change during the rotation.
- the direction sensor Similar to the length step value, the direction sensor also returns the rotation angle according to a predetermined angle granularity, which is the angle step value. In practical applications, the angle can be The degree step value is set to 1°. Thus, each time the direction sensor detects an angle change of 1°, the terminal executes a flow of Figure 1 to display the dynamic effect of the view control corresponding to the 1°.
- the terminal continuously receives the rotation angle of the terminal returned by the direction sensor relative to the Y axis during the rotation: 1°, 2°, 3°...29°, 30°; At a new rotation angle, the terminal executes the flow of Figure 1.
- the terminal rotates by 1° around the Y axis, and the view control moves to the left by 10 pixels.
- the view control in the image window moves 300 pixels to the left.
- the method of adjusting the display of the view control based on the real-time feedback of the rotation angle has the advantage that the dynamic effect of the view control and the terminal rotation process can be highly synchronized, thereby ensuring the immediacy of the interactive feedback.
- the method for displaying the dynamic effect of the view control provided by the embodiment can capture the posture change of the terminal in the three-dimensional space by detecting the rotation angle of the terminal relative to the preset coordinate axis, and determine the displacement direction of the view control in the image window according to the posture change. And the length of the displacement, and according to this display the dynamic effect of the view control moving in the image window.
- the embodiment can adjust the dynamic effect of the animation element in the image window based on the change of the terminal holding mode, thereby realizing the image display mode with the human-computer interaction function.
- the embodiment of the present invention further provides a method for displaying a dynamic effect of a view control. As shown in FIG. 7, the method includes at least steps 701 to 704.
- the rotation of the terminal around the Y axis is taken as an example.
- the direction sensor detects the rotation angle change of the terminal relative to the preset coordinate axis in real time, and obtains the rotation angle values[0], values[1], and values[2], The terminal performs the subsequent steps of FIG. 7 using values[2] therein.
- the displacement direction of the preset configuration view control is perpendicular to the Y axis of the preset coordinate axis, that is, the angle between the two is 90°, in other words, the view control will move along a horizontal line perpendicular to the Y axis.
- the terminal can determine the displacement direction of the view control according to the positive or negative rotation angle.
- the Y-axis has an angular rotation range of [-90°, +90°]. When the left side of the terminal is lifted to the right, the rotation angle changes from 0° to -90°. When the right side of the terminal is lifted to the left, the rotation angle is from 0°. +90° change.
- the terminal may search for a displacement length corresponding to the rotation angle in a preset mapping table.
- FIG. 8 shows a schematic diagram of a mapping table in which each rotation angle value corresponds to a displacement length value in units of pixel points.
- the rotation angle in the table is set according to the preset angle step value. For example, when the angle step value is 1°, the mapping table should include 180 (excluding 0°) rotation angle from -90° to +90°. The mapping relationship with the length of the displacement.
- the view control is once displaced by the angle of rotation of the terminal relative to the preset coordinate axis, so that the displacement length corresponding to each rotation angle in the mapping table should be generated.
- the amount of change in displacement length corresponding to the last angle step value For example, when the rotation length corresponding to the rotation angle -30° is 200 pixels, the meaning is that when the rotation angle is increased from -29° to -30°, the view control is moved to the left by 200 pixels, not referring to the terminal from The total number of pixels moved during 0° rotation to -30°.
- the total displacement length of the view control to the left should be 30° from 1° to 30° in the mapping table. The sum of the displacement lengths corresponding to the rotation angles.
- the movement speed of the view control can be adjusted by modifying the mapping table, specifically:
- the displacement length corresponding to each unit angle change amount in the mapping table may be set to the same value, which may be obtained from the table shown in FIG. 10a.
- the slope of the curve shown in Figure 10b is thus constant. In this case, the view control will move at a constant speed.
- the magnitude of the displacement length may be determined based on the following rules:
- A is a range of rotation angles of the rotation of the terminal relative to any coordinate axis of the preset coordinate axis, which is 90° in this embodiment, and l is an increment corresponding to each unit angle.
- the length of the displacement, L is the maximum distance that the view control can move in a single direction.
- the terminal may further determine the displacement length of the view control corresponding to each unit angle change amount based on the preset calculation relationship. Specifically, the moving speed of the view control is gradually slowed down as an example, including Step1 and Step2 as follows.
- Step 1 After each terminal obtains a new rotation angle, the terminal determines the displacement length attenuation amount corresponding to the rotation angle.
- the displacement length attenuation amount is the portion where the displacement length is reduced from the displacement length corresponding to the previous angle change amount. Since the moving speed of the view control needs to be gradually slowed down, it is necessary to ensure that as the rotation angle increases, the displacement length corresponding to each unit angular change amount is continuously reduced, thereby calculating the displacement length attenuation amount corresponding to each rotation angle. .
- the displacement length attenuation amount can be calculated according to the following formula:
- the initial displacement length refers to the length of movement of the view control when the terminal first generates an angular change amount of the angle step value, for example, the rotation angle of the terminal rotating around any of the preset coordinate axes changes from 0° to 1°.
- the displacement length of the time view control Since the displacement length of the last rotation angle can be referred to when the terminal first generates the angle change amount, it is necessary to manually set an initial displacement length for the end point situation. This embodiment does not limit the specific value of the initial displacement length.
- the maximum displacement length is the maximum distance that the view control can move in a single direction.
- the view control can move up to M pixels from the initial position to the left, or can move up to N pixels to the right.
- the maximum displacement length is equivalent to the foregoing.
- the unit of the rotation angle is “degree”
- the unit of length is “the number of pixels”.
- Step 2 The displacement length corresponding to the previous rotation angle is subtracted from the displacement length attenuation amount, and the displacement length corresponding to the current rotation angle is obtained.
- the terminal Since the new rotation angle is continuously generated during the rotation of the terminal, and the terminal calculates the corresponding displacement length based on each new rotation angle, the terminal can directly obtain the previous one when calculating the displacement length corresponding to the current rotation angle in Step 2. The length of the displacement corresponding to the angle of rotation.
- the displacement length corresponding to the previous rotation angle can be referred to, so in Step 2, for this end condition
- the initial displacement length A is pre-set, and the terminal determines the initial displacement length A as the corresponding displacement length when the rotation angle is 1°.
- This embodiment does not limit the specific value of the initial displacement length A. In practical applications, it can be set according to the empirical value. Ideally, the initial displacement length A can be set to 0.4X.
- the above method gives a displacement length calculation method for gradually slowing the movement speed of the view control.
- the displacement length increase amount can be calculated by referring to the above formula, and in Step 2 The displacement length corresponding to the previous rotation angle is added to the displacement length increase, and the displacement length corresponding to the current rotation angle is obtained.
- the range of the rotation angle that generates the dynamic effect may also be set. Specifically, one can be set according to design requirements or user preferences.
- the range of rotation angles varies, for example [-30°, +30°], which is defined by the two rotation angle thresholds of -30° and +30°. If the angle of rotation of the terminal exceeds the threshold of the rotation angle threshold, the view control no longer moves further, staying at the position when the last displacement (corresponding to the displacement length of -30° or +30°) is completed. Specifically, after detecting the rotation angle, the terminal determines whether the rotation angle exceeds a preset rotation angle threshold range. If the determination result is yes, the terminal directly determines the displacement length as 0, and cancels the step of determining the displacement length.
- the terminal may also determine the displacement length as 0 when it is determined that the rotation angle does not exceed the rotation angle threshold range, and calculate the displacement length by using a mapping table or a formula when the rotation angle exceeds the rotation angle threshold range, thereby making the terminal only
- the view control is moved when the rotation angle exceeds a certain degree, thereby avoiding erroneous operations caused by the fine action and saving the processing resources of the terminal.
- the terminal may also perform step 703 and then perform step 702, or perform step 702 and step 703 at the same time.
- the terminal needs to continuously draw image frames to show the dynamic effects of the view control movement.
- the terminal draws an image frame directly on the image window.
- the drawing process needs to occupy the main thread of the UI (User Interface), it will temporarily block the main thread and cannot respond to user operations. Therefore, this embodiment can adopt a single buffer drawing mechanism, that is, create a canvas. (Canvas), the image frame is drawn on the canvas by another thread independent of the main thread. After the drawing is completed, the content on the canvas is migrated to the drawing surface of the image window for display, thereby avoiding the long-term occupation of the main window of the image window UI, so that the main thread can respond to the user's operation event in time.
- UI User Interface
- the multi-buffering mechanism may be used for drawing, that is, creating multiple canvases by different
- the threads are responsible for image frame drawing and image frame display on different canvases.
- the remaining canvas performs other image frame drawing, and each canvas polls the image frame that is drawn to the drawing surface of the image window for display.
- the more the number of canvases the better the display performance of the terminal.
- a double buffer drawing mechanism can be adopted.
- the terminal creates a first canvas and a second canvas independent of the drawing surface of the image window, and then first draws an image frame on the first canvas, and after the drawing is completed, the first canvas image frame is migrated to the drawing surface of the image window for display. And the next image frame is drawn on the second canvas while the first canvas image frame is displayed. After the second canvas is drawn, the second canvas image frame is migrated to the image window drawing surface for display, and the next canvas image frame is drawn on the first canvas while the second canvas image frame is displayed, and thus repeated, two The canvas alternately displays and draws image frames.
- step 704 can be performed using the SurfaceView component in JAVA.
- the SurfaceView component is a dynamic drawing component that supports multiple buffering mechanisms. On the one hand, it can achieve complex and efficient UI dynamic effects, and on the other hand, it does not cause user input to be unable to respond in time.
- the terminal After obtaining the displacement direction and the displacement length, the terminal converts the displacement length into the number of pixels of the view control relative to the left edge of the image window according to the displacement direction, and then assigns the number of pixels to the paddingLeft parameter in the SurfaceView component, and the SurfaceView component according to the paddingLeft parameter. Draw a new image frame.
- the SurfaceView component of the previous version 4.1 supports the double-buffered drawing mechanism by default.
- the SurfaceView component of the later version 4.2 supports the three-buffer drawing mechanism by default. In practice, you can extend the module code up to 32 canvases by modifying the component code.
- the above SurfaceView component is merely illustrative and is not intended to be a specific limitation of the operating system and component types applicable to the present embodiment. In practical applications, other components, interfaces, configuration files, and the like having a multi-buffered drawing mechanism can be applied to the solution provided in this embodiment.
- the displacement direction of the configuration view control is perpendicular to the Y axis.
- the rotation angle is less than 0°
- the displacement direction of the view control is toward the left side of the image window.
- the rotation angle is greater than 0°
- the displacement direction of the view control is toward the right side of the image window. This creates a dynamic effect of floating light objects upwards.
- FIG. 11a when the left side of the mobile phone is gradually raised, a rotation angle smaller than 0° is generated, and the cloud moves linearly to the left side; as shown in FIG. 11b, when the right side of the mobile phone is gradually raised, more than 0° is generated. The angle of rotation of the cloud moves linearly to the right.
- the displacement direction of the configuration view control is perpendicular to the X axis.
- the rotation angle is less than 0°
- the displacement direction of the view control is toward the bottom of the image window.
- the rotation angle is greater than 0°, the displacement direction of the view control is toward the top of the image window. This creates a dynamic effect of the heavy object scrolling down.
- a rotation angle of less than 0° is generated, and the small ball moves linearly toward the bottom of the image window; as shown in Fig. 12b, when the bottom of the mobile phone is gradually raised, more than 0° is generated. The angle of rotation of the ball moves linearly toward the top of the image window.
- the displacement direction and rotation direction of the configuration view control are as follows.
- the rotation direction of the mobile phone around the Z axis is clockwise and the rotation angle is increasing
- the displacement direction of the view control is toward the left side of the image window
- the rotation direction of the mobile phone around the Z axis
- the displacement direction of the view control is toward the right side of the image window, thereby forming a dynamic effect of the reverse movement of the view control relative to the rotation direction.
- the mobile phone rotates around the X and Y axes at the same time.
- the displacement direction of the configuration view control is perpendicular to the X axis, and when the rotation angle is less than 0°, the displacement direction of the view control is toward the top of the image window, and when the rotation angle is greater than 0°, the view control is The displacement direction is toward the bottom of the image window, thereby forming a dynamic effect of the lightweight object floating upward.
- the displacement direction of the configuration view control is perpendicular to the Y axis.
- the displacement direction of the view control faces the left side of the image window, and when the rotation angle is greater than 0°, the displacement direction of the view control faces the image. On the right side of the window, the dynamic effect of the floating of the lightweight object is thus formed.
- the mobile phone rotates around the X and Z axes at the same time.
- the displacement direction of the configuration view control is perpendicular to the X axis, and when the rotation angle is less than 0°, the displacement direction of the view control is toward the top of the image window, and when the rotation angle is greater than 0°, the view control is The displacement direction is toward the bottom of the image window, thereby forming a dynamic effect of the lightweight object floating upward.
- the displacement direction of the configuration view control is opposite to the rotation direction.
- the displacement direction is toward the right side of the image window, and when it is rotated clockwise, the displacement direction is toward the left side of the image window.
- the mobile phone rotates around the Y axis and the Z axis at the same time.
- the mobile phone rotates around the X axis, the Y axis, and the Z axis at the same time.
- an embodiment of the present invention further provides an apparatus for displaying a dynamic effect of a view control.
- the device may be located inside the terminal or integrated outside the terminal and establish a data interaction relationship with the terminal. As shown in FIG. 16, the device includes at least: a detecting unit 161, a determining unit 162, and a display unit 163, where
- the detecting unit 161 is configured to detect a rotation angle of the terminal relative to the preset coordinate axis on the terminal body;
- a determining unit 162 configured to determine a displacement direction and a displacement length of the view control in the image window according to the rotation angle, where the image window is a visualization component provided by the terminal;
- the display unit 163 is configured to display a dynamic effect of the view control moving in the image window according to the displacement direction and the displacement length.
- the displacement direction is perpendicular to the preset coordinate axis
- the determining unit 162 includes:
- the first determining module 1621 is configured to determine a displacement direction of the view control according to the positive and negative of the rotation angle.
- the determining unit 162 includes a second determining module 1622, configured to:
- the displacement length corresponding to the previous rotation angle is subtracted from the displacement length attenuation amount, and the displacement length corresponding to the current rotation angle is obtained.
- the second determining module 1622 is configured to determine the preset initial displacement length as the displacement length when the angle change is first generated.
- the second determining module 1622 is configured to calculate the displacement length attenuation according to the following formula:
- Y is the displacement length attenuation amount
- T is the rotation angle
- A is the initial displacement length
- X is the maximum displacement length, where A is less than X and Y is less than A.
- the determining unit 162 is configured to search for a displacement length corresponding to the rotation angle in the preset mapping table.
- the value of the rotation angle detected by the detecting unit 161 is linearly related to the displacement length determined by the determining unit 162.
- the determining unit 162 is configured to determine the displacement length as 0 if the rotation angle exceeds a preset angle threshold.
- the display unit 163 is configured to display an image frame of the image window by using a multi-buffering mechanism.
- the display unit 163 adopts a double buffering mechanism
- the display unit 163 is used to:
- the second canvas image frame is displayed and the next image frame is drawn on the first canvas at the same time, and the two canvases alternately display and draw the image frame.
- an embodiment of the present invention further provides an apparatus for displaying a dynamic effect of a view control.
- the device may be located inside the terminal or integrated outside the terminal and establish a data interaction relationship with the terminal.
- the apparatus includes a direction sensor 181, a processor 182, a display 183, a memory 184, and a bus 185, wherein:
- the direction sensor 181 is configured to detect a rotation angle of the terminal relative to a preset coordinate axis on the terminal body;
- the processor 182 is configured to determine a displacement direction and a displacement length of the view control in the image window according to the rotation angle, where the image window is a visualization component provided by the terminal;
- the display 183 is configured to display a dynamic effect of the view control moving in the image window according to the displacement direction and the displacement length;
- the memory 184 is configured to store executable instructions of the processor 182;
- Bus 185 is configured to couple direction sensor 181, processor 182, display 183, and memory 184.
- the processor 182 is configured to determine the direction of displacement of the view control based on the positive and negative angles of rotation.
- processor 182 is configured to:
- the displacement length corresponding to the previous rotation angle is subtracted from the displacement length attenuation amount, and the displacement length corresponding to the current rotation angle is obtained.
- processor 182 is configured to:
- the preset initial displacement length is determined as the displacement length.
- processor 182 is configured to:
- Y is the displacement length attenuation amount
- T is the rotation angle
- A is the initial displacement length
- X is the maximum displacement length, where A is less than X and Y is less than A.
- processor 182 is configured to:
- processor 182 is configured to linearly map the value of the rotation angle to the displacement length.
- processor 182 is configured to:
- the displacement length is determined to be zero.
- display 183 is configured to:
- the image frame of the image window is displayed using a multi-buffering mechanism.
- the display 183 is configured to employ a double buffering mechanism
- Display 183 is configured to:
- the second canvas image frame is displayed and the next image frame is drawn on the first canvas at the same time, and the two canvases alternately display and draw the image frame.
- the device for displaying the dynamic effect of the view control provided by the embodiment of the present invention can capture the posture change of the terminal in the three-dimensional space by detecting the rotation angle of the terminal relative to the preset coordinate axis, and determine the displacement of the view control in the image window according to the posture change. The direction and displacement length, and based on this, shows the dynamic effect of the view control moving in the image window.
- the embodiment of the present invention can adjust the dynamic effect of the animation element in the image window based on the change of the terminal holding mode, thereby realizing the image display mode with the human-computer interaction function.
- modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
- the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
- any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
- Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
- a microprocessor or digital signal processor may be used in practice to implement some or all of the components of the inventive name (e.g., means for determining the level of link within a website) in accordance with embodiments of the present invention.
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
- Such a program implementing the present invention can be stored in a computer readable medium Up, or may have the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
Claims (15)
- 一种显示视图控件动态效果的方法,其中,所述方法包括:检测终端相对终端本体上预设坐标轴的旋转角度;根据所述旋转角度确定图像窗口中视图控件的位移方向和位移长度,所述图像窗口为终端提供的可视化部件;按照所述位移方向及所述位移长度,显示所述视图控件在所述图像窗口中移动的动态效果。
- 根据权利要求1所述的方法,其中,所述位移方向与所述预设坐标轴垂直;所述根据所述旋转角度确定图像窗口中视图控件的位移方向,包括:根据所述旋转角度的正负,确定所述视图控件的位移方向。
- 根据权利要求1或2所述的方法,其中,所述根据所述旋转角度确定图像窗口中视图控件的位移长度,包括:确定与所述旋转角度对应的位移长度衰减量;将前一旋转角度对应的位移长度与所述位移长度衰减量相减,获得当前旋转角度对应的位移长度。
- 根据权利要求3所述的方法,其中,所述根据所述旋转角度确定图像窗口中视图控件的位移长度,包括:当首次产生角度变化时,将预设的初始位移长度确定为所述位移长度。
- 根据权利要求1或2所述的方法,其中,所述根据所述旋转角度确定图像窗口中视图控件的位移长度,包括:在预设的映射表中查找与所述旋转角度对应的位移长度。
- 根据权利要求6所述的方法,其中,所述旋转角度的数值与所述位移长度之间呈线性映射关系。
- 根据权利要求1或2所述的方法,其中,所述根据所述旋转角度确定图像窗口中视图控件的位移长度,包括:若所述旋转角度超过预设的角度阈值,则将所述位移长度确定为0。
- 根据权利要求1至8中任一项所述的方法,其中,所述显示所述视图控件在所述图像窗口中移动的动态效果,包括:采用多缓冲机制对所述图像窗口的图像帧进行显示。
- 根据权利要求9所述的方法,其中,所述多缓冲机制为双缓冲机制;所述采用多缓冲机制对所述图像窗口的图像帧进行显示,包括:在显示第一画布图像帧的同时在第二画布上绘制下一图像帧;在第二画布绘制完毕后,显示第二画布图像帧并同时在第一画布上绘制再下一个图像帧,两画布交替进行图像帧的显示和绘制。
- 一种显示视图控件动态效果的装置,其中,所述装置包括:检测单元,用于检测终端相对终端本体上预设坐标轴的旋转角度;确定单元,用于根据所述旋转角度确定图像窗口中视图控件的位移方向和位移长度,所述图像窗口为终端提供的可视化部件;显示单元,用于按照所述位移方向及所述位移长度,显示所述视图控件在所述图像窗口中移动的动态效果。
- 根据权利要求11所述的装置,其中,所述位移方向与所述预设坐标轴垂直;所述确定单元,包括:第一确定模块,用于根据所述旋转角度的正负,确定所述视图控件的位移方向。
- 根据权利要求11或12所述的装置,其中,所述确定单元,包括第二确定模块,用于:确定与所述旋转角度对应的位移长度衰减量;将前一旋转角度对应的位移长度与所述位移长度衰减量相减,获得当前旋转角度对应的位移长度。
- 根据权利要求13所述的装置,其中,所述第二确定模块用于当首次产生角度变化时,将预设的初始位移长度确定为所述位移长度。
- 一种显示视图控件动态效果的装置,其中,所述装置包括:方向传感器,被配置为检测终端相对终端本体上预设坐标轴的旋转角度;处理器,被配置为根据所述旋转角度确定图像窗口中视图控件的位移方向和位移长度,所述图像窗口为终端提供的可视化部件;显示器,被配置为按照所述位移方向及所述位移长度,显示所述视图控件在所述图像窗口中移动的动态效果;存储器,被配置为存储所述处理器的可执行指令;总线,被配置为耦接所述方向传感器、所述处理器、所述显示器及所述存储器。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610435815.1 | 2016-06-15 | ||
CN201610435815.1A CN106155474A (zh) | 2016-06-15 | 2016-06-15 | 显示视图控件动态效果的方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017215564A1 true WO2017215564A1 (zh) | 2017-12-21 |
Family
ID=57353070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/087926 WO2017215564A1 (zh) | 2016-06-15 | 2017-06-12 | 显示视图控件动态效果的方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106155474A (zh) |
WO (1) | WO2017215564A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113474750A (zh) * | 2020-03-20 | 2021-10-01 | 西安诺瓦星云科技股份有限公司 | 屏幕显示的控制方法、装置和系统 |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106155474A (zh) * | 2016-06-15 | 2016-11-23 | 广州神马移动信息科技有限公司 | 显示视图控件动态效果的方法及装置 |
CN107193442A (zh) * | 2017-06-14 | 2017-09-22 | 广州爱九游信息技术有限公司 | 图形显示方法、图形显示装置、电子设备和存储介质 |
CN109284019A (zh) * | 2017-07-19 | 2019-01-29 | 精元电脑股份有限公司 | 旋转输入设备 |
KR102232045B1 (ko) | 2019-01-08 | 2021-03-25 | 삼성전자주식회사 | 전자 장치, 전자 장치의 제어 방법 및 컴퓨터 판독 가능 매체. |
JP2020129263A (ja) * | 2019-02-08 | 2020-08-27 | セイコーエプソン株式会社 | 表示システム、情報処理装置の制御プログラム、及び情報処理装置の制御方法 |
CN111880711B (zh) * | 2020-07-31 | 2022-02-01 | Oppo广东移动通信有限公司 | 显示控制方法、装置、电子设备及存储介质 |
CN112130719B (zh) * | 2020-08-28 | 2022-06-10 | 北京达佳互联信息技术有限公司 | 页面显示方法、装置、系统、电子设备及存储介质 |
CN112416218B (zh) * | 2020-09-08 | 2023-12-29 | 上海哔哩哔哩科技有限公司 | 虚拟卡片的显示方法、装置、计算机设备及存储介质 |
CN112631501A (zh) * | 2020-12-30 | 2021-04-09 | 深圳市鸿合创新信息技术有限责任公司 | 一种触控功能控件的显示方法、显示装置及电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101369210A (zh) * | 2008-08-22 | 2009-02-18 | 深圳华为通信技术有限公司 | 一种调整用户界面元素的方法及装置 |
CN102141846A (zh) * | 2011-03-09 | 2011-08-03 | 中兴通讯股份有限公司 | 一种直觉式浏览内容的方法及移动终端 |
CN105242826A (zh) * | 2015-09-21 | 2016-01-13 | 北京元心科技有限公司 | 一种在移动设备上实现3d动态壁纸的方法和装置 |
CN105335118A (zh) * | 2014-08-08 | 2016-02-17 | 北京搜狗科技发展有限公司 | 一种电子设备控件的显示方法和装置 |
CN106155474A (zh) * | 2016-06-15 | 2016-11-23 | 广州神马移动信息科技有限公司 | 显示视图控件动态效果的方法及装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101404380B1 (ko) * | 2012-09-24 | 2014-06-09 | 주식회사 팬택 | 모바일 디바이스 및 모바일 디바이스의 화면 방향 전환 방법 |
CN103279290B (zh) * | 2013-05-29 | 2016-06-15 | 广东欧珀移动通信有限公司 | 移动设备显示方法和移动设备 |
JP6252815B2 (ja) * | 2014-06-06 | 2017-12-27 | 華為技術有限公司Huawei Technologies Co.,Ltd. | ウィンドウ表示位置を調節するための方法、および端末 |
-
2016
- 2016-06-15 CN CN201610435815.1A patent/CN106155474A/zh active Pending
-
2017
- 2017-06-12 WO PCT/CN2017/087926 patent/WO2017215564A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101369210A (zh) * | 2008-08-22 | 2009-02-18 | 深圳华为通信技术有限公司 | 一种调整用户界面元素的方法及装置 |
CN102141846A (zh) * | 2011-03-09 | 2011-08-03 | 中兴通讯股份有限公司 | 一种直觉式浏览内容的方法及移动终端 |
CN105335118A (zh) * | 2014-08-08 | 2016-02-17 | 北京搜狗科技发展有限公司 | 一种电子设备控件的显示方法和装置 |
CN105242826A (zh) * | 2015-09-21 | 2016-01-13 | 北京元心科技有限公司 | 一种在移动设备上实现3d动态壁纸的方法和装置 |
CN106155474A (zh) * | 2016-06-15 | 2016-11-23 | 广州神马移动信息科技有限公司 | 显示视图控件动态效果的方法及装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113474750A (zh) * | 2020-03-20 | 2021-10-01 | 西安诺瓦星云科技股份有限公司 | 屏幕显示的控制方法、装置和系统 |
CN113474750B (zh) * | 2020-03-20 | 2023-12-08 | 西安诺瓦星云科技股份有限公司 | 屏幕显示的控制方法、装置和系统 |
Also Published As
Publication number | Publication date |
---|---|
CN106155474A (zh) | 2016-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017215564A1 (zh) | 显示视图控件动态效果的方法及装置 | |
US11227446B2 (en) | Systems, methods, and graphical user interfaces for modeling, measuring, and drawing using augmented reality | |
US11727650B2 (en) | Systems, methods, and graphical user interfaces for displaying and manipulating virtual objects in augmented reality environments | |
US11163417B2 (en) | Systems, methods, and graphical user interfaces for interacting with augmented and virtual reality environments | |
DK180842B1 (en) | Devices, procedures, and graphical user interfaces for System-Wide behavior for 3D models | |
US10068383B2 (en) | Dynamically displaying multiple virtual and augmented reality views on a single display | |
US10514753B2 (en) | Selectively applying reprojection processing to multi-layer scenes for optimizing late stage reprojection power | |
JP2019164844A5 (zh) | ||
WO2021062098A4 (en) | Devices, methods, and graphical user interfaces for interacting with three-dimensional environments | |
JP4608326B2 (ja) | 指示動作認識装置及び指示動作認識プログラム | |
US20180276824A1 (en) | Selective application of reprojection processing on layer sub-regions for optimizing late stage reprojection power | |
JP6110011B2 (ja) | スクロールするためのチルティング | |
US9576393B1 (en) | Dynamic rendering of soft shadows for interface elements | |
US20220129079A1 (en) | Method and system for viewing virtual elements | |
US9092897B2 (en) | Method and apparatus for displaying interface elements | |
US20140015826A1 (en) | Method and apparatus for synchronizing an image with a rendered overlay | |
CN110489027B (zh) | 手持输入设备及其指示图标的显示位置控制方法和装置 | |
US9411412B1 (en) | Controlling a computing device based on user movement about various angular ranges | |
US11748966B2 (en) | Virtual paper | |
US20160231826A1 (en) | Three-Dimensional Tilt and Pan Navigation Using a Single Gesture | |
US9665249B1 (en) | Approaches for controlling a computing device based on head movement | |
US10175780B2 (en) | Behind-display user interface | |
JP4563723B2 (ja) | 指示動作認識装置及び指示動作認識プログラム | |
WO2023131022A1 (zh) | 显示控制方法、电子设备及可读存储介质 | |
CN115700455A (zh) | 一种camer模组处理方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17812675 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17812675 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 190819) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17812675 Country of ref document: EP Kind code of ref document: A1 |