Method for adapting horizontal and vertical screen interfaces of waterfall flow application on smart television

A smart TV, horizontal and vertical screen technology, applied in the direction of user interface execution, electrical digital data processing, instruments, etc., can solve the problems of increasing development costs and reducing development efficiency

Pending Publication Date: 2022-01-07
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the interface development stage, two sets of layout files, horizontal and vertical, are written in a targeted manner, which increases development costs and reduces development efficiency

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 for adapting horizontal and vertical screen interfaces of waterfall flow application on smart television

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0026] The first step is to keep the size unit in the application consistent, all of which are dp, including the size unit used in the xml layout file and code;

[0027] In the second step, in Android, the conversion relationship between px and dp:

[0028] px=dp*density (1)

[0029] density=densityDpi / standard dpi 160 (2)

[0030] It can be seen from formula (1) that modifying the density and densityDpi of DisplayMertics can affect the final pixel value displayed on the screen. We take the screen width as the dimension and keep this dimension consistent with the design drawing.

[0031] Taking the design drawing as 1920x1080px as an example, the conversion to dp is 1280x720dp, and the width of the design drawing is 720dp. The width and height of the screen under the horizontal screen is 1080x1920px, which is adapted by the width. After adaptation, the density = the real width of the device (unit: px) / the reference width of the design drawing = 1080 / 1280 = 0.84375, densit...

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 relates to the field of smart television screen adaptation, in particular to a method for horizontal and vertical screen interface adaptation of a waterfall flow application on a smart television, and achieves the effect of horizontal and vertical screen adaptation under the condition that a set of vertical screen UI does not need to be additionally designed. The method for adapting the horizontal screen interface and the vertical screen interface of the waterfall flow application on the smart television comprises the steps: standardizing an internal size unit of the application, and marking the width, height and position information of a control through dp, wherein the internal size unit of the application comprises an xml layout file and a size unit used in a code; carrying out the adaptive parameter calculation according to the design drawing width and the current screen width, and keeping the dimension of the screen width consistent with the design drawing; and according to an adaptive parameter calculation result, modifying corresponding parameters in an onCreate() method of Activity to realize horizontal and vertical screen interface adaptation. The method is suitable for the horizontal and vertical screen interface adaptation of the waterfall flow application on the smart television.

Description

technical field [0001] The invention relates to the field of smart TV screen adaptation, in particular to a method for adapting a horizontal and vertical screen interface of a waterfall application on a smart TV. Background technique [0002] The interface adaptation of Android applications for horizontal and vertical screens is usually to set two sets of interface layouts for horizontal and vertical versions. When the device switches between horizontal and vertical screens, the life cycle of the application will be repeated, and the layout file in the corresponding state will be loaded according to the current screen state. [0003] The following describes two general interface adaptation methods for horizontal and vertical screens. The first method only needs to write the corresponding layout files under res / layout-land and res / layout-port, without modifying the code, the system will load the layout files under layout-land or layout-port according to the screen status; Th...

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): G06F9/451G06F8/38
CPCG06F9/451G06F8/38
Inventor 雷媛媛李金国
Owner SICHUAN CHANGHONG ELECTRIC 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