[go: up one dir, main page]

CN106020815B - A kind of Android platform animation display area expansion method and system - Google Patents

A kind of Android platform animation display area expansion method and system Download PDF

Info

Publication number
CN106020815B
CN106020815B CN201610325234.2A CN201610325234A CN106020815B CN 106020815 B CN106020815 B CN 106020815B CN 201610325234 A CN201610325234 A CN 201610325234A CN 106020815 B CN106020815 B CN 106020815B
Authority
CN
China
Prior art keywords
view
copy
sub
viewgroup
child
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610325234.2A
Other languages
Chinese (zh)
Other versions
CN106020815A (en
Inventor
曹晗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Technology Group Co Ltd
Original Assignee
TCL Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Technology Group Co Ltd filed Critical TCL Technology Group Co Ltd
Priority to CN201610325234.2A priority Critical patent/CN106020815B/en
Publication of CN106020815A publication Critical patent/CN106020815A/en
Application granted granted Critical
Publication of CN106020815B publication Critical patent/CN106020815B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2213/00Indexing scheme for animation
    • G06T2213/08Animation software package

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明公开了一种安卓平台动画显示区域扩展方法及系统,方法包括:创建ViewGroup;获取父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;当监测到子View进行运动和动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。本发明实现了当子View移动范围超过了父View的区域时,子View位于父View的区域外的部分由与子View大小完全相同的子View副本补全,确保动画效果。

Figure 201610325234

The invention discloses a method and system for extending an animation display area of an Android platform. The method includes: creating a ViewGroup; acquiring and copying a child View whose animation is to be created in a parent View, obtaining a corresponding copy of the child View, and adding the copy of the child View to a In the ViewGroup; wherein, the position of the sub-View copy in the display screen of the smart terminal is the same as the position of the sub-View in the display screen; when the sub-View is monitored for movement and animation display, then the sub-View copy The location information of the child View is updated synchronously with the location information of the child View. The invention realizes that when the moving range of the child View exceeds the area of the parent View, the part of the child View outside the area of the parent View is completed by a copy of the child View with the same size as the child View, so as to ensure the animation effect.

Figure 201610325234

Description

一种安卓平台动画显示区域扩展方法及系统A kind of Android platform animation display area expansion method and system

技术领域technical field

本发明涉及安卓平台的控件控制技术领域,尤其涉及的是一种安卓平台动画显示区域扩展方法及系统。The invention relates to the technical field of control control of an Android platform, in particular to a method and system for extending an animation display area of an Android platform.

背景技术Background technique

安卓平台的界面为了提高用户体验会设计很多动画效果,在现在的技术上,大部分应用都是通过Animation(动画功能)实现控件的动画。这些动画效果包括控件位置的移动,放大、缩小、渐变以及几种动画的组合。界面上的大部分的控件都是继承统一的View(即视图),这些View的布局包含着父子关系,View的容器ViewGroup也是继承自View,View和ViewGroup的关系如图1所示。对控件做动画的本质是对View做动画效果,但是由于安卓平台中界面的绘制机制,子View的绘制是由父View或者ViewGroup的完成绘制的。这样就造成了一个问题,某个子View在做移动的动画效果时,如果该子View的移动范围超过了父View的可视区域,子View就不能显示出来。In order to improve the user experience, the interface of the Android platform will design a lot of animation effects. In the current technology, most applications use Animation (animation function) to realize the animation of the controls. These animation effects include the movement of the control position, zooming in, zooming out, fading, and a combination of several animations. Most of the controls on the interface inherit a unified View (that is, a view). The layout of these Views includes a parent-child relationship. The ViewGroup, the container of the View, also inherits from the View. The relationship between the View and the ViewGroup is shown in Figure 1. The essence of animating the controls is to animate the View, but due to the interface drawing mechanism in the Android platform, the drawing of the child View is completed by the parent View or ViewGroup. This causes a problem. When a child View is doing a moving animation effect, if the movement range of the child View exceeds the visible area of the parent View, the child View cannot be displayed.

因此,现有技术还有待于改进和发展。Therefore, the existing technology still needs to be improved and developed.

发明内容SUMMARY OF THE INVENTION

本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种安卓平台动画显示区域扩展方法及系统,旨在解决现有技术中子View在做移动的动画效果时,如果该子View的移动范围超过了父View的可视区域,子View就不能显示出来的问题。The technical problem to be solved by the present invention is that, aiming at the above-mentioned defects of the prior art, a method and system for extending the animation display area of the Android platform are provided, which aims to solve the problem that when the sub-View is doing a moving animation effect in the prior art, if the sub-view The movement range of the View exceeds the visible area of the parent View, and the child View cannot be displayed.

本发明解决技术问题所采用的技术方案如下:The technical scheme adopted by the present invention to solve the technical problem is as follows:

一种安卓平台动画显示区域扩展方法,其中,所述方法包括以下步骤:A method for extending an animation display area of an Android platform, wherein the method comprises the following steps:

A、创建ViewGroup,ViewGroup的父节点为显示屏的整个界面的根节点,ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域;A. Create a ViewGroup. The parent node of the ViewGroup is the root node of the entire interface of the display screen, and the area size of the ViewGroup is the largest area that the View can move on the entire interface of the display screen;

B、获取父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;B. Obtain the child View to be created in the parent View and copy it, obtain the corresponding child View copy, and add the child View copy to the ViewGroup; wherein, the child View copy is in the display screen of the smart terminal. The position is the same as the position of the sub-View in the display screen;

C、当监测到所述子View进行运动和动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。C. When the movement and animation display of the sub-View is monitored, the position information of the sub-View copy is updated synchronously with the position information of the sub-View.

所述安卓平台动画显示区域扩展方法,其中,所述步骤B具体包括:The Android platform animation display area expansion method, wherein the step B specifically includes:

B11、获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;B11, obtain the child View of the animation to be created in the parent View, and copy it to obtain the corresponding child View copy;

B12、将子View副本添加到所述ViewGroup中;B12. Add a copy of the child View to the ViewGroup;

B13、根据getLocationOnScreen接口获取所述子View的左边界相对于显示屏左边界的第一横向坐标,和所述子View的上边界相对于显示屏上边界的第一纵向坐标;B13, according to the getLocationOnScreen interface, obtain the first horizontal coordinate of the left border of the sub-View relative to the left border of the display screen, and the first vertical coordinate of the upper border of the sub-View relative to the upper border of the display screen;

B14、根据getLocationOnScreen接口获取ViewGroup的左边界相对于显示屏左边界的第二横向坐标,和所述ViewGroup的上边界相对于显示屏上边界的第二纵向坐标;B14, obtain the second horizontal coordinate of the left border of the ViewGroup relative to the left border of the display screen according to the getLocationOnScreen interface, and the second vertical coordinate of the upper border of the ViewGroup relative to the upper border of the display screen;

B15、根据所述第二横向坐标与所述第一横向坐标之差获取所述子View副本的左边界相对于所述ViewGroup的左边界的第三横向坐标,并根据所述第二纵向坐标与所述第一纵向坐标之差获取所述子View副本的上边界相对于所述ViewGroup的上边界的第三纵向坐标。B15. Acquire the third horizontal coordinate of the left border of the child View copy relative to the left border of the ViewGroup according to the difference between the second horizontal coordinate and the first horizontal coordinate, and obtain the third horizontal coordinate of the left border of the child View copy relative to the left border of the ViewGroup, and according to the second vertical coordinate and The difference between the first longitudinal coordinates obtains the third longitudinal coordinate of the upper boundary of the child View copy relative to the upper boundary of the ViewGroup.

所述安卓平台动画显示区域扩展方法,其中,所述步骤B具体包括:The Android platform animation display area expansion method, wherein the step B specifically includes:

B21、获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;B21, obtain the child View of the animation to be created in the parent View, and copy it to obtain the corresponding child View copy;

B22、将子View副本添加到所述ViewGroup中;B22. Add a copy of the child View to the ViewGroup;

B23、根据getLocationOnScreen接口获取所述子View的右边界相对于显示屏右边界的第四横向坐标,和所述子View的下边界相对于显示屏下边界的第四纵向坐标;B23, according to the getLocationOnScreen interface, obtain the fourth horizontal coordinate of the right border of the sub View relative to the right border of the display screen, and the fourth vertical coordinate of the lower border of the sub View relative to the lower border of the display screen;

B24、根据getLocationOnScreen接口获取ViewGroup的右边界相对于显示屏右边界的第五横向坐标,和所述ViewGroup的下边界相对于显示屏下边界的第五纵向坐标;B24, obtain the fifth horizontal coordinate of the right border of the ViewGroup relative to the right border of the display screen according to the getLocationOnScreen interface, and the fifth vertical coordinate of the lower border of the ViewGroup relative to the lower border of the display screen;

B25、根据所述第五横向坐标与所述第四横向坐标之差获取所述子View副本的右边界相对于所述ViewGroup的右边界的第六横向坐标,并根据所述第五纵向坐标与所述第四纵向坐标之差获取所述子View副本的下边界相对于所述ViewGroup的下边界的第六纵向坐标。B25. Acquire the sixth horizontal coordinate of the right border of the child View copy relative to the right border of the ViewGroup according to the difference between the fifth horizontal coordinate and the fourth horizontal coordinate, and obtain the sixth horizontal coordinate of the right border of the sub-View copy relative to the right border of the ViewGroup, and obtain the sixth horizontal coordinate of the right border of the child View copy according to the difference between the fifth vertical coordinate and the fourth horizontal coordinate. The difference between the fourth longitudinal coordinates obtains the sixth longitudinal coordinate of the lower boundary of the child View copy relative to the lower boundary of the ViewGroup.

所述安卓平台动画显示区域扩展方法,其中,所述步骤C中所述子View副本与所述子View进行同步缩放,所述子View副本与所述子View保持大小完全相同。In the method for extending the animation display area of the Android platform, in the step C, the sub-View replica and the sub-View are scaled synchronously, and the sub-View replica and the sub-View keep the same size.

所述安卓平台动画显示区域扩展方法,其中,所述步骤C中当检测到所述子View移动至所述父View的区域外,则所述子View位于所述父View的区域内的部分进行显示,所述子View位于所述父View的区域外的部分不显示,所述子View副本正常显示。The Android platform animation display area extension method, wherein, in the step C, when it is detected that the child View moves outside the area of the parent View, the part of the child View located in the area of the parent View is performed. Display, the part of the child View outside the area of the parent View is not displayed, and the copy of the child View is displayed normally.

一种安卓平台动画显示区域扩展系统,其中,包括:An Android platform animation display area expansion system, including:

容器创建模块,用于创建ViewGroup,ViewGroup的父节点为显示屏的整个界面的根节点,ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域;The container creation module is used to create a ViewGroup. The parent node of the ViewGroup is the root node of the entire interface of the display screen, and the area size of the ViewGroup is the maximum area that the View can move on the entire interface of the display screen;

复制及添加模块,用于获取父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;The copy and add module is used to obtain and copy the child View to be created in the parent View to obtain the corresponding copy of the child View, and add the copy of the child View to the ViewGroup; wherein, the copy of the child View is stored in the smart terminal. The position of the display screen is the same as the position of the sub-View in the display screen;

同步运动控制模块,用于当监测到所述子View进行移动动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。The synchronous motion control module is configured to update the position information of the sub-View replica synchronously with the position information of the sub-View when it is detected that the sub-View performs moving animation display.

所述安卓平台动画显示区域扩展系统,其中,所述复制及添加模块具体包括:The Android platform animation display area expansion system, wherein the copying and adding modules specifically include:

第一复制单元,用于获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;The first copying unit is used to obtain the child View of the animation to be created in the parent View, and copy it to obtain a corresponding copy of the child View;

第一添加单元,用于将子View副本添加到所述ViewGroup中;The first adding unit is used to add a copy of the child View to the ViewGroup;

第一子View定位单元,用于根据getLocationOnScreen接口获取所述子View的左边界相对于显示屏左边界的第一横向坐标,和所述子View的上边界相对于显示屏上边界的第一纵向坐标;The first sub-View positioning unit is used to obtain, according to the getLocationOnScreen interface, the first horizontal coordinate of the left border of the sub-View relative to the left border of the display screen, and the first longitudinal coordinate of the upper border of the sub-View relative to the upper border of the display screen coordinate;

第一ViewGroup定位单元,用于根据getLocationOnScreen接口获取ViewGroup的左边界相对于显示屏左边界的第二横向坐标,和所述ViewGroup的上边界相对于显示屏上边界的第二纵向坐标;The first ViewGroup positioning unit is used to obtain the second horizontal coordinate of the left border of the ViewGroup relative to the left border of the display screen according to the getLocationOnScreen interface, and the second vertical coordinate of the upper border of the ViewGroup relative to the upper border of the display screen;

第一子View副本定位单元,用于根据所述第二横向坐标与所述第一横向坐标之差获取所述子View副本的左边界相对于所述ViewGroup的左边界的第三横向坐标,并根据所述第二纵向坐标与所述第一纵向坐标之差获取所述子View副本的上边界相对于所述ViewGroup的上边界的第三纵向坐标。The first sub-View copy positioning unit is configured to obtain the third lateral coordinate of the left border of the sub-View copy relative to the left border of the ViewGroup according to the difference between the second lateral coordinate and the first lateral coordinate, and The third longitudinal coordinate of the upper boundary of the child View copy relative to the upper boundary of the ViewGroup is obtained according to the difference between the second longitudinal coordinate and the first longitudinal coordinate.

所述安卓平台动画显示区域扩展系统,其中,所述复制及添加模块具体包括:The Android platform animation display area expansion system, wherein the copying and adding modules specifically include:

第二复制单元,用于获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;The second copy unit is used to obtain the child View of the animation to be created in the parent View, and copy it to obtain a corresponding copy of the child View;

第二添加单元,用于将子View副本添加到所述ViewGroup中;The second adding unit is used to add a copy of the child View to the ViewGroup;

第二子View定位单元,用于根据getLocationOnScreen接口获取所述子View的右边界相对于显示屏右边界的第四横向坐标,和所述子View的下边界相对于显示屏下边界的第四纵向坐标;The second sub-View positioning unit is configured to obtain, according to the getLocationOnScreen interface, the fourth horizontal coordinate of the right border of the sub-View relative to the right border of the display screen, and the fourth longitudinal coordinate of the lower border of the sub-View relative to the lower border of the display screen coordinate;

第二ViewGroup定位单元,用于根据getLocationOnScreen接口获取ViewGroup的右边界相对于显示屏右边界的第五横向坐标,和所述ViewGroup的下边界相对于显示屏下边界的第五纵向坐标;The second ViewGroup positioning unit is used to obtain the fifth horizontal coordinate of the right border of the ViewGroup relative to the right border of the display screen according to the getLocationOnScreen interface, and the fifth vertical coordinate of the lower border of the ViewGroup relative to the lower border of the display screen;

第二子View副本定位单元,用于根据所述第五横向坐标与所述第四横向坐标之差获取所述子View副本的右边界相对于所述ViewGroup的右边界的第六横向坐标,并根据所述第五纵向坐标与所述第四纵向坐标之差获取所述子View副本的下边界相对于所述ViewGroup的下边界的第六纵向坐标。A second sub-View copy positioning unit, configured to obtain the sixth lateral coordinate of the right border of the sub-View copy relative to the right border of the ViewGroup according to the difference between the fifth lateral coordinate and the fourth lateral coordinate, and The sixth longitudinal coordinate of the lower boundary of the child View copy relative to the lower boundary of the ViewGroup is obtained according to the difference between the fifth longitudinal coordinate and the fourth longitudinal coordinate.

所述安卓平台动画显示区域扩展系统,其中,所述同步运动控制模块中所述子View副本与所述子View进行同步缩放,所述子View副本与所述子View保持区域大小相同。In the Android platform animation display area expansion system, the sub-View copy in the synchronous motion control module is synchronously scaled with the sub-View, and the sub-View copy and the sub-View maintain area size is the same.

所述安卓平台动画显示区域扩展系统,其中,所述同步运动控制模块中当检测到所述子View移动至所述父View的区域外,则所述子View位于所述父View的区域内的部分进行显示,所述子View位于所述父View的区域外的部分不显示,所述子View副本正常显示。The Android platform animation display area expansion system, wherein, in the synchronous motion control module, when it is detected that the child View moves outside the area of the parent View, the child View is located in the area of the parent View. Part of the child View is displayed, the part of the child View outside the area of the parent View is not displayed, and the copy of the child View is displayed normally.

本发明所提供的安卓平台动画显示区域扩展方法及系统,方法包括:创建ViewGroup;获取所述父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;当监测到所述子View进行运动和动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。本发明实现了当子View移动范围超过了父View的区域时,子View位于父View的区域外的部分由与子View大小完全相同的子View副本补全,确保动画效果。The Android platform animation display area extension method and system provided by the present invention include: creating a ViewGroup; acquiring and duplicating the child View whose animation is to be created in the parent View, obtaining a corresponding copy of the child View, and adding the copy of the child View into the ViewGroup; wherein, the position of the sub-View copy in the display screen of the smart terminal is the same as the position of the sub-View in the display screen; when the sub-View is monitored for motion and animation display, then The location information of the sub-View replica is updated synchronously with the location information of the sub-View. The invention realizes that when the moving range of the child View exceeds the area of the parent View, the part of the child View outside the area of the parent View is completed by a copy of the child View with the same size as the child View, so as to ensure the animation effect.

附图说明Description of drawings

图1是View和ViewGroup的关系示意图。Figure 1 is a schematic diagram of the relationship between View and ViewGroup.

图2是本发明所述安卓平台动画显示区域扩展方法较佳实施例的流程图。FIG. 2 is a flow chart of a preferred embodiment of the method for extending the animation display area of the Android platform according to the present invention.

图3是本发明所述安卓平台动画显示区域扩展系统较佳实施例的功能结构框图。FIG. 3 is a functional structural block diagram of a preferred embodiment of the Android platform animation display area expansion system according to the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer and clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

请参见图2,图2是本发明所述安卓平台动画显示区域扩展方法较佳实施例的流程图。如图2所示,本发明实施例提供的所述安卓平台动画显示区域扩展方法,包括步骤:Please refer to FIG. 2 . FIG. 2 is a flowchart of a preferred embodiment of the method for extending an animation display area of an Android platform according to the present invention. As shown in FIG. 2, the Android platform animation display area expansion method provided by the embodiment of the present invention includes the steps:

步骤S100、创建ViewGroup,ViewGroup的父节点为显示屏的整个界面的根节点,ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域;Step S100, creating a ViewGroup, the parent node of the ViewGroup is the root node of the entire interface of the display screen, and the area size of the ViewGroup is the largest area that the View can move on the entire interface of the display screen;

具体实施时,所述ViewGroup的面积等于智能终端的显示屏的面积,即ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域。为了方便,可以创建和智能终端的显示屏尺寸一样的区域,用来作为View的容器(即所述ViewGroup),对之前已经实现好的布局不需要任何改变。During specific implementation, the area of the ViewGroup is equal to the area of the display screen of the smart terminal, that is, the area size of the ViewGroup is the largest area that the View can move on the entire interface of the display screen. For convenience, an area with the same size as the display screen of the smart terminal can be created and used as the container of the View (that is, the ViewGroup), and no changes are required to the previously implemented layout.

步骤S200、获取所述父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;Step S200: Obtain and copy the child View to be animated in the parent View, obtain the corresponding child View copy, and add the child View copy to the ViewGroup; wherein, the display of the child View copy on the smart terminal The position in the screen is the same as the position of the sub-View in the display screen;

步骤S300、当监测到所述子View进行移动动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。Step S300 , when it is monitored that the sub-View performs a moving animation display, the position information of the sub-View copy is updated synchronously with the position information of the sub-View.

在步骤S300中,所述子View副本的位置信息与所述子View的位置信息同步更新,即表示当监测到所述子View进行移动动画显示时,则带动所述子View副本进行同步运动,且所述子View副本与所述子View保持相对静止。In step S300, the position information of the sub-View replica is updated synchronously with the position information of the sub-View, which means that when the sub-View is monitored for moving animation display, the sub-View replica is driven to perform synchronous movement, And the sub-View copy and the sub-View remain relatively still.

进一步的,所述步骤S300中当检测到所述子View移动至所述父View的区域外,则所述子View位于所述父View的区域内的部分进行显示,所述子View位于所述父View的区域外的部分不显示,所述子View副本正常显示。Further, in the step S300, when it is detected that the child View moves outside the area of the parent View, the part of the child View located in the area of the parent View is displayed, and the child View is located in the area of the parent View. The part outside the area of the parent View is not displayed, and the copy of the child View is displayed normally.

现有技术中,既然子View不能超出父View的区域显示,原因是由于父View的区域太小导致的,故可以调整父View的区域的大小,这样带来一个问题,就是父View的区域变大后,子View的布局也要跟着调整,如果界面上有多个View控件,布局的计算就会带来很大的不便而且对于之前的已经设计好的布局界面需要重新进行调整。In the prior art, since the child View cannot be displayed beyond the area of the parent View, the reason is that the area of the parent View is too small, so the size of the area of the parent View can be adjusted, which brings a problem that the area of the parent View changes. The layout of the sub-View should also be adjusted when the size is large. If there are multiple View controls on the interface, the layout calculation will bring great inconvenience and the previously designed layout interface needs to be re-adjusted.

本发明的实施例中,对控件(即子View或子View副本等)做移动动画或者放大动画效果时,子控件的区域超过父控件区域时,通过复制该子控件得到一个相同的子控件副本,并将该子控件副本所处的容器的可视范围最大设置为智能终端的显示屏的尺寸大小。在子控件不可见的位置,由子控件副本将子控件补全后,达到子控件也可以在超出父控件的区域也能显示的效果,并且对之前的布局改动比较小,实现起来比较简单。In the embodiment of the present invention, when moving animation or zooming in animation effect is performed on a control (ie, a child View or a copy of the child View, etc.), when the area of the child control exceeds the area of the parent control, an identical copy of the child control is obtained by duplicating the child control , and set the maximum visible range of the container where the sub-control copy is located to the size of the display screen of the smart terminal. In the invisible position of the child control, after the child control is completed by the copy of the child control, the effect that the child control can also be displayed in the area beyond the parent control is achieved, and the previous layout changes are relatively small, and the implementation is relatively simple.

作为步骤S200的第一具体实施例,所述步骤S200具体包括:As a first specific embodiment of step S200, the step S200 specifically includes:

步骤S211、获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;Step S211, obtaining the child View of the animation to be created in the parent View, and duplicating it to obtain a corresponding copy of the child View;

步骤S212、将子View副本添加到所述ViewGroup中;Step S212, adding a sub-View copy to the ViewGroup;

步骤S213、根据getLocationOnScreen接口获取所述子View的左边界相对于显示屏左边界的第一横向坐标,和所述子View的上边界相对于显示屏上边界的第一纵向坐标;Step S213, according to the getLocationOnScreen interface, obtain the first horizontal coordinate of the left border of the sub View relative to the left border of the display screen, and the first vertical coordinate of the upper border of the sub View relative to the upper border of the display screen;

步骤S214、根据getLocationOnScreen接口获取ViewGroup的左边界相对于显示屏左边界的第二横向坐标,和所述ViewGroup的上边界相对于显示屏上边界的第二纵向坐标;Step S214, according to the getLocationOnScreen interface, obtain the second horizontal coordinate of the left border of the ViewGroup relative to the left border of the display screen, and the second vertical coordinate of the upper border of the ViewGroup relative to the upper border of the display screen;

步骤S215、根据所述第二横向坐标与所述第一横向坐标之差获取所述子View副本的左边界相对于所述ViewGroup的左边界的第三横向坐标,并根据所述第二纵向坐标与所述第一纵向坐标之差获取所述子View副本的上边界相对于所述ViewGroup的上边界的第三纵向坐标。Step S215: Obtain the third horizontal coordinate of the left border of the child View copy relative to the left border of the ViewGroup according to the difference between the second horizontal coordinate and the first horizontal coordinate, and obtain the third horizontal coordinate of the left border of the ViewGroup according to the second vertical coordinate. The difference from the first vertical coordinate obtains the third vertical coordinate of the upper boundary of the child View copy relative to the upper boundary of the ViewGroup.

作为步骤S200的第二具体实施例,所述步骤S200具体包括:As a second specific embodiment of step S200, the step S200 specifically includes:

步骤S221、获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;Step S221, obtaining the child View of the animation to be created in the parent View, and duplicating it to obtain the corresponding child View copy;

步骤S222、将子View副本添加到所述ViewGroup中;Step S222, adding a sub-View copy to the ViewGroup;

步骤S223、根据getLocationOnScreen接口获取所述子View的右边界相对于显示屏右边界的第四横向坐标,和所述子View的下边界相对于显示屏下边界的第四纵向坐标;Step S223, according to the getLocationOnScreen interface, obtain the fourth horizontal coordinate of the right border of the sub-View relative to the right border of the display screen, and the fourth vertical coordinate of the lower border of the sub-View relative to the lower border of the display screen;

步骤S224、根据getLocationOnScreen接口获取ViewGroup的右边界相对于显示屏右边界的第五横向坐标,和所述ViewGroup的下边界相对于显示屏下边界的第五纵向坐标;Step S224, according to the getLocationOnScreen interface, obtain the fifth horizontal coordinate of the right border of the ViewGroup relative to the right border of the display screen, and the fifth vertical coordinate of the lower border of the ViewGroup relative to the bottom border of the display screen;

步骤S225、根据所述第五横向坐标与所述第四横向坐标之差获取所述子View副本的右边界相对于所述ViewGroup的右边界的第六横向坐标,并根据所述第五纵向坐标与所述第四纵向坐标之差获取所述子View副本的下边界相对于所述ViewGroup的下边界的第六纵向坐标。Step S225: Obtain the sixth horizontal coordinate of the right border of the sub-View copy relative to the right border of the ViewGroup according to the difference between the fifth horizontal coordinate and the fourth horizontal coordinate, and obtain the sixth horizontal coordinate of the right border of the ViewGroup according to the fifth vertical coordinate. The difference from the fourth vertical coordinate obtains the sixth vertical coordinate of the lower boundary of the child View copy relative to the lower boundary of the ViewGroup.

在步骤S200的第一具体实施例中是以显示屏的左边界和上边界为参考来实现定位,而在步骤S200的第二具体实施例中是以显示屏的右边界和下边界为参考来实现定位。In the first specific embodiment of step S200, the positioning is realized by taking the left border and the upper border of the display screen as a reference, and in the second specific embodiment of step S200, the right border and the lower border of the display screen are taken as a reference. achieve positioning.

进一步的,所述步骤S300中所述子View副本与所述子View进行同步缩放,所述子View副本与所述子View保持大小完全相同。Further, in the step S300, the sub-View copy and the sub-View are scaled synchronously, and the sub-View copy and the sub-View keep the same size.

可见,本发明实现了当子View移动范围超过了父View的区域时,子View位于父View的区域外的部分由与子View大小完全相同的子View副本补全,确保动画效果。It can be seen that the present invention realizes that when the moving range of the child View exceeds the area of the parent View, the part of the child View outside the area of the parent View is completed by a copy of the child View with the same size as the child View, ensuring the animation effect.

基于上述方法实施例,本发明还提供了一种安卓平台动画显示区域扩展系统,如图3所示,所述系统包括:Based on the above method embodiment, the present invention also provides an Android platform animation display area expansion system, as shown in FIG. 3 , the system includes:

容器创建模块100,用于创建ViewGroup,ViewGroup的父节点为显示屏的整个界面的根节点,ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域;The container creation module 100 is used to create a ViewGroup, the parent node of the ViewGroup is the root node of the entire interface of the display screen, and the area size of the ViewGroup is the largest area that the View can move on the entire interface of the display screen;

复制及添加模块200,用于获取所述父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;The copying and adding module 200 is used for acquiring and copying the child View to be animated in the parent View, obtaining the corresponding child View copy, and adding the child View copy to the ViewGroup; wherein, the child View copy The position in the display screen of the smart terminal is the same as the position of the sub-View in the display screen;

同步运动控制模块300,用于当监测到所述子View进行移动动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。The synchronous motion control module 300 is configured to synchronize and update the position information of the sub-View copy and the position information of the sub-View when the sub-View is monitored for moving animation display.

进一步的,在所述安卓平台动画显示区域扩展系统中,所述复制及添加模块200具体包括:Further, in the Android platform animation display area expansion system, the copying and adding module 200 specifically includes:

第一复制单元,用于获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;The first copying unit is used to obtain the child View of the animation to be created in the parent View, and copy it to obtain a corresponding copy of the child View;

第一添加单元,用于将子View副本添加到所述ViewGroup中;The first adding unit is used to add a copy of the child View to the ViewGroup;

第一子View定位单元,用于根据getLocationOnScreen接口获取所述子View的左边界相对于显示屏左边界的第一横向坐标,和所述子View的上边界相对于显示屏上边界的第一纵向坐标;The first sub-View positioning unit is used to obtain, according to the getLocationOnScreen interface, the first horizontal coordinate of the left border of the sub-View relative to the left border of the display screen, and the first longitudinal coordinate of the upper border of the sub-View relative to the upper border of the display screen coordinate;

第一ViewGroup定位单元,用于根据getLocationOnScreen接口获取ViewGroup的左边界相对于显示屏左边界的第二横向坐标,和所述ViewGroup的上边界相对于显示屏上边界的第二纵向坐标;The first ViewGroup positioning unit is used to obtain the second horizontal coordinate of the left border of the ViewGroup relative to the left border of the display screen according to the getLocationOnScreen interface, and the second vertical coordinate of the upper border of the ViewGroup relative to the upper border of the display screen;

第一子View副本定位单元,用于根据所述第二横向坐标与所述第一横向坐标之差获取所述子View副本的左边界相对于所述ViewGroup的左边界的第三横向坐标,并根据所述第二纵向坐标与所述第一纵向坐标之差获取所述子View副本的上边界相对于所述ViewGroup的上边界的第三纵向坐标。The first sub-View copy positioning unit is configured to obtain the third lateral coordinate of the left border of the sub-View copy relative to the left border of the ViewGroup according to the difference between the second lateral coordinate and the first lateral coordinate, and The third longitudinal coordinate of the upper boundary of the child View copy relative to the upper boundary of the ViewGroup is obtained according to the difference between the second longitudinal coordinate and the first longitudinal coordinate.

进一步的,在所述安卓平台动画显示区域扩展系统中,所述复制及添加模块200具体包括:Further, in the Android platform animation display area expansion system, the copying and adding module 200 specifically includes:

第二复制单元,用于获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;The second copy unit is used to obtain the child View of the animation to be created in the parent View, and copy it to obtain a corresponding copy of the child View;

第二添加单元,用于将子View副本添加到所述ViewGroup中;The second adding unit is used to add a copy of the child View to the ViewGroup;

第二子View定位单元,用于根据getLocationOnScreen接口获取所述子View的右边界相对于显示屏右边界的第四横向坐标,和所述子View的下边界相对于显示屏下边界的第四纵向坐标;The second sub-View positioning unit is configured to obtain, according to the getLocationOnScreen interface, the fourth horizontal coordinate of the right border of the sub-View relative to the right border of the display screen, and the fourth longitudinal coordinate of the lower border of the sub-View relative to the lower border of the display screen coordinate;

第二ViewGroup定位单元,用于根据getLocationOnScreen接口获取ViewGroup的右边界相对于显示屏右边界的第五横向坐标,和所述ViewGroup的下边界相对于显示屏下边界的第五纵向坐标;The second ViewGroup positioning unit is used to obtain the fifth horizontal coordinate of the right border of the ViewGroup relative to the right border of the display screen according to the getLocationOnScreen interface, and the fifth vertical coordinate of the lower border of the ViewGroup relative to the lower border of the display screen;

第二子View副本定位单元,用于根据所述第五横向坐标与所述第四横向坐标之差获取所述子View副本的右边界相对于所述ViewGroup的右边界的第六横向坐标,并根据所述第五纵向坐标与所述第四纵向坐标之差获取所述子View副本的下边界相对于所述ViewGroup的下边界的第六纵向坐标。A second sub-View copy positioning unit, configured to obtain the sixth lateral coordinate of the right border of the sub-View copy relative to the right border of the ViewGroup according to the difference between the fifth lateral coordinate and the fourth lateral coordinate, and The sixth longitudinal coordinate of the lower boundary of the child View copy relative to the lower boundary of the ViewGroup is obtained according to the difference between the fifth longitudinal coordinate and the fourth longitudinal coordinate.

进一步的,在所述安卓平台动画显示区域扩展系统中,所述同步运动控制模块所述子View副本与所述子View进行同步缩放,所述子View副本与所述子View保持大小完全相同。Further, in the Android platform animation display area expansion system, the synchronous motion control module performs synchronous scaling of the sub-View replica and the sub-View, and the sub-View replica and the sub-View maintain the same size.

进一步的,在所述安卓平台动画显示区域扩展系统中,所述同步运动控制模块中当检测到所述子View移动至所述父View的区域外,则所述子View位于所述父View的区域内的部分进行显示,所述子View位于所述父View的区域外的部分不显示,所述子View副本正常显示。Further, in the Android platform animation display area extension system, when the synchronous motion control module detects that the child View moves outside the area of the parent View, the child View is located in the area of the parent View. The part within the area is displayed, the part of the child View outside the area of the parent View is not displayed, and the copy of the child View is displayed normally.

综上所述,本发明所提供的安卓平台动画显示区域扩展方法及系统,方法包括:创建ViewGroup;获取父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;当监测到所述子View进行移动动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新。本发明实现了当子View移动范围超过了父View的区域时,子View位于父View的区域外的部分由与子View大小完全相同的子View副本补全,确保动画效果。To sum up, the Android platform animation display area extension method and system provided by the present invention include: creating a ViewGroup; acquiring and duplicating the child View whose animation is to be created in the parent View, obtaining a copy of the corresponding child View, and placing the child View in the parent View. A copy of the View is added to the ViewGroup; wherein, the position of the copy of the sub-View in the display screen of the smart terminal is the same as the position of the sub-View in the display screen; when it is detected that the sub-View performs a moving animation display , the position information of the sub-View copy is updated synchronously with the position information of the sub-View. The invention realizes that when the moving range of the child View exceeds the area of the parent View, the part of the child View outside the area of the parent View is completed by a copy of the child View with the same size as the child View, so as to ensure the animation effect.

当然,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关硬件(如处理器,控制器等)来完成,所述的程序可存储于一计算机可读取的存储介质中,该程序在执行时可包括如上述各方法实施例的流程。其中所述的存储介质可为存储器、磁碟、光盘等。Of course, those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware (such as processors, controllers, etc.) through a computer program, and the programs can be stored in a In the computer-readable storage medium, when the program is executed, the processes of the above-mentioned method embodiments may be included. The storage medium may be a memory, a magnetic disk, an optical disk, or the like.

应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or transformations can be made according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.

Claims (6)

1.一种安卓平台动画显示区域扩展方法,其特征在于,所述方法包括以下步骤:1. an Android platform animation display area expansion method, is characterized in that, described method comprises the following steps: A、创建ViewGroup,ViewGroup的父节点为显示屏的整个界面的根节点,ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域;A. Create a ViewGroup. The parent node of the ViewGroup is the root node of the entire interface of the display screen, and the area size of the ViewGroup is the largest area that the View can move on the entire interface of the display screen; B、获取父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在显示屏中的位置与所述子View在显示屏中的位置相同;B. Obtain and copy the child View to be animated in the parent View, obtain the corresponding child View copy, and add the child View copy to the ViewGroup; wherein, the position of the child View copy in the display screen is the same as that of all the child View copies. The position of the sub-View in the display screen is the same; C、当监测到所述子View进行移动动画时,则子View副本的位置信息与所述子View的位置信息同步更新;C, when monitoring said sub-View to perform moving animation, then the position information of the sub-View replica is updated synchronously with the position information of said sub-View; 所述步骤C中当检测到所述子View移动至所述父View的区域外,则所述子View位于所述父View的区域内的部分进行显示,所述子View位于所述父View的区域外的部分不显示,所述子View副本正常显示;In the step C, when it is detected that the child View moves outside the area of the parent View, the part of the child View located in the area of the parent View is displayed, and the child View is located in the area of the parent View. The part outside the area is not displayed, and the sub-View copy is displayed normally; 所述子View副本与所述子View进行同步缩放,且所述子View副本与所述子View保持大小完全相同;当子View移动范围超过了父View的区域时,子View位于父View的区域外的部分由与子View大小完全相同的子View副本补全。The copy of the child View and the child View are scaled synchronously, and the copy of the child View and the child View keep the same size; when the movement range of the child View exceeds the area of the parent View, the child View is located in the area of the parent View The outer part is completed by a copy of the child View that is exactly the same size as the child View. 2.根据权利要求1所述安卓平台动画显示区域扩展方法,其特征在于,所述步骤B具体包括:2. the Android platform animation display area expansion method according to claim 1, is characterized in that, described step B specifically comprises: B11、获取父View中待创建动画的子View,并进行复制,得到对应的子View副本;B11. Obtain the child View whose animation is to be created in the parent View, and copy it to obtain a copy of the corresponding child View; B12、将子View副本添加到所述ViewGroup中;B12. Add a copy of the child View to the ViewGroup; B13、根据getLocationOnScreen接口获取所述子View的左边界相对于显示屏左边界的第一横向坐标,和所述子View的上边界相对于显示屏上边界的第一纵向坐标;B13, according to the getLocationOnScreen interface, obtain the first horizontal coordinate of the left border of the sub-View relative to the left border of the display screen, and the first vertical coordinate of the upper border of the sub-View relative to the upper border of the display screen; B14、根据getLocationOnScreen接口获取ViewGroup的左边界相对于显示屏左边界的第二横向坐标,和所述ViewGroup的上边界相对于显示屏上边界的第二纵向坐标;B14, obtain the second horizontal coordinate of the left border of the ViewGroup relative to the left border of the display screen according to the getLocationOnScreen interface, and the second vertical coordinate of the upper border of the ViewGroup relative to the upper border of the display screen; B15、根据所述第二横向坐标与所述第一横向坐标之差获取所述子View副本的左边界相对于所述ViewGroup的左边界的第三横向坐标,并根据所述第二纵向坐标与所述第一纵向坐标之差获取所述子View副本的上边界相对于所述ViewGroup的上边界的第三纵向坐标。B15. Acquire the third horizontal coordinate of the left border of the child View copy relative to the left border of the ViewGroup according to the difference between the second horizontal coordinate and the first horizontal coordinate, and obtain the third horizontal coordinate of the left border of the child View copy relative to the left border of the ViewGroup, and according to the second vertical coordinate and The difference between the first longitudinal coordinates obtains the third longitudinal coordinate of the upper boundary of the child View copy relative to the upper boundary of the ViewGroup. 3.根据权利要求1所述安卓平台动画显示区域扩展方法,其特征在于,所述步骤B具体包括:3. the Android platform animation display area expansion method according to claim 1, is characterized in that, described step B specifically comprises: B21、获取父View中待创建动画的子View,并进行复制,得到对应的子View副本;B21. Obtain the child View whose animation is to be created in the parent View, and copy it to obtain a copy of the corresponding child View; B22、将子View副本添加到所述ViewGroup中;B22. Add a copy of the child View to the ViewGroup; B23、根据getLocationOnScreen接口获取所述子View的右边界相对于显示屏右边界的第四横向坐标,和所述子View的下边界相对于显示屏下边界的第四纵向坐标;B23, according to the getLocationOnScreen interface, obtain the fourth horizontal coordinate of the right border of the sub View relative to the right border of the display screen, and the fourth vertical coordinate of the lower border of the sub View relative to the lower border of the display screen; B24、根据getLocationOnScreen接口获取ViewGroup的右边界相对于显示屏右边界的第五横向坐标,和所述ViewGroup的下边界相对于显示屏下边界的第五纵向坐标;B24, obtain the fifth horizontal coordinate of the right border of the ViewGroup relative to the right border of the display screen according to the getLocationOnScreen interface, and the fifth vertical coordinate of the lower border of the ViewGroup relative to the lower border of the display screen; B25、根据所述第五横向坐标与所述第四横向坐标之差获取所述子View副本的右边界相对于所述ViewGroup的右边界的第六横向坐标,并根据所述第五纵向坐标与所述第四纵向坐标之差获取所述子View副本的下边界相对于所述ViewGroup的下边界的第六纵向坐标。B25. Acquire the sixth horizontal coordinate of the right border of the child View copy relative to the right border of the ViewGroup according to the difference between the fifth horizontal coordinate and the fourth horizontal coordinate, and obtain the sixth horizontal coordinate of the right border of the sub-View copy relative to the right border of the ViewGroup, and obtain the sixth horizontal coordinate of the right border of the child View copy according to the difference between the fifth vertical coordinate and the fourth horizontal coordinate. The difference between the fourth longitudinal coordinates obtains the sixth longitudinal coordinate of the lower boundary of the child View copy relative to the lower boundary of the ViewGroup. 4.一种安卓平台动画显示区域扩展系统,其特征在于,包括:4. an Android platform animation display area expansion system, is characterized in that, comprises: 容器创建模块,用于创建ViewGroup,ViewGroup的父节点为显示屏的整个界面的根节点,ViewGroup的区域大小为View在显示屏的整个界面上可移动的最大区域;The container creation module is used to create a ViewGroup. The parent node of the ViewGroup is the root node of the entire interface of the display screen, and the area size of the ViewGroup is the maximum area that the View can move on the entire interface of the display screen; 复制及添加模块,用于获取父View中待创建动画的子View并进行复制,得到对应的子View副本,并将子View副本添加到所述ViewGroup中;其中,所述子View副本在智能终端的显示屏中的位置与所述子View在显示屏中的位置相同;The copy and add module is used to obtain and copy the child View to be created in the parent View to obtain the corresponding copy of the child View, and add the copy of the child View to the ViewGroup; wherein, the copy of the child View is stored in the smart terminal. The position of the display screen is the same as the position of the sub-View in the display screen; 同步运动控制模块,用于当监测到所述子View进行移动动画显示时,则子View副本的位置信息与所述子View的位置信息同步更新;A synchronous motion control module is used to update the position information of the sub-View replica synchronously with the position information of the sub-View when the sub-View is monitored for moving animation display; 所述同步运动控制模块中当检测到所述子View移动至所述父View的区域外,则所述子View位于所述父View的区域内的部分进行显示,所述子View位于所述父View的区域外的部分不显示,所述子View副本正常显示;In the synchronous motion control module, when it is detected that the child View moves outside the area of the parent View, the part of the child View located in the area of the parent View is displayed, and the child View is located in the parent View. The part outside the View's area is not displayed, and the sub-View copy is displayed normally; 所述同步运动控制模块中所述子View副本与所述子View进行同步缩放,所述子View副本与所述子View保持大小完全相同;当子View移动范围超过了父View的区域时,子View位于父View的区域外的部分由与子View大小完全相同的子View副本补全。In the synchronous motion control module, the sub-View copy and the sub-View are scaled synchronously, and the sub-View copy and the sub-View keep the same size; when the sub-View moves beyond the area of the parent View, the sub-View copy The portion of the View that is outside the parent View's area is completed by a copy of the child View that is exactly the same size as the child View. 5.根据权利要求4所述安卓平台动画显示区域扩展系统,其特征在于,所述复制及添加模块具体包括:5. according to the described Android platform animation display area expansion system of claim 4, it is characterized in that, described duplication and adding module specifically comprise: 第一复制单元,用于获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;The first copying unit is used to obtain the child View of the animation to be created in the parent View, and copy it to obtain a corresponding copy of the child View; 第一添加单元,用于将子View副本添加到所述ViewGroup中;The first adding unit is used to add a copy of the child View to the ViewGroup; 第一子View定位单元,用于根据getLocationOnScreen接口获取所述子View的左边界相对于显示屏左边界的第一横向坐标,和所述子View的上边界相对于显示屏上边界的第一纵向坐标;The first sub-View positioning unit is used to obtain, according to the getLocationOnScreen interface, the first horizontal coordinate of the left border of the sub-View relative to the left border of the display screen, and the first longitudinal coordinate of the upper border of the sub-View relative to the upper border of the display screen coordinate; 第一ViewGroup定位单元,用于根据getLocationOnScreen接口获取ViewGroup的左边界相对于显示屏左边界的第二横向坐标,和所述ViewGroup的上边界相对于显示屏上边界的第二纵向坐标;The first ViewGroup positioning unit, used to obtain the second horizontal coordinate of the left border of the ViewGroup relative to the left border of the display screen according to the getLocationOnScreen interface, and the second vertical coordinate of the upper border of the ViewGroup relative to the upper border of the display screen; 第一子View副本定位单元,用于根据所述第二横向坐标与所述第一横向坐标之差获取所述子View副本的左边界相对于所述ViewGroup的左边界的第三横向坐标,并根据所述第二纵向坐标与所述第一纵向坐标之差获取所述子View副本的上边界相对于所述ViewGroup的上边界的第三纵向坐标。A first sub-View copy positioning unit, configured to obtain the third lateral coordinate of the left border of the sub-View copy relative to the left border of the ViewGroup according to the difference between the second lateral coordinate and the first lateral coordinate, and The third longitudinal coordinate of the upper boundary of the child View copy relative to the upper boundary of the ViewGroup is obtained according to the difference between the second longitudinal coordinate and the first longitudinal coordinate. 6.根据权利要求4所述安卓平台动画显示区域扩展系统,其特征在于,所述复制及添加模块具体包括:6. according to the described Android platform animation display area expansion system of claim 4, it is characterized in that, described duplication and adding module specifically comprise: 第二复制单元,用于获取所述父View中待创建动画的子View,并进行复制,得到对应的子View副本;The second copy unit is used to obtain the child View of the animation to be created in the parent View, and copy it to obtain a corresponding copy of the child View; 第二添加单元,用于将子View副本添加到所述ViewGroup中;The second adding unit is used to add a copy of the child View to the ViewGroup; 第二子View定位单元,用于根据getLocationOnScreen接口获取所述子View的右边界相对于显示屏右边界的第四横向坐标,和所述子View的下边界相对于显示屏下边界的第四纵向坐标;The second sub-View positioning unit is configured to obtain, according to the getLocationOnScreen interface, the fourth horizontal coordinate of the right border of the sub-View relative to the right border of the display screen, and the fourth longitudinal coordinate of the lower border of the sub-View relative to the lower border of the display screen coordinate; 第二ViewGroup定位单元,用于根据getLocationOnScreen接口获取ViewGroup的右边界相对于显示屏右边界的第五横向坐标,和所述ViewGroup的下边界相对于显示屏下边界的第五纵向坐标;The second ViewGroup positioning unit is used to obtain the fifth horizontal coordinate of the right border of the ViewGroup relative to the right border of the display screen according to the getLocationOnScreen interface, and the fifth vertical coordinate of the lower border of the ViewGroup relative to the lower border of the display screen; 第二子View副本定位单元,用于根据所述第五横向坐标与所述第四横向坐标之差获取所述子View副本的右边界相对于所述ViewGroup的右边界的第六横向坐标,并根据所述第五纵向坐标与所述第四纵向坐标之差获取所述子View副本的下边界相对于所述ViewGroup的下边界的第六纵向坐标。A second sub-View copy positioning unit, configured to obtain the sixth lateral coordinate of the right border of the sub-View copy relative to the right border of the ViewGroup according to the difference between the fifth lateral coordinate and the fourth lateral coordinate, and The sixth longitudinal coordinate of the lower boundary of the child View copy relative to the lower boundary of the ViewGroup is obtained according to the difference between the fifth longitudinal coordinate and the fourth longitudinal coordinate.
CN201610325234.2A 2016-05-17 2016-05-17 A kind of Android platform animation display area expansion method and system Expired - Fee Related CN106020815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610325234.2A CN106020815B (en) 2016-05-17 2016-05-17 A kind of Android platform animation display area expansion method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610325234.2A CN106020815B (en) 2016-05-17 2016-05-17 A kind of Android platform animation display area expansion method and system

Publications (2)

Publication Number Publication Date
CN106020815A CN106020815A (en) 2016-10-12
CN106020815B true CN106020815B (en) 2020-07-21

Family

ID=57097235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610325234.2A Expired - Fee Related CN106020815B (en) 2016-05-17 2016-05-17 A kind of Android platform animation display area expansion method and system

Country Status (1)

Country Link
CN (1) CN106020815B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984237A (en) * 2017-05-31 2018-12-11 武汉斗鱼网络科技有限公司 A kind of control rendering method, storage medium, equipment and system
CN107608598A (en) * 2017-07-17 2018-01-19 捷开通讯(深圳)有限公司 The clone method of terminal and its view characters, storage device
CN110187951A (en) * 2019-05-31 2019-08-30 努比亚技术有限公司 Animation highlighting display method, device, terminal and computer-readable storage medium
CN116483296B (en) * 2022-01-13 2024-08-20 深圳Tcl新技术有限公司 Screen projection control method, device, storage medium and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101842768A (en) * 2007-06-08 2010-09-22 苹果公司 Graphical user interface for backup interface

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8490019B2 (en) * 2008-01-29 2013-07-16 Microsoft Corporation Displaying thumbnail copies of each running item from one or more applications
US8878872B1 (en) * 2012-02-24 2014-11-04 Rockwell Collins Inc. System, device and method for generating an overlay of navigation chart information

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101842768A (en) * 2007-06-08 2010-09-22 苹果公司 Graphical user interface for backup interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android动画被父View遮挡的解决办法;liguanyi11111;《https://liguanyi11111.iteye.com/blog/2102840》;20140812;第1-7页 *

Also Published As

Publication number Publication date
CN106020815A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
US20230016490A1 (en) Systems and methods for virtual and augmented reality
KR102688646B1 (en) Systems, methods, and graphical user interfaces for interacting with augmented and virtual reality environments
CN104508709B (en) Animate an object with a human body
US10535171B2 (en) Evaluation manager for 3D animation scenes
US8456467B1 (en) Embeddable three-dimensional (3D) image viewer
CN106020815B (en) A kind of Android platform animation display area expansion method and system
CN110462555A (en) Selectively apply reprojection processing on layer sub-regions to optimize post-reprojection power
US20130293686A1 (en) 3d reconstruction of human subject using a mobile device
CN108986016B (en) Image beautification method, device and electronic device
EP4182816A1 (en) Automatic website data migration
KR102797975B1 (en) Method and device for constructing 3D geometry
JP5108893B2 (en) System and method for restoring a 3D particle system from a 2D image
JP2023529790A (en) Method, apparatus and program for generating floorplans
CN105741232A (en) Automatic scaling of objects based on depth map for image editing
US20250068781A1 (en) Object relationship estimation from a 3d semantic mesh
CN102385515A (en) GO image animation engine based on Android system
CN104536743A (en) Map plotting method and system based on Android operating system
AU2022215321B2 (en) Generating shadows for digital objects within digital images utilizing a height map
US8907976B2 (en) Resolution-adaptive mesh smoothing brush
US9805499B2 (en) 3D-consistent 2D manipulation of images
US11475651B2 (en) Window-shaping virtual reality system
KR101838717B1 (en) Method and apparatus for implementing providing work assist service
US8890889B1 (en) System and method for generating a pose of an object
CN116095515A (en) Dynamic display method and device for static image and storage medium
JP7755761B2 (en) Character Parameter Retargeting to Simplify Stack Processing for Development of Diverse Virtual Environments

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 516006 TCL technology building, No.17, Huifeng Third Road, Zhongkai high tech Zone, Huizhou City, Guangdong Province

Applicant after: TCL Technology Group Co.,Ltd.

Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. nineteen District

Applicant before: TCL Corp.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200721