CN108694028B - Android system-based double-screen display method and electronic equipment - Google Patents
Android system-based double-screen display method and electronic equipment Download PDFInfo
- Publication number
- CN108694028B CN108694028B CN201710152583.3A CN201710152583A CN108694028B CN 108694028 B CN108694028 B CN 108694028B CN 201710152583 A CN201710152583 A CN 201710152583A CN 108694028 B CN108694028 B CN 108694028B
- Authority
- CN
- China
- Prior art keywords
- view
- eye view
- source
- display
- displayed
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1423—Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a double-screen display method based on an android system and electronic equipment, wherein the method comprises the following steps: loading a layout file of an object to be displayed; drawing based on the layout file to generate a source view of the object to be displayed; copying the source view to generate a copy view; displaying the source view and the duplicate view as a left eye view and a right eye view of an electronic device, respectively. The method is used for solving the technical problems that in the prior art, when single-screen display of the android system is modified into double-screen display suitable for VR equipment, a large amount of time needs to be consumed, and accuracy is low, and the technical effects of saving modification time and improving accuracy are achieved.
Description
Technical Field
The invention relates to the field of interface display, in particular to a dual-screen display method based on an android system and electronic equipment.
Background
Android (Android) is a Linux-based operating system with free and open source codes, and is mainly used for mobile devices such as smart phones and tablet computers.
Because the conventional mobile device adopting the android system only needs one display interface, and a Virtual Reality (VR) device needs two left and right display interfaces, namely a left-eye display interface and a right-eye display interface, which are respectively provided for the left eye and the right eye of a user to watch, when the conventional android system is applied to the VR device, the original display interfaces of the android system are as follows: the dialog box can not meet the requirement of VR equipment, and a plurality of places need to be manually arranged with left and right two same views, so that the single-screen display of the conventional android system is modified into the double-screen display suitable for the VR equipment.
Can, exist among the prior art, when changing the single-screen display of android system into the double-screen display of adaptation VR equipment, need consume a large amount of time, and the low technical problem of accuracy.
Disclosure of Invention
The invention aims to provide a dual-screen display method based on an android system and electronic equipment, and aims to solve the technical problems that in the prior art, a large amount of time is consumed and the accuracy is low when single-screen display of the android system is modified to be adaptive to dual-screen display of VR equipment.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a dual-screen display method based on an android system, including:
loading a layout file of an object to be displayed;
drawing based on the layout file to generate a source view of the object to be displayed;
copying the source view to generate a copy view;
displaying the source view and the duplicate view as a left eye view and a right eye view of an electronic device, respectively.
Optionally, displaying the source view and the copy view as a left eye view and a right eye view of the electronic device respectively includes:
adding the source view and the copy view to a view container in a predetermined layout of the left eye view and the right eye view;
displaying the source view and the duplicate view in the view container on a display screen of the electronic device.
Optionally, the method further includes:
acquiring the pupil distance of a user;
setting display positions of the left eye view and the right eye view on the display screen according to the interpupillary distance so that a distance between the left eye view and the right eye view matches the interpupillary distance.
Optionally, the object to be displayed is a dialog box or a browser display interface.
A second aspect of an embodiment of the present invention provides an electronic device, including:
the loading module is used for loading a layout file of an object to be displayed;
the drawing module is used for drawing based on the layout file and generating a source view of the object to be displayed;
the copying module is used for copying the source view and generating a copy view;
and the display module is used for displaying the source view and the copy view as a left eye view and a right eye view of the electronic equipment respectively.
Optionally, the display module includes:
an adding submodule, configured to add the source view and the copy view to a view container according to a predetermined layout manner of the left-eye view and the right-eye view;
a display sub-module for displaying the source view and the duplicate view in the view container on a display screen of the electronic device.
Optionally, the electronic device further includes:
the acquisition module is used for acquiring the pupil distance of a user;
and the setting module is used for setting the display positions of the left eye view and the right eye view on the display screen according to the interpupillary distance, so that the distance between the left eye view and the right eye view is matched with the interpupillary distance.
Optionally, the object to be displayed is a dialog box or a browser display interface.
One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
in the scheme of the embodiment of the invention, the source view of the object to be displayed is generated by loading the layout file of the object to be displayed and drawing based on the layout file, then the source view is copied to generate the copy view, and the source view and the copy view are respectively used as the left view and the right eye view of the electronic equipment to be displayed. Therefore, when the layout file of the object to be displayed is a single-screen display file, the source view is copied to generate a copy view, the source view and the copy view are respectively used as a left eye view and a right eye view of the VR device to be displayed, the single-screen display can be automatically arranged into double-screen display, and the technical problems that in the prior art, when the single-screen display of an android system is changed into the double-screen display adapting to the VR device, a large amount of time is consumed, and the accuracy is low are solved, so that the modification time is saved, and the accuracy is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise:
fig. 1 is a flowchart of a dual-screen display method based on an android system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of functional modules of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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 invention.
In the embodiment of the invention, the electronic device can be VR device, AR (Augmented Reality) device and the like. The dual-screen display refers to that the electronic device displays views including a left-eye view and a right-eye view, which are provided for the left eye and the right eye of the user to watch. The electronic device may include a display screen on which a left-eye view is displayed on a partial region and a right-eye view is displayed on another partial region; the electronic device may also include two display screens, with a left eye view displayed on one display screen and a right eye view displayed on the other display screen.
In the embodiment of the present invention, the dual-screen display method may be based on an android system, or may be based on an apple system or a microsoft system, and the present invention is not limited thereto.
Referring to fig. 1, fig. 1 is a flowchart of a dual-screen display method based on an android system according to an embodiment of the present invention, where the method includes the following steps.
And step 10, loading a layout file of the object to be displayed.
In step 10, the object to be displayed may be a dialog box, a browser display interface, or the like. The dialog box is an interface which is popped up on the display screen and can enable a user to make a selection or input additional information, and the dialog box does not occupy the whole display screen; the browser display interface refers to a window display interface of a browser when the device runs the browser.
The layout file of the object to be displayed may be a layout file of the android system, the layout files of the android system are all single-screen display files, and the layout file of the object to be displayed may also be a single-screen display file added by a system developer of the VR device, which is not limited in this respect.
And step 11, drawing based on the layout file, and generating a source view of the object to be displayed.
In step 11, the system draws one or more layers included in the layout file to generate a source view. For example, assuming that the object to be displayed is a dialog box, the dialog box may include a plurality of layers, which are the top name, the middle information, and the bottom button of the dialog box, respectively, and when drawing, the system draws the name, the information, and the button of the dialog box, thereby generating a source view of the dialog box.
And 12, copying the source view to generate a copy view.
In a specific implementation process, when the source view is drawn in step 11, a snoop function may be added to obtain a cached picture, where the cached picture is the source view, and then an Imageview is defined, and a picture resource of the Imageview is set to be the cached picture obtained in step 11, so that the function of the Imageview is to copy a view generated after the source view is drawn. For example, the above object to be displayed is taken as a dialog box, the source view of the dialog box includes a name, information, and a button, and the copy view also includes a name, information, and a button.
And step 13, displaying the source view and the copy view as a left eye view and a right eye view of the electronic equipment respectively.
Specifically, after the source view and the copy view are generated in steps 11 and 12, the source view may be displayed as a left-eye view, and the copy view may be displayed as a right-eye view; or the source view is displayed as a right-eye view, and the copy view is displayed as a left-eye view, so that the method is suitable for the double-screen display of the VR device.
Therefore, by means of the scheme, the layout files of the android system, namely the single-screen display files, or the single-screen display files added by the developer of the VR equipment can be automatically arranged into the double-screen display files to be provided for the VR equipment to display, the developer does not need to search the single-screen display files of the android system one by one and modify the single-screen display files, modification time is saved, and accuracy is improved.
It should be noted that, when a single-screen display file of the android system is modified manually, a left-eye view and a right-eye view of a manual layout are the same, in the scheme of the embodiment of the present invention, by copying a source view, and displaying the source view and the copied view as a left-eye view and a right-eye view, respectively, the display effect of modifying the single-screen display file one by one is the same.
In a specific implementation process, step 13 includes adding the source view and the duplicate view to a view container according to a predetermined layout manner of the left-eye view and the right-eye view, and then displaying the source view and the duplicate view in the view container on a display screen of the electronic device.
In an embodiment of the invention, a view (view) is a data structure in which data of the layout and content properties of a specific area on a display screen are stored, and a view container (ViewGroup) is a container of views through which views can be added. In this embodiment of the present invention, the source view and the copy view may be added to the view container according to a predetermined layout manner corresponding to the left-eye view and the right-eye view, where the predetermined layout manner may be: placing a source view on the left side of the container, placing a copy view on the right side of the container, and displaying the source view as a left eye view and the copy view as a right eye view during display; alternatively, the predetermined layout may be: and placing the source view on the right side of the container, placing the copy view on the left side of the container, and displaying the source view as a right eye view and the copy view as a left eye view during display.
Then, the source view and the duplicate view in the view container are displayed on a display screen of the electronic device. Specifically, the system application invokes the surfacemaker service and communicates with the surfacemaker service to render the data in the view container (including the source view and the copy view) onto a hardware frame buffer of the system, and the VR device then displays the data in the frame buffer onto a display screen. The surface flag service refers to a system service of the android system, and is responsible for managing a frame buffer of the android system, namely a display screen.
In the embodiment of the present invention, in order to make the left eye view and the right eye view finally displayed by the electronic device adapt to the interpupillary distance of the user and alleviate the visual fatigue of the user, the method further includes: and acquiring the pupil distance of a user, and setting the display positions of the left eye view and the right eye view on the display screen according to the pupil distance so that the distance between the left eye view and the right eye view is matched with the pupil distance.
The pupil distance of the user can be a value preset in the VR device, or a value obtained by shooting human eye images and analyzing and calculating the images after the user wears the VR device; then, according to the pupil distance value, the display positions of the left eye view and the right eye view on the display screen are set, so that the distance between the left eye view and the right eye view is the same as the pupil distance of the user, and the technical effect of relieving the visual fatigue of the user is achieved. The distance between the left eye view and the right eye view refers to the distance between the center point of the left eye view and the center point of the right eye view.
In a specific implementation process, offset values of the left-eye view and the right-eye view in the display screen may be set, and the offset values may be values offset to the left or values offset to the right, so as to set display positions of the left-eye view and the right-eye view on the display screen. Of course, the coordinate positions of the left eye view and the right eye view on the display screen may also be directly set, so as to set the display positions of the left eye view and the right eye view on the display screen, which is not limited in the present invention.
Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, as shown in fig. 2, including:
a loading module 20, configured to load a layout file of an object to be displayed;
the drawing module 21 is configured to draw based on the layout file, and generate a source view of the object to be displayed;
a copy module 22, configured to copy the source view to generate a copy view;
a display module 23, configured to display the source view and the copy view as a left eye view and a right eye view of the electronic device, respectively.
Optionally, the display module 23 includes:
an adding submodule, configured to add the source view and the copy view to a view container according to a predetermined layout manner of the left-eye view and the right-eye view;
a display sub-module for displaying the source view and the duplicate view in the view container on a display screen of the electronic device.
Optionally, the electronic device further includes:
the acquisition module is used for acquiring the pupil distance of a user;
and the setting module is used for setting the display positions of the left eye view and the right eye view on the display screen according to the interpupillary distance, so that the distance between the left eye view and the right eye view is matched with the interpupillary distance.
Optionally, the object to be displayed is a dialog box or a browser display interface.
One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
in the scheme of the embodiment of the invention, the source view of the object to be displayed is generated by loading the layout file of the object to be displayed and drawing based on the layout file, then the source view is copied to generate the copy view, and the source view and the copy view are respectively used as the left view and the right eye view of the electronic equipment to be displayed. Therefore, when the layout file of the object to be displayed is a single-screen display file, the source view is copied to generate a copy view, the source view and the copy view are respectively used as a left eye view and a right eye view of the VR device to be displayed, the single-screen display can be automatically arranged into double-screen display, and the technical problems that in the prior art, when the single-screen display of an android system is changed into the double-screen display adapting to the VR device, a large amount of time is consumed, and the accuracy is low are solved, so that the modification time is saved, and the accuracy is improved.
All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.
Any feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.
The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed.
Claims (6)
1. A dual-screen display method based on an android system is characterized by comprising the following steps:
loading a layout file of an object to be displayed; the object to be displayed is a dialog box or a browser display interface in the android system;
drawing based on the layout file to generate a source view of the object to be displayed;
when the source view is drawn, adding a monitoring function, obtaining a cache picture, and taking the cache picture as a copy view;
displaying the source view and the duplicate view as a left eye view and a right eye view of an electronic device, respectively.
2. The method of claim 1, wherein displaying the source view and the duplicate view as a left eye view and a right eye view, respectively, of an electronic device comprises:
adding the source view and the copy view to a view container in a predetermined layout of the left eye view and the right eye view;
displaying the source view and the duplicate view in the view container on a display screen of the electronic device.
3. The method of claim 2, wherein the method further comprises:
acquiring the pupil distance of a user;
setting display positions of the left eye view and the right eye view on the display screen according to the interpupillary distance so that a distance between the left eye view and the right eye view matches the interpupillary distance.
4. An electronic device, comprising:
the loading module is used for loading a layout file of an object to be displayed; the object to be displayed is a dialog box or a browser display interface in the android system;
the drawing module is used for drawing based on the layout file and generating a source view of the object to be displayed;
the copying module is used for adding a monitoring function when the source view is drawn, acquiring a cache picture and taking the cache picture as a copied view;
and the display module is used for displaying the source view and the copy view as a left eye view and a right eye view of the electronic equipment respectively.
5. The electronic device of claim 4, wherein the display module comprises:
an adding submodule, configured to add the source view and the copy view to a view container according to a predetermined layout manner of the left-eye view and the right-eye view;
a display sub-module for displaying the source view and the duplicate view in the view container on a display screen of the electronic device.
6. The electronic device of claim 5, wherein the electronic device further comprises:
the acquisition module is used for acquiring the pupil distance of a user;
and the setting module is used for setting the display positions of the left eye view and the right eye view on the display screen according to the interpupillary distance, so that the distance between the left eye view and the right eye view is matched with the interpupillary distance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710152583.3A CN108694028B (en) | 2017-03-15 | 2017-03-15 | Android system-based double-screen display method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710152583.3A CN108694028B (en) | 2017-03-15 | 2017-03-15 | Android system-based double-screen display method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108694028A CN108694028A (en) | 2018-10-23 |
CN108694028B true CN108694028B (en) | 2022-01-07 |
Family
ID=63841750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710152583.3A Active CN108694028B (en) | 2017-03-15 | 2017-03-15 | Android system-based double-screen display method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108694028B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123110A (en) * | 2013-04-26 | 2014-10-29 | 上海赤炫信息科技有限公司 | Android double-screen extraordinary image display method |
CN104216841A (en) * | 2014-09-15 | 2014-12-17 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN104407829A (en) * | 2014-11-06 | 2015-03-11 | 北京凌阳益辉科技有限公司 | Method and device thereof for displaying image mirror |
WO2016023160A1 (en) * | 2014-08-11 | 2016-02-18 | 华为技术有限公司 | Method and device for loading view of application and electronic terminal |
CN105808184A (en) * | 2016-02-24 | 2016-07-27 | 北京小鸟看看科技有限公司 | Method and device for displaying Android 2D (Two-dimensional) application image, and headset equipment |
CN106293588A (en) * | 2016-08-26 | 2017-01-04 | 青岛海信移动通信技术股份有限公司 | Double-screen display method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103106058B (en) * | 2013-01-25 | 2017-08-25 | Tcl集团股份有限公司 | A kind of double-screen display method and intelligent display terminal based on android system |
-
2017
- 2017-03-15 CN CN201710152583.3A patent/CN108694028B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123110A (en) * | 2013-04-26 | 2014-10-29 | 上海赤炫信息科技有限公司 | Android double-screen extraordinary image display method |
WO2016023160A1 (en) * | 2014-08-11 | 2016-02-18 | 华为技术有限公司 | Method and device for loading view of application and electronic terminal |
CN104216841A (en) * | 2014-09-15 | 2014-12-17 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN104407829A (en) * | 2014-11-06 | 2015-03-11 | 北京凌阳益辉科技有限公司 | Method and device thereof for displaying image mirror |
CN105808184A (en) * | 2016-02-24 | 2016-07-27 | 北京小鸟看看科技有限公司 | Method and device for displaying Android 2D (Two-dimensional) application image, and headset equipment |
CN106293588A (en) * | 2016-08-26 | 2017-01-04 | 青岛海信移动通信技术股份有限公司 | Double-screen display method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108694028A (en) | 2018-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113225427B (en) | Image display method and terminal equipment | |
US10089957B2 (en) | Page display method and terminal | |
US11574613B2 (en) | Image display method, image processing method and relevant devices | |
EP2953122A1 (en) | Method and apparatus for processing images | |
US10928897B2 (en) | Foveated rendering | |
US11050968B2 (en) | Method for driving display including curved display area, display driving circuit supporting the same, and electronic device including the same | |
JP2014165766A (en) | Content creation device, content distribution server, and content creation method | |
CN108228121B (en) | Browser split screen method and device and mobile terminal | |
WO2022194003A1 (en) | Screen capture method and apparatus, electronic device, and readable storage medium | |
CN106202089B (en) | Method and equipment for determining picture quality and webpage display | |
KR20150081765A (en) | Outputting Method For Screen data And Electronic Device supporting the same | |
CN108989869A (en) | Video pictures playback method, device, equipment and computer readable storage medium | |
CN106970467B (en) | Information display method and head-mounted display equipment | |
EP3092613B1 (en) | Image processing method and electronic device implementing the same | |
CN104090706B (en) | Content acquisition method, content share method and its device | |
CN110442313B (en) | Display attribute adjusting method and related equipment | |
KR102164686B1 (en) | Image processing method and apparatus of tile images | |
CN110765384A (en) | Resolution adaptation method of client, storage medium and terminal | |
US20160077659A1 (en) | Method and apparatus for processing display data in electronic device | |
CN108694028B (en) | Android system-based double-screen display method and electronic equipment | |
CN105389308A (en) | Display processing method and device for web pages | |
CN109766530B (en) | Method and device for generating chart frame, storage medium and electronic equipment | |
CN111325702B (en) | Image fusion method and device | |
CN111198858A (en) | File processing method and device, computer storage medium and terminal | |
US11650421B1 (en) | Wearable display solutions for presbyopic ametropia |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200708 Address after: No.18 Xilin 1st Street, Chenghua District, Chengdu, Sichuan 610051 Applicant after: Chengdu Ideal Zhimei Technology Co.,Ltd. Address before: Two road 610041 Sichuan city of Chengdu province Chengdu high tech Zone Tianhua No. 219 Building 1 unit 2 1 floor No. 3 Applicant before: CHENGDU IDEALENS TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |