CN110290269A - Display control method, mobile terminal and computer readable storage medium - Google Patents
Display control method, mobile terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN110290269A CN110290269A CN201910562374.5A CN201910562374A CN110290269A CN 110290269 A CN110290269 A CN 110290269A CN 201910562374 A CN201910562374 A CN 201910562374A CN 110290269 A CN110290269 A CN 110290269A
- Authority
- CN
- China
- Prior art keywords
- application program
- interface
- display
- display direction
- flag bit
- 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.)
- Pending
Links
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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72469—User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
This application provides a kind of display control methods, comprising: when running the first application program on mobile terminals, flag bit is arranged for the first application program in the life cycle of activity;When the second application program is activated, judge whether the interface of the first application program is shown on home interface according to flag bit;When showing on home interface, obtains the display direction at the interface of the second application program and judge whether to need to adjust the display direction at the interface of the second application program;If it is determined that needing to adjust display direction, then display direction is adjusted;And when exiting the second application program and being back to the first application program, flag bit is reset.Present invention also provides a kind of mobile terminal and computer readable storage mediums.Such mode can realize that the display direction at the interface of subsequent second application program is identical as the display direction at the interface of the first application program, promote user experience by adjusting the display direction at the interface of the second application program.
Description
Technical field
This application involves technical field of mobile terminals more particularly to a kind of display control methods, mobile terminal and computer
Readable storage medium storing program for executing.
Background technique
Existing mobile terminal (such as mobile phone) has become essential electronic equipment in people's daily life.With shifting
Dynamic terminal is constantly intelligent, is all mounted with operating system in most mobile terminals, mobile terminal is installed abundant more
The application program of sample, meets the needs of user is different.
Currently, many application programs support transverse screen or vertical screen display, rotational display window is not supported, when the starting application
When program, the display direction at the interface of the application program is fixed transverse screen or vertical screen display.At this point, if starting other thoroughly
The application program and other applications of bright or non-full frame state are different from the display direction of the application program started before, mobile
The interface display of the display direction for the application program that terminal starts before may adjusting, the application program started before causing is different
Often.
Summary of the invention
The main purpose of the application is to propose a kind of display control method, mobile terminal and computer-readable storage medium
Matter, it is intended to by adjusting the display direction at the interface of the second application program, realize the display at the interface of subsequent second application program
Direction is identical as the display direction at the interface of the first application program, to promote user experience.
To achieve the above object, this application provides a kind of display control method, the display control method is applied to move
Dynamic terminal, the display control method includes: when running the first application program on the mobile terminal, activity's
It is the first application program setting flag bit in life cycle;When the second application program is activated, according to the flag bit
Judge whether the interface of first application program is shown on home interface;When the interface of first application program is still shown
When on the home interface, obtains the display direction at the interface of second application program and judge whether to need described in adjustment
The display direction at the interface of the second application program;If it is determined that need to adjust the display direction at the interface of second application program,
Then the display direction at the interface of second application program is adjusted;And works as and exit second application program and be back to
When first application program, the flag bit is reset.
Optionally, described is the step of flag bit is arranged in first application program in the life cycle of activity,
It include: that flag bit is set in the life cycle onCreate and onStart of activity for false, in the life of activity
Ordering period onPause and onStop setting flag bit is true.
Optionally, described to judge whether the interface of first application program is shown in home interface according to the flag bit
On step, comprising: when the onPause flag bit be true when, determine the interface display of first application program in institute
It states on home interface.
Optionally, the display control method further include: when the onPause flag bit is true, determine described the
The interface of two application programs is pellucidity or non-full frame state on the home interface.
Optionally, the step of display direction at the interface for judging whether to need to adjust second application program, packet
Include: judge the interface of second application program display direction whether the display direction with the interface of first application program
It is identical;And if the display direction at the interface of the display direction at the interface of second application program and first application program is not
It is identical, it is determined that need to adjust the display direction at the interface of second application program.
Optionally, described if it is determined that after the step of needing to adjust the display direction at the interface of second application program,
Further include: the status attribute for obtaining the window where the interface of second application program, to the boundary of second application program
The status attribute of window where face carries out loop modification;And the window is rotated according to modified status attribute,
It is adjusted with the display direction at the interface to second application program, so that the display at the interface of second application program
Direction is identical as the display direction at interface of first application program.
Optionally, the display control method, further includes: when the onPause flag bit is true, not to described the
Window where the interface of one application program is rotated.
Optionally, the described the step of flag bit is reset, comprising: when in the life cycle for calling activity
OnDestroy when, reset the flag bit be false.
The application also provides a kind of mobile terminal, and the mobile terminal includes: touch screen;Processor;Memory, and it is described
Processor connection, the memory include control instruction, when the processor reads the control instruction, control the movement
Terminal realizes above-mentioned display control method.
The application also provides a kind of computer readable storage medium, and the computer readable storage medium has one or more
Program, one or more of programs are executed by one or more processors, to realize above-mentioned display control method.
Display control method, mobile terminal and computer readable storage medium provided by the present application, first when in the shifting
It is the first application program setting mark in the life cycle of activity when running the first application program in dynamic terminal
Position;Secondly when the second application program is activated, judge whether the interface of first application program shows according to the flag bit
Show on home interface;Furthermore when the interface of first application program remains displayed on the home interface, described in acquisition
The display direction at the interface of the second application program and the display side for judging whether to need to adjust the interface of second application program
To;Furthermore if it is determined that needing to adjust the display direction at the interface of second application program, then to second application program
The display direction at interface is adjusted;Finally when exiting second application program and being back to first application program,
The flag bit is reset, to pass through the display direction at the determining interface for needing to adjust second application program
When, the display direction at the interface of second application program is adjusted, realizes the aobvious of the interface of subsequent second application program
Show that direction is identical as the display direction at the interface of the first application program, improves the usage experience of user.Further, when described
When onPause flag bit is true, the window where the interface of first application program is not rotated, to realize not
Adjust the display direction at the interface of the first application program.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
Fig. 1 is the hardware structural diagram for realizing each embodiment one optional mobile terminal of the application;
Fig. 2 is the communications network system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the flow chart for the display control method that one embodiment of the application provides;
Fig. 4 is the structural schematic diagram for the mobile terminal that one embodiment of the application provides.
The embodiments will be further described with reference to the accompanying drawings for realization, functional characteristics and the advantage of the application purpose.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element
Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate
Computer, laptop, palm PC, personal digital assistant (Personal DigitalAssistant, PDA), portable matchmaker
Body player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer etc. are mobile
The fixed terminals such as terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special
Except element for moving purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its mobile terminal of each embodiment to realize the present invention, the shifting
Dynamic terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit
103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit
108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1
Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram,
Perhaps certain components or different component layouts are combined.
It is specifically introduced below with reference to all parts of the Fig. 1 to mobile terminal 100:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating
Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication
Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division
Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need
It to omit within the scope of not changing the essence of the invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100
When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or
The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103
Audio output relevant to the specific function that mobile terminal 100 executes can also be provided (for example, call signal receives sound, disappears
Breath receives sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model.
Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies
Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear
Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general
For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;
The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer,
The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid CrystalDisplay, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal
Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with
And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby
(for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071
Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can
To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc.
It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can
The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically
It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example,
External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number
It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with
For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area
The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function
Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place
Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put
The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system that mobile terminal of the invention is based below into
Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system
System is the LTE system of universal mobile communications technology, which includes UE (User Equipment, the use of successively communication connection
Family equipment) (the land Evolved UMTS Terrestrial Radio Access Network, evolved UMTS 201, E-UTRAN
Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation
204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS
(Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and
Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia
System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only
Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with
And the following new network system etc., herein without limitation.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
Fig. 3 is the flow chart of the embodiment of a display control method provided by the present application.Once the method quilt of the embodiment
User's triggering, then the process in the embodiment passes through 100 automatic running of mobile terminal, wherein each step is when operation
It can be and successively carried out according to the sequence in such as flow chart, be also possible to multiple steps according to the actual situation while carrying out, herein
And without limitation.Display control method provided by the present application includes the following steps:
Step S310, when running the first application program on the mobile terminal 100, in the life cycle of activity
In be first application program setting flag bit;
Step S330 judges first application program according to the flag bit when the second application program is activated
Whether interface is shown on home interface;
Step S350 obtains described the when the interface of first application program remains displayed on the home interface
The display direction at the interface of two application programs and the display direction for judging whether to need to adjust the interface of second application program;
Step S370, however, it is determined that the display direction for needing to adjust the interface of second application program, then to described second
The display direction at the interface of application program is adjusted;
Step S390, when exiting second application program and being back to first application program, to the mark
Position is reset.
By above embodiment, pass through the display direction at the determining interface for needing to adjust second application program
When, the display direction at the interface of second application program is adjusted, realizes the aobvious of the interface of subsequent second application program
Show that direction is identical as the display direction at the interface of the first application program, improves the usage experience of user.
Above-mentioned steps are specifically described below in conjunction with specific embodiment.
In step s310, when running the first application program on the mobile terminal 100, in the life of activity
It is the first application program setting flag bit in period.
Specifically, the first application program only supports transverse screen or vertical screen display, does not support rotary window.The mobile terminal
Operating system is mounted in 100.The operating system can be Android, iOS, BlackBerry OS or windows
Mobile etc..Activity is one and is responsible for the component interacted with user, and providing a screen (can be understood as screen circle
Face, and the display screen of non-physical), so that a certain task is completed in user's interaction.In being managed to Activity, have in this way
Two concepts: Task (task stack) and Stack (active window storehouse).Task corresponds to an application program, and Task is for storing
One or more Activity can be stored in Activity, a Task, and these Activity are followed " after first-in last-out,
Into first going out " principle.And Stack is used to be managed Task, in general, a Stack is to displaying needed for a screen
Task belonging to each Activity is managed, and a Stack can manage one or more Task, and certainly, Stack is also the same
Follow the basic management principle of storehouse.
In the present embodiment, described is the first application program setting flag bit in the life cycle of activity
The step of, comprising:
Step S3101, it is false that flag bit is arranged in the life cycle onCreate and onStart of activity,
Life cycle onPause and onStop the setting flag bit of activity is true.
In the present embodiment, true can indicate to show, false can indicate hiding.Currently, the mobile terminal
100 generally use Android operation system, the Life Cycle of Activity in the window where the interface object of each application program
Phase mainly includes onCreate, onStart, onResume, onPause, onStop, onDestory etc..Wherein, onCreate
Indicate that Activity is being created, this is first method of Activity life cycle.OnStart indicates that Activity exists
On screen from it is invisible become visible when this method be called, at this moment interface can not interact.OnResume shows
Activity has created completion, and can come into play, this when, user can see interface, and i.e.
It will be interacted with user.OnPause indicates that this method is called when Activity is in visible but invisible interactive, Ke Yi
The resource of some consumption CPU is discharged in this method, and saves active state.OnStop indicates that Activity will stop
Only, the recovery operation that can do some slightly heavyweights, equally can not be too time-consuming.OnDestroy indicates that Activity will
Destroyed, this is the last one readjustment of Activity life cycle, can do some recovery operations and resource release.
In the present embodiment, two methods of onCreate and onDestroy are corresponding, are carried out in onCreate method
Various initialization operations, releasing memory etc. operates in onDestroy method.Two methods of onStart and onStop are corresponding
, Activity is always visible for a user between the two methods.Wherein, which can be nontransparent
, it is also possible to translucent, when a translucent Activity is shown on another Activity, is below
Activity can enter onPause life cycle, if at this time in top translucent Activity close, be below
Activity can then enter onResume life cycle.
In step S330, when the second application program is activated, judge that described first applies journey according to the flag bit
Whether the interface of sequence is shown on home interface.
In the present embodiment, described to judge whether the interface of first application program is shown according to the flag bit
Step on home interface, comprising:
Step S3301 determines the interface display of first application program when the onPause flag bit is true
On the home interface.
Specifically, when the life cycle onPause flag bit of the activity of the first application program is true, institute is determined
The interface display of the first application program is stated on the home interface, while determining the interface of second application program described
It is pellucidity or non-full frame state on home interface.
In step S350, when the interface of first application program remains displayed on the home interface, institute is obtained
It states the display direction at the interface of the second application program and judges whether to need to adjust the display at the interface of second application program
Direction.
Specifically, when the onPause flag bit is true, the interface of first application program remains displayed in described
On home interface, the display direction at the interface of second application program is obtained at this time and judges whether to need to adjust described second
The display direction at the interface of application program.
In the present embodiment, the display direction at the interface for judging whether to need to adjust second application program
Step, comprising:
Step S3501, judge the interface of second application program display direction whether with first application program
Interface display direction it is identical;And
Step S3502, if the interface of the display direction at the interface of second application program and first application program
Display direction it is not identical, it is determined that need to adjust the display direction at the interface of second application program.
Specifically, the display direction at the interface of first application program is obtained, and judges second application program
Whether the display direction at interface is identical as the display direction at interface of first application program, if second application program
The display direction at interface is not identical as the display direction at the interface of first application program, it is determined that needs to adjust described second
The display direction at the interface of application program.If being appreciated that the display direction and described the at the interface of second application program
The display direction at the interface of one application program is not identical, it is determined that does not need to adjust the display at the interface of second application program
Direction, while continuation steps S350.
In step S370, however, it is determined that the display direction for needing to adjust the interface of second application program, then to described
The display direction at the interface of the second application program is adjusted.
In the present embodiment, described if it is determined that needing to adjust the step of the display direction at the interface of second application program
After rapid, further includes:
Step S3701 obtains the status attribute of the window where the interface of second application program, answers described second
Loop modification is carried out with the status attribute of the window where the interface of program;
Step S3702 rotates the window according to modified status attribute, to second application program
The display direction at interface be adjusted so that the display direction at the interface of second application program applies journey with described first
The display direction at the interface of sequence is identical.
Specifically, it is determined that obtaining described second after needing to adjust the display direction at the interface of second application program and answering
With the status attribute (window state) of the window where the interface of program, (window surface is controlled in window surface
Control) status attribute of the window where the inner interface to second application program carries out loop modification.Then basis is repaired
Status attribute after changing rotates the window where the interface of second application program, to second application program
The display direction at interface be adjusted so that the display direction at the interface of second application program applies journey with described first
The display direction at the interface of sequence is identical.
In the present embodiment, when running the first application program on the mobile terminal 100, multiple be can star
Two application programs, and in the display direction at the subsequent interface for obtaining multiple second application programs and judge whether to need to adjust
If desired the display direction at the interface of second application program adjusts the aobvious of the interface of the second application program described in more than one
Show direction, then the display direction at the interface for second application program that can successively adjust to needs is adjusted, to guarantee
The display direction at the interface of subsequent multiple second application programs is identical as the display direction at interface of first application program.
In the present embodiment, when the onPause flag bit is true, the interface display of first application program
On the home interface and the interface of second application program is pellucidity or non-full frame shape on the home interface
State does not support rotary window since first application program only supports transverse screen or vertical screen display, therefore, answers described second
When not identical with the display direction at the interface of the display direction and first application program at the interface of program, not to described first
Window where the interface of application program is rotated, and is only adjusted to the display direction at the interface of second application program
It is whole, thus in the display side at the interface for the display direction and first application program for realizing the interface of second application program
To in identical situation, it can also realize that the interface display of first application program is normal, promote the usage experience of user.
In step S390, when exiting second application program and being back to first application program, to described
Flag bit is reset.
In the present embodiment, the described the step of flag bit is reset, comprising:
Step S3901 resets the flag bit as the onDestroy in the life cycle for calling activity
For false.
Specifically, when exiting second application program and being back to first application program, activity is called
Life cycle in onDestroy, reset the flag bit be false, to avoid first application program
The rotation of window where interface causes display abnormal.
By above embodiment, first when running the first application program on the mobile terminal 100,
It is the first application program setting flag bit in the life cycle of activity;Secondly when the second application program is activated,
Judge whether the interface of first application program is shown on home interface according to the flag bit;Furthermore work as described first to answer
When being remained displayed on the home interface with the interface of program, obtains the display direction at the interface of second application program and sentence
The display direction at the disconnected interface for whether needing to adjust second application program;Furthermore if it is determined that needing to adjust second application
The display direction at the interface of program is then adjusted the display direction at the interface of second application program;Finally when exiting
Second application program and when being back to first application program, resets the flag bit, thus by true
When needing to adjust the display direction at the interface of second application program surely, to the display side at the interface of second application program
To being adjusted, the display direction of the display direction at the interface of subsequent second application program and the interface of the first application program is realized
It is identical, improve the usage experience of user.Further, it when the onPause flag bit is true, does not answer described first
It is rotated with the window where the interface of program, to realize the display direction for not adjusting the interface of the first application program.
Fig. 4 is the structure composition schematic diagram of mobile terminal 100 provided by the embodiments of the present application, and mobile terminal 100 includes: touching
Control panel 1071;Processor 110;Memory 109 is connect with the processor 110, and the memory 109 includes control instruction,
When the processor 110 reads the control instruction, controls the mobile terminal 100 and realizes following steps:
It is described in the life cycle of activity when running the first application program on the mobile terminal 100
Flag bit is arranged in first application program;When the second application program is activated, first application is judged according to the flag bit
Whether the interface of program is shown on home interface;When the interface of first application program remains displayed on the home interface
When, it obtains the display direction at the interface of second application program and judges whether to need to adjust the boundary of second application program
The display direction in face;If it is determined that needing to adjust the display direction at the interface of second application program, then to second application
The display direction at the interface of program is adjusted;And works as and exit second application program and be back to first application program
When, the flag bit is reset.
Optionally, described is the step of flag bit is arranged in first application program in the life cycle of activity,
It include: that flag bit is set in the life cycle onCreate and onStart of activity for false, in the life of activity
Ordering period onPause and onStop setting flag bit is true.
Optionally, described to judge whether the interface of first application program is shown in home interface according to the flag bit
On step, comprising: when the onPause flag bit be true when, determine the interface display of first application program in institute
It states on home interface.
Optionally, further includes: when the onPause flag bit is true, determine the interface of second application program
It is pellucidity or non-full frame state on the home interface.
Optionally, the step of display direction at the interface for judging whether to need to adjust second application program, packet
Include: judge the interface of second application program display direction whether the display direction with the interface of first application program
It is identical;And if the display direction at the interface of the display direction at the interface of second application program and first application program is not
It is identical, it is determined that need to adjust the display direction at the interface of second application program.
Optionally, described if it is determined that after the step of needing to adjust the display direction at the interface of second application program,
Further include: the status attribute for obtaining the window where the interface of second application program, to the boundary of second application program
The status attribute of window where face carries out loop modification;And the window is rotated according to modified status attribute,
It is adjusted with the display direction at the interface to second application program, so that the display at the interface of second application program
Direction is identical as the display direction at interface of first application program.
Optionally, further includes: when the onPause flag bit is true, not to the interface of first application program
The window at place is rotated.
Optionally, the described the step of flag bit is reset, comprising: when in the life cycle for calling activity
OnDestroy when, reset the flag bit be false.
By above-mentioned mobile terminal 100, first when running the first application program on the mobile terminal 100,
It is the first application program setting flag bit in the life cycle of activity;Secondly when the second application program is activated,
Judge whether the interface of first application program is shown on home interface according to the flag bit;Furthermore work as described first to answer
When being remained displayed on the home interface with the interface of program, obtains the display direction at the interface of second application program and sentence
The display direction at the disconnected interface for whether needing to adjust second application program;Furthermore if it is determined that needing to adjust second application
The display direction at the interface of program is then adjusted the display direction at the interface of second application program;Finally when exiting
Second application program and when being back to first application program, resets the flag bit, thus by true
When needing to adjust the display direction at the interface of second application program surely, to the display side at the interface of second application program
To being adjusted, the display direction of the display direction at the interface of subsequent second application program and the interface of the first application program is realized
It is identical, improve the usage experience of user.Further, it when the onPause flag bit is true, does not answer described first
It is rotated with the window where the interface of program, to realize the display direction for not adjusting the interface of the first application program.
The embodiment of the present application also provides a kind of computer readable storage medium, and computer readable storage medium has one or more
A program, one or more programs are executed by one or more processors, to realize following steps:
It is described first in the life cycle of activity when running the first application program on the mobile terminal
Flag bit is arranged in application program;When the second application program is activated, first application program is judged according to the flag bit
Interface whether be shown on home interface;When the interface of first application program remains displayed on the home interface,
It obtains the display direction at the interface of second application program and judges whether to need to adjust the interface of second application program
Display direction;If it is determined that needing to adjust the display direction at the interface of second application program, then journey is applied to described second
The display direction at the interface of sequence is adjusted;And works as and exit second application program and be back to first application program
When, the flag bit is reset.
Optionally, described is the step of flag bit is arranged in first application program in the life cycle of activity,
It include: that flag bit is set in the life cycle onCreate and onStart of activity for false, in the life of activity
Ordering period onPause and onStop setting flag bit is true.
Optionally, described to judge whether the interface of first application program is shown in home interface according to the flag bit
On step, comprising: when the onPause flag bit be true when, determine the interface display of first application program in institute
It states on home interface.
Optionally, further includes: when the onPause flag bit is true, determine the interface of second application program
It is pellucidity or non-full frame state on the home interface.
Optionally, the step of display direction at the interface for judging whether to need to adjust second application program, packet
Include: judge the interface of second application program display direction whether the display direction with the interface of first application program
It is identical;And if the display direction at the interface of the display direction at the interface of second application program and first application program is not
It is identical, it is determined that need to adjust the display direction at the interface of second application program.
Optionally, described if it is determined that after the step of needing to adjust the display direction at the interface of second application program,
Further include: the status attribute for obtaining the window where the interface of second application program, to the boundary of second application program
The status attribute of window where face carries out loop modification;And the window is rotated according to modified status attribute,
It is adjusted with the display direction at the interface to second application program, so that the display at the interface of second application program
Direction is identical as the display direction at interface of first application program.
Optionally, further includes: when the onPause flag bit is true, not to the interface of first application program
The window at place is rotated.
Optionally, the described the step of flag bit is reset, comprising: when in the life cycle for calling activity
OnDestroy when, reset the flag bit be false.
By above-mentioned computer readable storage medium, first when running the first application program on the mobile terminal,
It is the first application program setting flag bit in the life cycle of activity;Secondly when the second application program is activated
When, judge whether the interface of first application program is shown on home interface according to the flag bit;Furthermore when described the
When the interface of one application program is remained displayed on the home interface, the display direction at the interface of second application program is obtained
And judge whether to need to adjust the display direction at the interface of second application program;Furthermore if it is determined that needing to adjust described second
The display direction at the interface of application program is then adjusted the display direction at the interface of second application program;Finally when
When exiting second application program and being back to first application program, the flag bit is reset, to pass through
When determining the display direction at the interface for needing to adjust second application program, to the aobvious of the interface of second application program
Show that direction is adjusted, realizes the display of the display direction at the interface of subsequent second application program and the interface of the first application program
Direction is identical, improves the usage experience of user.Further, when the onPause flag bit is true, not to described the
Window where the interface of one application program is rotated, to realize the display side for not adjusting the interface of the first application program
To.
The embodiment of the present application also provides a kind of computer readable storage mediums.Here computer readable storage medium is deposited
Contain one or more program.Wherein, computer readable storage medium may include volatile memory, such as arbitrary access
Memory;Memory also may include nonvolatile memory, such as read-only memory, flash memory, hard disk or solid-state are hard
Disk;Memory can also include the combination of the memory of mentioned kind.
Corresponding technical characteristic in the respective embodiments described above do not cause scheme contradiction or it is not implementable under the premise of, can
Mutually to use.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the application.
Embodiments herein is described above in conjunction with attached drawing, but the application be not limited to it is above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the enlightenment of the application, when not departing from the application objective and scope of the claimed protection, can also it make very much
Form, these are belonged within the protection of the application.
Claims (10)
1. a kind of display control method, which is characterized in that the display control method is applied to mobile terminal, the display control
Method includes:
It is first application in the life cycle of activity when running the first application program on the mobile terminal
Flag bit is arranged in program;
When the second application program is activated, judge whether the interface of first application program is shown according to the flag bit
On home interface;
When the interface of first application program remains displayed on the home interface, the boundary of second application program is obtained
The display direction in face and the display direction for judging whether to need to adjust the interface of second application program;
If it is determined that needing to adjust the display direction at the interface of second application program, then to the interface of second application program
Display direction be adjusted;And
When exiting second application program and being back to first application program, the flag bit is reset.
2. display control method as described in claim 1, which is characterized in that described is institute in the life cycle of activity
The step of stating the first application program setting flag bit, comprising:
It is false that flag bit is arranged in the life cycle onCreate and onStart of activity, in the life of activity
It is true that flag bit, which is arranged, in period onPause and onStop.
3. display control method as claimed in claim 2, which is characterized in that described to judge described first according to the flag bit
Whether the interface of application program is shown in the step on home interface, comprising:
When the onPause flag bit is true, determine the interface display of first application program in the home interface
On.
4. display control method as claimed in claim 3, which is characterized in that the display control method further include:
When the onPause flag bit is true, determine that the interface of second application program is on the home interface
Pellucidity or non-full frame state.
5. display control method as claimed in claim 2, which is characterized in that described to judge whether that needing to adjust described second answers
The step of with the display direction at the interface of program, comprising:
Judge the interface of second application program display direction whether the display side with the interface of first application program
To identical;And
If the display direction at the display direction at the interface of second application program and the interface of first application program not phase
Together, it is determined that need to adjust the display direction at the interface of second application program.
6. display control method as claimed in claim 5, which is characterized in that described if it is determined that needing to adjust second application
After the step of display direction at the interface of program, further includes:
The status attribute for obtaining the window where the interface of second application program, to the interface institute of second application program
Window status attribute carry out loop modification;And
The window is rotated according to modified status attribute, with the display side at the interface to second application program
To being adjusted, so that the display at the interface of the display direction at the interface of second application program and first application program
Direction is identical.
7. display control method as claimed in claim 5, which is characterized in that the display control method, further includes:
When the onPause flag bit is true, the window where the interface of first application program is not rotated.
8. display control method as claimed in claim 2, which is characterized in that the step reset to the flag bit
Suddenly, comprising:
As the onDestroy in the life cycle for calling activity, resetting the flag bit is false.
9. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
Touch screen;
Processor;And
Memory is connected to the processor, and the memory includes control instruction, is referred to when the processor reads the control
When enabling, controls the mobile terminal and realize the described in any item display control methods of claim 1-8.
10. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium has one or more journeys
Sequence, one or more of programs are executed by one or more processors, to realize the described in any item displays of claim 1-8
Control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910562374.5A CN110290269A (en) | 2019-06-26 | 2019-06-26 | Display control method, mobile terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910562374.5A CN110290269A (en) | 2019-06-26 | 2019-06-26 | Display control method, mobile terminal and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110290269A true CN110290269A (en) | 2019-09-27 |
Family
ID=68006184
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910562374.5A Pending CN110290269A (en) | 2019-06-26 | 2019-06-26 | Display control method, mobile terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110290269A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108124476A (en) * | 2017-09-18 | 2018-06-05 | 深圳前海达闼云端智能科技有限公司 | The display methods and device of multiple operating system, computer equipment and storage medium |
CN115421599A (en) * | 2022-11-07 | 2022-12-02 | 荣耀终端有限公司 | Input method display control method and related device |
WO2023279980A1 (en) * | 2021-07-05 | 2023-01-12 | 华为技术有限公司 | Screen rotation control method and apparatus, and electronic device |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1577481A (en) * | 2003-07-03 | 2005-02-09 | 三星电子株式会社 | Display apparatus and control method thereof |
CN101078982A (en) * | 2006-05-24 | 2007-11-28 | 北京壁虎科技有限公司 | Screen display method based on drawing engine |
CN101123702A (en) * | 2006-08-10 | 2008-02-13 | 三星电子株式会社 | Apparatus for image display and control method thereof |
CN102999253A (en) * | 2012-11-13 | 2013-03-27 | 北京奇艺世纪科技有限公司 | Window display method and system of application program and mobile terminal |
CN105022955A (en) * | 2014-04-22 | 2015-11-04 | 腾讯科技(深圳)有限公司 | Locking method and mobile terminal of application program |
CN105988662A (en) * | 2015-03-06 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Display method and system for multi-application window on mobile terminal |
US9785340B2 (en) * | 2014-06-12 | 2017-10-10 | Apple Inc. | Systems and methods for efficiently navigating between applications with linked content on an electronic device with a touch-sensitive display |
CN107357540A (en) * | 2017-06-30 | 2017-11-17 | 维沃移动通信有限公司 | The method of adjustment and mobile terminal of a kind of display direction |
CN108132735A (en) * | 2016-11-30 | 2018-06-08 | 中兴通讯股份有限公司 | Terminal and application control method |
CN108664300A (en) * | 2018-04-03 | 2018-10-16 | 青岛海信移动通信技术股份有限公司 | A kind of application interface display methods under picture-in-picture mode and device |
-
2019
- 2019-06-26 CN CN201910562374.5A patent/CN110290269A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1577481A (en) * | 2003-07-03 | 2005-02-09 | 三星电子株式会社 | Display apparatus and control method thereof |
CN101078982A (en) * | 2006-05-24 | 2007-11-28 | 北京壁虎科技有限公司 | Screen display method based on drawing engine |
CN101123702A (en) * | 2006-08-10 | 2008-02-13 | 三星电子株式会社 | Apparatus for image display and control method thereof |
CN102999253A (en) * | 2012-11-13 | 2013-03-27 | 北京奇艺世纪科技有限公司 | Window display method and system of application program and mobile terminal |
CN105022955A (en) * | 2014-04-22 | 2015-11-04 | 腾讯科技(深圳)有限公司 | Locking method and mobile terminal of application program |
US9785340B2 (en) * | 2014-06-12 | 2017-10-10 | Apple Inc. | Systems and methods for efficiently navigating between applications with linked content on an electronic device with a touch-sensitive display |
CN105988662A (en) * | 2015-03-06 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Display method and system for multi-application window on mobile terminal |
CN108132735A (en) * | 2016-11-30 | 2018-06-08 | 中兴通讯股份有限公司 | Terminal and application control method |
CN107357540A (en) * | 2017-06-30 | 2017-11-17 | 维沃移动通信有限公司 | The method of adjustment and mobile terminal of a kind of display direction |
CN108664300A (en) * | 2018-04-03 | 2018-10-16 | 青岛海信移动通信技术股份有限公司 | A kind of application interface display methods under picture-in-picture mode and device |
Non-Patent Citations (1)
Title |
---|
天津滨海迅腾科技集团有限公司: "《Android项目式程序设计》", 31 January 2017 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108124476A (en) * | 2017-09-18 | 2018-06-05 | 深圳前海达闼云端智能科技有限公司 | The display methods and device of multiple operating system, computer equipment and storage medium |
WO2023279980A1 (en) * | 2021-07-05 | 2023-01-12 | 华为技术有限公司 | Screen rotation control method and apparatus, and electronic device |
CN115421599A (en) * | 2022-11-07 | 2022-12-02 | 荣耀终端有限公司 | Input method display control method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107133092A (en) | Multi-thread synchronization processing method, terminal and computer-readable recording medium | |
CN107343083A (en) | One kind lifting game experiencing method, apparatus and computer-readable recording medium | |
CN107181700A (en) | Control method, mobile terminal and the storage medium of application program for mobile terminal | |
CN109634542A (en) | A kind of switching display control method, terminal and computer readable storage medium | |
CN108172161A (en) | Display methods, mobile terminal and computer readable storage medium based on flexible screen | |
CN107844230A (en) | A kind of advertisement page method of adjustment, mobile terminal and computer-readable recording medium | |
CN109195213A (en) | Mobile terminal screen control method, mobile terminal and computer readable storage medium | |
CN108512991A (en) | A kind of based reminding method, mobile terminal and computer readable storage medium | |
CN110290269A (en) | Display control method, mobile terminal and computer readable storage medium | |
CN110069167A (en) | Touch point sweep-out method, mobile terminal and computer readable storage medium | |
CN110187808A (en) | Dynamic wallpaper setting method, device and computer readable storage medium | |
CN107273433A (en) | A kind of file scanning method, equipment and computer-readable recording medium | |
CN109462700A (en) | A kind of call method, mobile terminal and computer readable storage medium | |
CN108958936A (en) | Application programe switch-over method, mobile terminal and computer readable storage medium | |
CN109618049A (en) | Terminal screen method for handover control, terminal and computer readable storage medium | |
CN109005288A (en) | Call processing method, double-sided screen terminal and computer readable storage medium | |
CN109151174A (en) | Message display method, wearable device and computer readable storage medium | |
CN109445660A (en) | A kind of wearable device control method, mobile terminal and wearable device | |
CN109101301A (en) | A kind of display control method, mobile terminal and computer readable storage medium | |
CN107484144A (en) | A kind of information acquisition method, terminal, server and computer-readable storage medium | |
CN109947519A (en) | Hardware-accelerated control method, terminal and computer readable storage medium | |
CN110167004A (en) | A kind of network registering method, mobile terminal and computer readable storage medium | |
CN110032313A (en) | A kind of screen switching, terminal and computer readable storage medium | |
CN108879117A (en) | Mobile terminal and its antenna structure | |
CN107566607A (en) | One kind notice display methods, mobile terminal and computer-readable recording medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190927 |