Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for realizing horizontal and vertical screen

An implementation method, horizontal and vertical screen technology, applied in the computer field, can solve problems such as error-prone, difficult to maintain gift panel logic, poor program maintainability, etc.

Active Publication Date: 2020-05-12
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since there are many different business logics in the horizontal and vertical screen state, all related business logic in the horizontal and vertical screen state is mixed in the gift panel
With the continuous increase of business functions, the logic in the gift panel is becoming more and more difficult to maintain, and even a small change may introduce various errors
[0004] Therefore, in the prior art, the business logic in the state of horizontal and vertical screens is coupled together, errors are prone to occur during modification, and the maintainability of the program is poor.

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
  • Method and device for realizing horizontal and vertical screen
  • Method and device for realizing horizontal and vertical screen
  • Method and device for realizing horizontal and vertical screen

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] 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.

[0046] In one embodiment of the present invention, a method for realizing horizontal and vertical screens is provided, figure 1 It is a schematic diagram of the overall flow of the method for realizing the horizontal and vertical screen provided by the embodiment of the present invention. In general, the method includes: S1, defining a first business logic class of an abstract type for the business logic of the horizontal and vertical screens; in the first business logic class, defining different business logics corresponding to the horizontal and vertical screens The concrete function corresponding to the abstract function and the same business logic, realizes the same b...

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 an implementation method and device of a screen in a portrait mode and a screen in a landscape mode. The method comprises the steps of 1, defining abstract functions corresponding to different service logic and specific functions corresponding to same service logic between the screen in the portrait mode and the screen in the landscape mode in a first service logic class; 2, defining a second service logic class of the screen in the portrait mode and a third service logic class of the screen in the landscape mode, wherein the second service logic class and the third service logic class inherit the first service logic class; 3, duplicating the abstract functions in the first service logic class in the second service logic class and the third service logic class. According to the implementation method and device, by defining the abstract functions corresponding to the different service logic between the screen in the portrait mode and the screen in the landscape mode in an abstract class and delaying the abstract functions into sub-classes for instantiation operation, on one hand, sharing of the same service logic between the screen in the portrait mode and the screen in the landscape mode is achieved; one the other hand, the service logic of the screen in the portrait mode and the service logic of the screen in the landscape mode are decoupled, and the maintainability and expansibility of a program are improved.

Description

technical field [0001] The present invention relates to the field of computer technology, and more specifically, to a method and device for realizing horizontal and vertical screens. Background technique [0002] In the development process of live broadcast software, there is usually a gift module, through which users can give gifts to favorite anchors. Usually the player has two layouts, one is horizontal screen playback, and the other is vertical screen playback. When the player is played in landscape mode, the entire player occupies the entire width of the screen. When the player is played in portrait mode, the player interface only occupies the upper half of the screen. Due to the different states of the horizontal and vertical screens, the presenting methods of the gift interface in the horizontal and vertical screens are different. [0003] In the current development method, logical judgment is made in the gift panel. If it is judged that the current screen is in lan...

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 Patents(China)
IPC IPC(8): G06F9/451
CPCG06F9/451
Inventor 张磊陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD