CN109656557B - User interface generation method and device - Google Patents

User interface generation method and device Download PDF

Info

Publication number
CN109656557B
CN109656557B CN201811552375.3A CN201811552375A CN109656557B CN 109656557 B CN109656557 B CN 109656557B CN 201811552375 A CN201811552375 A CN 201811552375A CN 109656557 B CN109656557 B CN 109656557B
Authority
CN
China
Prior art keywords
sliding
control
prefabricated
area
preset
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.)
Active
Application number
CN201811552375.3A
Other languages
Chinese (zh)
Other versions
CN109656557A (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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology 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 Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201811552375.3A priority Critical patent/CN109656557B/en
Publication of CN109656557A publication Critical patent/CN109656557A/en
Application granted granted Critical
Publication of CN109656557B publication Critical patent/CN109656557B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (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)

Abstract

The embodiment of the application provides a user interface generation method and device, and relates to the technical field of UI design. The method comprises the steps of uniformly packaging controls required by various user interfaces, searching sliding controls and functional controls required by an interface to be generated from a pre-configured control list when the user interfaces are generated, and then combining the functional controls according to a preset typesetting rule to obtain a prefabricated member; and finally, adding the prefabricated member into a preset area in the sliding control, writing data information to be displayed into a corresponding position in the prefabricated member, and generating a user interface. By the method, the control required by various user interfaces can be prevented from being manufactured respectively, so that the development efficiency of the user interfaces is improved, and the later maintenance cost is reduced.

Description

User interface generation method and device
Technical Field
The application relates to the technical field of UI (user interface) design, in particular to a user interface generation method and device.
Background
In most game production processes, UI (User Interface) designs usually have requirements for sliding interfaces, such as buddy lists, task lists, and item lists in malls. In the development process, each module is generally responsible for by different developers, and the UI control required by each module is also generally made by each developer respectively, so that not only is the development efficiency low, but also the maintenance cost is greatly increased in the later period.
Therefore, it is important for those skilled in the art to develop a method that can improve the efficiency of user interface development and reduce the cost of post-maintenance.
Disclosure of Invention
In order to overcome the defects in the prior art, the application provides a user interface generation method and device so as to improve the development efficiency of the user interface and reduce the later maintenance cost.
In order to achieve the above purpose, the preferred embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides a method for generating a user interface, where the method includes:
searching a target control required by an interface to be generated from a pre-configured control list, wherein the target control comprises a sliding control and a plurality of functional controls;
combining the functional controls according to a preset typesetting rule to obtain a prefabricated member;
acquiring data information to be displayed;
and adding the prefabricated part into a preset area in the sliding control part, writing the data information to be displayed into a corresponding position in the prefabricated part, and generating a user interface.
Optionally, in an embodiment of the present application, the sliding control includes a sliding region, and the step of adding the preform to the preset region in the sliding control includes:
determining the number of preforms to be added to the sliding control and the height of each preform;
calculating the total height required by the prefabricated member for containing the sliding control to be added according to the number and the height;
determining a sliding area of the sliding control according to the total height;
adding the preform to be added to the sliding control to the sliding region.
Optionally, in an embodiment of the present application, the method further includes:
detecting whether the total height is greater than a preset threshold value;
and when the total height is larger than a preset threshold value, determining the sliding area according to the preset height, and selecting a preset number of prefabricated parts from the prefabricated parts to be added to the sliding control to be added to the sliding area.
Optionally, in an embodiment of the present application, the method further includes:
receiving a sliding instruction operated by a user;
adjusting the position of the preform in the sliding region according to the sliding instruction.
Optionally, in an embodiment of the present application, the step of adjusting the position of the preform in the sliding region according to the sliding instruction includes:
analyzing the sliding instruction to obtain a corresponding offset;
calculating the target position of each prefabricated part after the deviation according to the height of the prefabricated part and the deviation amount;
judging whether the target position corresponding to each prefabricated part is in the sliding area;
if the prefabricated member is in the sliding area, the prefabricated member is moved to a corresponding target position; and if the prefabricated member is not in the sliding area, adding the prefabricated member into a cache pool.
Optionally, in an embodiment of the present application, the method further includes:
receiving an instruction for deleting the prefabricated part;
and removing the prefabricated member corresponding to the instruction from the sliding area, and adding the removed prefabricated member into a cache pool.
In a second aspect, an embodiment of the present application further provides a user interface generating apparatus, where the apparatus includes:
the searching module is used for searching a target control required by the interface to be generated from a pre-configured control list, wherein the target control comprises a sliding control and a plurality of functional controls;
the combination module is used for combining the function controls according to a preset typesetting rule to obtain a prefabricated member;
the acquisition module is used for acquiring data information to be displayed;
and the generating module is used for adding the prefabricated part into a preset area in the sliding control part, writing the data information to be displayed into a corresponding position in the prefabricated part and generating a user interface.
Optionally, in this embodiment of the present application, the sliding control includes a sliding region, and the generating module is specifically configured to:
determining the number of preforms to be added to the sliding control and the height of each preform;
calculating the total height required by the prefabricated member for containing the sliding control to be added according to the number and the height;
determining a sliding area of the sliding control according to the total height;
adding the preform to be added to the sliding control to the sliding region.
Optionally, in this embodiment of the application, the generating module is further configured to:
detecting whether the total height is greater than a preset threshold value;
and when the total height is larger than a preset threshold value, determining the sliding area according to the preset height, and selecting a preset number of prefabricated parts from the prefabricated parts to be added to the sliding control to be added to the sliding area.
Optionally, in an embodiment of the present application, the apparatus further includes a sliding control module, where the sliding control module is configured to:
receiving a sliding instruction operated by a user;
analyzing the sliding instruction to obtain a corresponding offset;
calculating the target position of each prefabricated part after the deviation according to the height of the prefabricated part and the deviation amount;
judging whether the target position corresponding to each prefabricated part is in the sliding area;
if the prefabricated member is in the sliding area, the prefabricated member is moved to a corresponding target position; and if the preform is not in the sliding area, adding the preform into a buffer pool.
Compared with the prior art, the method has the following beneficial effects:
according to the user interface generation method and device provided by the embodiment of the application, controls required by various user interfaces are packaged in a unified mode, sliding controls and functional controls required by the interface to be generated are searched from a pre-configured control list when the user interfaces are generated, and then the functional controls are combined according to a preset typesetting rule to obtain a prefabricated member; and finally, adding the prefabricated member into a preset area in the sliding control, writing data information to be displayed into a corresponding position in the prefabricated member, and generating a user interface. By the method and the device, the control required by various user interfaces can be prevented from being manufactured respectively, so that the development efficiency of the user interfaces is improved, and the later maintenance cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating a first step of a user interface generation method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a sub-step of step S40 in FIG. 2;
fig. 4 is a flowchart illustrating a second step of a user interface generation method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a third step of a user interface generating method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating the sub-steps of step S60 in FIG. 5;
fig. 7 is a schematic block diagram of a user interface generation apparatus according to an embodiment of the present application.
Icon: 100-an electronic device; 111-a memory; 112-a memory controller; 113-a processor; 70-a user interface generating means; 701-a search module; 702-a combination module; 703-an obtaining module; 704-a generation module; 705-slip control module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, an electronic device 100 according to an embodiment of the present disclosure is shown. The electronic device 100 includes a user interface generating apparatus 70, a memory 111, a storage controller 112, and a processor 113.
The memory 111, the memory controller 112 and the processor 113 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The user interface generating device 70 may include at least one software function module which may be stored in the memory 111 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 100. The processor 113 is used for executing executable modules stored in the memory 111, such as software functional modules and computer programs included in the user interface generating device 70.
The Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 111 is used for storing a program, and the processor 113 executes the program after receiving an execution instruction. Access to the memory 111 by the processor 113 and possibly other components may be under the control of the memory controller 112.
The processor 113 may be an integrated circuit chip having signal processing capabilities; or a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but also as Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., that may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application.
It should be understood that the configuration shown in fig. 1 is merely a schematic diagram, and the electronic device 100 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, a schematic flowchart of steps of a user interface generating method provided in an embodiment of the present application is shown, where the method may be applied to the electronic device 100 shown in fig. 1, and provides a user interface generating function for the electronic device 100.
The following describes in detail a user interface generation method provided in an embodiment of the present application with reference to fig. 2, where in the embodiment of the present application, the method includes:
and step S10, searching a target control needed by the interface to be generated from a pre-configured control list, wherein the target control comprises a sliding control and a plurality of functional controls.
In the embodiment of the application, in order to improve the production efficiency of the game interface, the development is performed in a mode that multiple interfaces share a UI control, so that independent development of various user interfaces such as a friend list, a task list, a mail list and a prop list in the game interface is avoided.
Specifically, controls required by various user interfaces such as a friend list, a task list, a mail list and a prop list are packaged uniformly in the development process, and then the packaged control lists are configured in advance. After the control list is configured, the related target controls can be searched according to the type of the interface to be generated.
Specifically, in an embodiment of the present application, since the interface to be generated has a sliding requirement, the target control includes a ScrollView sliding control and a plurality of other function controls. The function controls are used for generating a plurality of components of the user interface, such as head portraits, role names, game states and the like in a friend list; the sliding control is used for realizing sliding of the user interface, so that different data information is displayed in the fixed user interface area.
Further, with continued reference to fig. 2, after step S10, the method further includes:
and step S20, combining the functional controls according to preset typesetting rules to obtain the prefabricated member.
In the embodiment of the application, the prefabricated member may be obtained by combining the functional controls found in the above process according to the type of the interface to be generated and a preset typesetting rule corresponding to the interface to be generated.
For example, when the interface to be generated is a friend list, the avatar control, the role name control, and the game state control may be combined to obtain a preform corresponding to each game friend in the friend list interface. And when the interface to be generated is a task list, combining the task number control, the task name control and the task progress control to obtain a prefabricated part corresponding to each task in the task list interface. It should be noted that, in the embodiment of the present application, the prefabricated member may also include multiple friend information or multiple task information at the same time.
It should be noted that in the embodiments of the present application, different types of user interfaces may share the same control (i.e., the same control may be invoked from a preconfigured list of controls when generating different user interfaces). For example, for the above friend list interface and task list interface, the avatar control and task number control may call the same control, the role name control and task name control may call the same control, and the game state control and task progress control may call the same control.
Further, with continued reference to fig. 2, after the step S20, the method further includes:
step S30, data information to be displayed is acquired.
In this embodiment of the application, the data information to be displayed represents data that needs to be displayed in a user interface. For example, when it is detected that a buddy list is opened by a game player (i.e., when the buddy list needs to be displayed), a head portrait, a role name, and a game state (including online, in-game, offline, etc.) corresponding to each buddy added by the current player may be acquired from the game server; when it is detected that the game player opens the task list (that is, the task list needs to be displayed), the task number, the task name, the task progress and the like corresponding to each task accepted by the current player can be acquired from the game server.
Further, with continued reference to fig. 2, after the step S30, the method further includes:
step S40, adding the prefabricated member into a preset area in the sliding control member, writing the data information to be displayed into a corresponding position in the prefabricated member, and generating a user interface.
In the embodiment of the application, after the prefabricated member and the data information to be displayed are obtained through the steps, the prefabricated member is added to a preset area in the rolling control, and the data information to be displayed is written into a corresponding position in the prefabricated member, so that the user interface to be displayed can be obtained.
Specifically, referring to fig. 3, the process of adding the preform to the preset area in the scroll control may include:
sub-step S41, the number of preforms to be added to the slider control and the height of each preform is determined.
And a substep S42, calculating the total height required for accommodating the prefabricated member to be added to the sliding control according to the number and the height.
And a substep S43 of determining a sliding region of the sliding control according to the total height.
And a substep S44, adding the preform to be added to the slide control to the slide region.
In the embodiment of the present application, in order to automatically adjust the height of the interface to be generated according to the content to be displayed, the total height required for accommodating the content to be displayed needs to be calculated according to the number of prefabricated parts to be added to the sliding control and the height of each prefabricated part. For example, when 5 friends in the friend list of the game player need to be displayed, the total height required for displaying the 5 friends can be calculated according to the heights of the prefabricated parts corresponding to the 5 friends respectively.
Further, after the total height is calculated, the specific size of the sliding region in the sliding control can be determined according to the total height, so that the sliding region can be automatically adapted to the content to be displayed.
Further, after the specific size of the sliding region is determined, the prefabricated part to be displayed is added to the corresponding position of the sliding region according to the required typesetting rule, and the data information to be displayed is written into the corresponding control, so that the user interface can be generated.
Referring to fig. 4, in consideration of the fact that in practical applications, there may be a case where the UI list cannot simultaneously display all the data to be displayed, in an embodiment of the present application, the method further includes the following steps:
step S45, detecting whether the total height is greater than a preset threshold.
And step S46, when the total height is larger than a preset threshold value, determining the sliding area according to a preset height, and selecting a preset number of prefabricated members from the prefabricated members to be added to the sliding control to be added to the sliding area.
For example, when the maximum capacity of the sliding control is 10 preforms and the content to be displayed is 15 preforms, the height of the sliding area of the sliding control is set to a preset maximum value, and 10 preforms are selected according to the above sequence of the 15 preforms to be displayed and added to the sliding area. For the remaining 5 preforms, they may be added to the buffer pool to be called directly for display when the user slides the user interface.
Further, referring to fig. 5, in view of that the user interface needs to be slid when the content to be displayed is greater than the maximum capacity of the sliding control, in an embodiment of the present application, the method further includes:
in step S50, a slide instruction by a user operation is received.
And step S60, adjusting the position of the prefabricated member in the sliding area according to the sliding instruction.
Specifically, in the embodiment of the present application, the sliding instruction may include, but is not limited to, a sliding signal operated by a user through a touch screen and a dragging signal input through a mouse or a keyboard.
Referring to fig. 6, the implementation process of step S60 may include:
and a substep S61, analyzing the sliding command to obtain a corresponding offset.
And a substep S62 of calculating the target position of each pre-cast member after the deviation according to the height of the pre-cast member and the deviation amount.
And a substep S63 of determining whether the target position corresponding to each preform is within the sliding region.
A substep S64 of moving the preform to the corresponding target position if it is within the sliding region; and if the prefabricated member is not in the sliding area, adding the prefabricated member into a cache pool.
In the embodiment of the present application, all the preforms to be displayed may be arranged in the vertical direction, and the initial coordinate corresponding to each preform (which may be within the rolling area or outside the rolling area) is obtained through the height and the serial number of each preform. And then calculating through the initial coordinates and the offset obtained by analysis to obtain the target position of each prefabricated part after offset.
Since the target position may be within the rolling region or outside the rolling region, it is necessary to determine whether the target position corresponding to each preform is within the rolling region after obtaining the target position. And adding the prefabricated parts with the target positions outside the rolling area into a cache pool so as to be directly called when the prefabricated parts with the target positions inside the rolling area need to be displayed.
Further, in view of that a game player may perform operations such as deleting friends or tasks during a game, and the game player may perform additions again after the deletion, in order to reduce the data processing amount in this case and improve the user interface generation efficiency, in an embodiment of the present application, the method further includes:
receiving an instruction for deleting the prefabricated part;
and removing the prefabricated member corresponding to the instruction from the sliding area, and adding the removed prefabricated member into a cache pool.
The deleted data is added into the cache pool, so that the deleted data can be called quickly when the deleted data needs to be displayed again, and the production efficiency of the user interface is improved to a great extent.
Referring to fig. 7, an embodiment of the present application further provides a user interface generating apparatus 70, which may be applied to the electronic device 100 shown in fig. 1, and provide a user interface generating function for the electronic device 100, specifically, the apparatus includes:
the searching module 701 is used for searching a target control required by an interface to be generated from a pre-configured control list, wherein the target control comprises a sliding control and a plurality of functional controls;
the combination module 702 is configured to combine the functional controls according to a preset typesetting rule to obtain a prefabricated part;
an obtaining module 703, configured to obtain data information to be displayed;
and the generating module 704 is configured to add the prefabricated part to a preset area in the sliding control, write the data information to be displayed into a corresponding position in the prefabricated part, and generate a user interface.
Optionally, in this embodiment of the present application, the sliding control includes a sliding region, and the generating module 704 is specifically configured to:
determining the number of preforms to be added to the sliding control and the height of each preform;
calculating the total height required by the prefabricated member for containing the sliding control to be added according to the number and the height;
determining a sliding area of the sliding control according to the total height;
adding the preform to be added to the sliding control to the sliding region.
Optionally, in this embodiment of the present application, the generating module 704 is further configured to:
detecting whether the total height is greater than a preset threshold value;
and when the total height is larger than a preset threshold value, determining the sliding area according to the preset height, and selecting a preset number of prefabricated parts from the prefabricated parts to be added to the sliding control to be added to the sliding area.
Optionally, in this embodiment of the present application, the apparatus further includes a sliding control module 705, where the sliding control module 705 is configured to:
receiving a sliding instruction operated by a user;
analyzing the sliding instruction to obtain a corresponding offset;
calculating the target position of each prefabricated part after the deviation according to the height of the prefabricated part and the deviation amount;
judging whether the target position corresponding to each prefabricated part is in the sliding area;
if the prefabricated member is in the sliding area, the prefabricated member is moved to a corresponding target position; and if the prefabricated member is not in the sliding area, adding the prefabricated member into a cache pool.
In summary, the embodiments of the present application provide a method and an apparatus for generating a user interface, where controls required by multiple user interfaces are uniformly encapsulated, a sliding control and a function control required by an interface to be generated are searched from a preconfigured control list when the user interface is generated, and then the function controls are combined according to a preset typesetting rule to obtain a prefabricated part; and finally, adding the prefabricated member into a preset area in the sliding control, writing data information to be displayed into a corresponding position in the prefabricated member, and generating a user interface. By the method and the device, the control required by various user interfaces can be prevented from being manufactured respectively, so that the development efficiency of the user interfaces is improved, and the later maintenance cost is reduced.
It should be noted that the apparatuses and methods disclosed in the embodiments of the present application can also be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
The above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (3)

1. A method for generating a user interface, the method comprising:
searching a target control required by an interface to be generated from a pre-configured control list, wherein the target control comprises a sliding control and a plurality of functional controls;
combining the functional controls according to a preset typesetting rule to obtain a prefabricated member;
acquiring data information to be displayed;
adding the prefabricated part into a preset area in the sliding control part, writing the data information to be displayed into a corresponding position in the prefabricated part, and generating a user interface;
wherein the slide control comprises a slide area, and the step of adding the preform to a preset area in the slide control comprises:
determining the number of preforms to be added to the sliding control and the height of each preform;
calculating the total height required by the prefabricated member for containing the sliding control to be added according to the number and the height;
determining a sliding area of the sliding control according to the total height;
adding the preform to be added to the sliding control to the sliding region;
detecting whether the total height is greater than a preset threshold value;
when the total height is larger than a preset threshold value, determining the sliding area according to a preset height, and selecting a preset number of prefabricated parts from the prefabricated parts to be added into the sliding control to be added into the sliding area;
adding the prefabricated parts exceeding the preset number into a cache pool so as to be directly called for displaying when a user slides a user interface;
the method further comprises the following steps:
receiving a sliding instruction operated by a user;
adjusting the position of the preform in the sliding region according to the sliding instruction;
the step of adjusting the position of the preform in the sliding region according to the sliding instruction comprises:
analyzing the sliding instruction to obtain a corresponding offset;
calculating the target position of each prefabricated part after the deviation according to the height of the prefabricated part and the deviation amount;
judging whether the target position corresponding to each prefabricated part is in the sliding area;
if the prefabricated member is in the sliding area, the prefabricated member is moved to a corresponding target position; and if the prefabricated member is not in the sliding area, adding the prefabricated member into a cache pool.
2. The method of claim 1, wherein the method further comprises:
receiving an instruction for deleting the prefabricated part;
and removing the prefabricated member corresponding to the instruction from the sliding area, and adding the removed prefabricated member into a cache pool.
3. An apparatus for generating a user interface, the apparatus comprising:
the searching module is used for searching a target control required by the interface to be generated from a pre-configured control list, and the target control comprises a sliding control and a plurality of functional controls;
the combination module is used for combining the function controls according to a preset typesetting rule to obtain a prefabricated member;
the acquisition module is used for acquiring data information to be displayed;
the generating module is used for adding the prefabricated part into a preset area in the sliding control part, writing the data information to be displayed into a corresponding position in the prefabricated part and generating a user interface;
the sliding control comprises a sliding area, and the generation module is specifically configured to:
determining the number of preforms to be added to the sliding control and the height of each preform;
calculating the total height required by the prefabricated member for containing the sliding control to be added according to the number and the height;
determining a sliding area of the sliding control according to the total height;
adding the preform to be added to the sliding control to the sliding region;
the generation module is further to:
detecting whether the total height is greater than a preset threshold value;
when the total height is larger than a preset threshold value, determining the sliding area according to a preset height, and selecting a preset number of prefabricated parts from the prefabricated parts to be added to the sliding control to be added to the sliding area;
the generation module is further to:
adding the prefabricated parts exceeding the preset number into a cache pool so as to be directly called for displaying when a user slides a user interface;
the device also includes a slip control module to:
receiving a sliding instruction operated by a user;
analyzing the sliding instruction to obtain a corresponding offset;
calculating the target position of each prefabricated part after the deviation according to the height of the prefabricated part and the deviation amount;
judging whether the target position corresponding to each prefabricated part is in the sliding area;
if the prefabricated member is in the sliding area, the prefabricated member is moved to a corresponding target position; and if the prefabricated member is not in the sliding area, adding the prefabricated member into a cache pool.
CN201811552375.3A 2018-12-19 2018-12-19 User interface generation method and device Active CN109656557B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811552375.3A CN109656557B (en) 2018-12-19 2018-12-19 User interface generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811552375.3A CN109656557B (en) 2018-12-19 2018-12-19 User interface generation method and device

Publications (2)

Publication Number Publication Date
CN109656557A CN109656557A (en) 2019-04-19
CN109656557B true CN109656557B (en) 2022-08-05

Family

ID=66114635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811552375.3A Active CN109656557B (en) 2018-12-19 2018-12-19 User interface generation method and device

Country Status (1)

Country Link
CN (1) CN109656557B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196920A (en) * 2016-12-08 2018-06-22 武汉斗鱼网络科技有限公司 A kind of display processing method and device at UI interfaces
CN108228287A (en) * 2016-12-15 2018-06-29 龙芯中科技术有限公司 The generation method and device of user interface controls based on QT

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9075519B2 (en) * 2012-10-11 2015-07-07 Apple Inc. System and method for interacting with a displayed work space
CN106201280B (en) * 2016-07-07 2020-03-31 北京京东尚科信息技术有限公司 Method and device for controlling sliding display
CN108829331B (en) * 2018-05-25 2022-01-14 北京五八信息技术有限公司 Monitoring processing method of sliding event and terminal equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196920A (en) * 2016-12-08 2018-06-22 武汉斗鱼网络科技有限公司 A kind of display processing method and device at UI interfaces
CN108228287A (en) * 2016-12-15 2018-06-29 龙芯中科技术有限公司 The generation method and device of user interface controls based on QT

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Android Scroll滑动分析;一个有故事的程序员;《https://www.jianshu.com/p/64a1cf4c4184》;20170919;第1-8页 *
Scrolllview与ListView滑动冲突解决;YoungerDev;《https://www.jianshu.com/p/4cbe7515ef12》;20170625;第1-3页 *

Also Published As

Publication number Publication date
CN109656557A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
US20190370095A1 (en) Method and device for preloading application, storage medium and intelligent terminal
WO2019214417A1 (en) Method for preloading application, storage medium, and terminal
US20140089824A1 (en) Systems And Methods For Dynamically Altering A User Interface Based On User Interface Actions
EP3575963A2 (en) Method for preloading application, storage medium, and terminal
JP6220079B2 (en) Display control apparatus, display control method, and display control program
CN112114734A (en) Online document display method and device, terminal and storage medium
US10207186B2 (en) Method for controlling a user interface
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
CN107025173B (en) Method and device for testing function execution time
CN110413161B (en) Component configuration method and device and electronic equipment
CN114115681A (en) Page generation method and device, electronic equipment and medium
CN109656557B (en) User interface generation method and device
CN108604142B (en) Touch screen device operation method and touch screen device
CN113641936A (en) Method and device for page jump, electronic equipment and storage medium
CN108769149B (en) Application partition processing method and device and computer readable storage medium
CN114510308B (en) Method, device, equipment and medium for storing application page by mobile terminal
CN116309999A (en) Driving method and device for 3D virtual image, electronic equipment and storage medium
CN113268301B (en) Animation generation method, device, equipment and storage medium
EP3115898B1 (en) Method for generating user-level events for an application
JP2019013297A (en) Game program, recording medium, method, and information processing device
CN112578961A (en) Application identifier display method and device
CN112581589A (en) View list layout method, device, equipment and storage medium
CN111797933B (en) Template matching method, device, electronic equipment and storage medium
CN114842474B (en) Character recognition method, device, electronic equipment and medium
US10997341B1 (en) System editing plugin

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant