Linear layout method and device for self-adaptive sub-controls

A layout method and sub-control technology, applied in the computer field, can solve the problems of waste of server resources and incomplete display, and achieve the effect of saving resources

Active Publication Date: 2019-07-12
WUHAN DOUYU NETWORK TECH CO LTD
View PDF8 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the problem of incomplete display of child controls in parent controls and waste of server resources in existing Android native controls, the present invention provides a linear layout method and device for adaptive child controls

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Linear layout method and device for self-adaptive sub-controls
  • Linear layout method and device for self-adaptive sub-controls
  • Linear layout method and device for self-adaptive sub-controls

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0031] figure 1 It is a schematic diagram of the overall flow of a linear layout method for adaptive sub-controls in an embodiment of the present invention, as shown in figure 1 As shown, the present invention provides a linear layout method for adaptive sub-controls, including:

[0032] S1. For any parent control, obtain the child control to be added corresponding to the parent control, and sequentially store the child control to be added in the first ordered set;

[0033] S2. Traverse the child controls to be added stored in the first ordered set, and for any child control to be added, obtain the width and height of any child control to be added, and determine the layo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a linear layout method and device for self-adaptive sub-controls, and the method comprises the steps: obtaining to-be-added sub-controls corresponding to a parent control, and sequentially storing the to-be-added sub-controls in a first ordered set; for any to-be-added sub-control in the first ordered set, adding the to-be-added sub-control into the first ordered set; sequentially obtaining the width and the height of any one to-be-added sub-control, adjusting the height of any one to-be-added sub-control according to the height sum of the added sub-controls in the parent control and the height of the parent control in combination with the layout direction of the parent control, and adjusting the width of any one to-be-added sub-control according to the width of theparent control; when the height and the width of any adjusted to-be-added sub-control are not zero, adding the to-be-added sub-control; adding any adjusted child control to be added into the parent control. According to the method and the device, the problem of incomplete display of the sub-controls in the Android native control is solved, the control which cannot be displayed completely does notneed to be rendered, and resources of a server are saved to a certain extent.

Description

technical field [0001] The present invention relates to the field of computer technology, and more specifically, to a linear layout method and device for adaptive sub-controls. Background technique [0002] Control refers to the encapsulation of data and methods. Controls can have their own properties and methods, where properties are simple accessors to control data, and methods are some simple and visible functions of the control. The control creation process includes design, development, debugging, and then the use of the control. Designing controls is a heavy work, and there is a huge difference between developing controls by yourself and using controls for visual program development, requiring programmers to be proficient in object-oriented programming. The greatest significance of creating controls lies in the encapsulation of repeated work, followed by the ability to expand the functionality of existing controls. [0003] The container where the control is docked is...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/38
CPCG06F8/38
Inventor 陈娇陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products