Disclosure of Invention
In order to solve the problems in the prior art, at least one embodiment of the invention provides a flashlight operation interface control method and device.
In a first aspect, an embodiment of the present invention discloses a method for controlling an operation interface of a flashlight, including:
displaying a first operation interface of the flashlight when the icon of the flashlight application program is detected to be clicked;
displaying a second flashlight operation interface according to the sliding operation received by the first flashlight operation interface;
and after the second flashlight operation interface is displayed, adjusting the brightness of the second flashlight operation interface according to the sliding operation received by the second flashlight operation interface.
Optionally, the displaying the second operation interface of the flashlight according to the sliding operation received by the first operation interface of the flashlight includes:
determining a first sliding direction according to the sliding operation received by the first operation interface of the flashlight;
judging whether the first sliding direction is a first sliding direction preset by the flashlight application program;
and if so, displaying the second operation interface of the flashlight.
Optionally, the adjusting the brightness of the second operation interface of the flashlight according to the sliding operation received by the second operation interface of the flashlight includes:
determining a second sliding direction according to the sliding operation received by the second operation interface of the flashlight;
determining brightness adjustment operation corresponding to a second sliding direction according to the corresponding relation between the second sliding direction preset by the flashlight application program and the brightness adjustment operation;
and adjusting the brightness of a second operation interface of the flashlight according to the brightness adjustment operation corresponding to the second sliding direction.
Optionally, the determining of the brightness adjustment operation corresponding to the second sliding direction includes:
if the second sliding direction is towards the left, determining that the brightness adjustment operation is brightness reduction;
and if the second sliding direction is towards the right, determining that the brightness adjusting operation is increasing the brightness.
Optionally, before determining, according to a correspondence between a second sliding direction preset by the flashlight application and a brightness adjustment operation, the brightness adjustment operation corresponding to the second sliding direction, the method further includes:
judging whether the second sliding direction is a second sliding direction preset by the flashlight application program;
and if so, displaying the first operation interface of the flashlight.
In a second aspect, an embodiment of the present invention further discloses a flashlight operation interface control device, including:
the first display unit is used for displaying a first operation interface of the flashlight when the icon of the flashlight application program is detected to be clicked;
the second display unit is used for displaying a second flashlight operation interface according to the sliding operation received by the first flashlight operation interface;
and the adjusting unit is used for adjusting the brightness of the second operation interface of the flashlight according to the sliding operation received by the second operation interface of the flashlight after the second operation interface of the flashlight is displayed.
Optionally, the second display unit is configured to:
determining a first sliding direction according to the sliding operation received by the first operation interface of the flashlight;
judging whether the first sliding direction is a first sliding direction preset by the flashlight application program;
and if so, displaying the second operation interface of the flashlight.
Optionally, the adjusting unit includes:
the first determining subunit is used for determining a second sliding direction according to the sliding operation received by the second operation interface of the flashlight;
the second determining subunit is used for determining the brightness adjustment operation corresponding to the second sliding direction according to the corresponding relationship between the second sliding direction preset by the flashlight application program and the brightness adjustment operation;
and the adjusting subunit is used for adjusting the brightness of the second operation interface of the flashlight according to the brightness adjusting operation corresponding to the second sliding direction.
Optionally, the second determining subunit is configured to:
if the second sliding direction is towards the left, determining that the brightness adjustment operation is brightness reduction;
and if the second sliding direction is towards the right, determining that the brightness adjusting operation is increasing the brightness.
Optionally, the apparatus further comprises:
the judging unit is used for judging whether the second sliding direction is a second sliding direction preset by the flashlight application program;
the third display unit is used for displaying the first flashlight operation interface after the judging unit judges that the second sliding direction is the second sliding direction preset by the flashlight application program;
correspondingly, the second determining subunit is configured to, after the determining unit determines that the second sliding direction is not the second sliding direction preset by the flashlight application, determine, according to a corresponding relationship between the second sliding direction preset by the flashlight application and the brightness adjusting operation, the brightness adjusting operation corresponding to the second sliding direction.
Therefore, in at least one embodiment of the invention, the flashlight APP provides two operation interfaces, after the flashlight APP is turned on, the first operation interface of the flashlight is displayed, and the second operation interface of the flashlight is displayed according to the sliding operation received by the first operation interface of the flashlight, so that the operation interfaces of the flashlight APP are enriched.
Further, in at least one embodiment of the present invention, both operation interfaces provided by the flashlight APP can receive sliding operations of a user, which improves human-computer interaction.
Further, in at least one embodiment of the present invention, the flashlight APP may adjust the brightness of the second operation interface of the flashlight in response to the sliding operation received by the second operation interface of the flashlight, so that the flashlight APP may provide another lighting mode besides the lighting mode of controlling the rear lamp of the terminal to be turned on, that is, the lighting mode may be provided by the brightness of the second operation interface of the flashlight, so as to meet the application requirement of the user on less brightness requirement or needing to light for a longer time, thereby enriching the functions of the flashlight APP.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In a first aspect, as shown in fig. 1, an embodiment of the present invention discloses a method for controlling an operation interface of a flashlight, which may include the following steps 101 to 103:
101. and when the icon of the flashlight application program is detected to be clicked, displaying a first flashlight operation interface.
In this embodiment, the method is applied to a terminal, such as an intelligent mobile terminal including a mobile phone, a tablet computer, and the like.
In this embodiment, the main body of the method may be a flashlight APP, which may be understood as a rear light of the terminal. When detecting that the icon of the flashlight application program is clicked, the user starts the flashlight APP, and therefore the first flashlight operation interface is displayed on the display screen of the terminal, so that the user can click the button provided by the first flashlight operation interface to control the flashlight.
In this embodiment, the first operation interface of the flashlight provides buttons, for example, including a switch button, and the user clicks the switch button, and flashlight APP controls the flashlight to open, and the user clicks the switch button again, and flashlight APP controls the flashlight to close.
In this embodiment, the keys provided by the first operation interface of the flashlight may further include at least one frequency selection key, for example, a corresponding relationship between the frequency selection key and the frequency is pre-stored in the flashlight APP, the frequency may be a frequency of a certain signal, such as a frequency of a distress signal, or a frequency without practical meaning, and a user may set the frequency according to his preference, or may set a corresponding relationship between the frequency and the frequency selection key.
In a specific application, at least one frequency selection key is displayed around the switch key. More specifically, the showing of at least one frequency selection key around the switch key may be implemented as: the switch key and the frequency selection key are displayed as a disc, the switch key is positioned in the center of the disc, and the frequency selection key is positioned on the periphery of the disc.
In a particular application, flashlight APP may adjust the brightness of the flashlight when it is detected that the disc is rotated.
In a specific application, a pointing tag is displayed on an edge of the disk, the pointing tag points to a fixed position, and accordingly when it is detected that the frequency selection key is triggered, the specific steps are as follows: and after the disk is rotated, if the frequency selection key is positioned at the position pointed by the pointing label, determining that the frequency selection key is triggered.
In this embodiment, when detecting that the frequency selection button is triggered, the flashlight APP controls the flashlight to blink according to the frequency corresponding to the frequency selection button, which may specifically be: determining the frequency corresponding to the frequency selection key according to the preset corresponding relation between the frequency selection key and the frequency; and sending the information carrying the frequency corresponding to the frequency selection key to a flashlight driving chip so that the flashlight driving chip drives the flashlight to flicker according to the frequency corresponding to the frequency selection key.
In this embodiment, different frequency selection keys may be distinguished by different identification information, such as numbers, and accordingly, the correspondence between the frequency selection keys and the frequencies may be converted into the correspondence between the identification information of the frequency selection keys and the frequencies.
In this embodiment, the user may click the frequency selection key to select the frequency, and when it is detected that the frequency selection key is triggered, the number of the clicked frequency selection key may be determined, so as to determine the frequency corresponding to the clicked frequency selection key according to the correspondence between the number and the frequency.
In this embodiment, because of the existence of the frequency selection key, the flashlight switch key may also be omitted, and the frequency selection key may have the function of a flashlight switch, for example, when the user clicks the frequency selection key once, the flashlight is turned on, and when the user clicks the frequency selection key again, the flashlight is turned off.
It can be seen that, show at least one frequency selection button at the first operation interface of flashlight, the user can click different frequency selection buttons, after detecting that the frequency selection button is clicked, control the flashlight according to the frequency that the frequency selection button corresponds and twinkle, therefore, make flashlight APP not only can realize opening and closing of rearmounted lamp, and can make rearmounted lamp flicker with certain frequency moreover, make the equipment of the light of receiving with this frequency flicker or the information of user's distinguishable this frequency, flashlight APP's function has been enriched.
102. And displaying a second flashlight operation interface according to the sliding operation received by the first flashlight operation interface.
In this embodiment, the difference from the prior art is that the flashlight APP provides two operation interfaces, namely a first operation interface of the flashlight and a second operation interface of the flashlight, and the second operation interface of the flashlight is displayed by the flashlight APP according to the sliding operation received by the first operation interface of the flashlight, so that the function of switching the first operation interface of the flashlight to the second operation interface of the flashlight is realized.
In this embodiment, the detection and reception of the sliding operation can continue to use the prior art, and this embodiment is not described again.
It is thus clear that, in this embodiment, flashlight APP provides two operation interface, is opened the back at flashlight APP, shows the first operation interface of flashlight to according to the sliding operation that the first operation interface of flashlight received, show flashlight second operation interface, richened flashlight APP's operation interface.
Further, in this embodiment, two operation interfaces provided by the flashlight APP can both receive sliding operation of a user, so that human-computer interaction is improved.
103. And after the second flashlight operation interface is displayed, adjusting the brightness of the second flashlight operation interface according to the sliding operation received by the second flashlight operation interface.
In this embodiment, the flashlight APP can respond to the sliding operation received by the second flashlight operation interface and adjust the brightness of the second flashlight operation interface, so that the flashlight APP can provide another lighting mode except the lighting mode of the rear lamp of the control terminal, namely, the flashlight APP can illuminate through the brightness of the second flashlight operation interface, the application requirement of a user on not large brightness requirement or long-time illumination is met, and the functions of the flashlight APP are enriched.
In a specific example, the step 102 of displaying the second operation interface of the flashlight according to the sliding operation received by the first operation interface of the flashlight specifically may include the following steps 1021 to 1023 which are not shown in fig. 1:
1021. and determining a first sliding direction according to the sliding operation received by the first operation interface of the flashlight.
In the present embodiment, the sliding operation is, for example, leftward sliding, rightward sliding, upward sliding, and downward sliding.
In the present embodiment, determining the sliding direction according to the sliding operation belongs to the mature technology in the field, and is not described in detail.
1022. And judging whether the first sliding direction is a first sliding direction preset by the flashlight application program, if so, executing a step 1023.
In this embodiment, since the flashlight APP provides two operation interfaces, after the first operation interface of the flashlight is displayed, if the second operation interface of the flashlight is to be switched, only one sliding direction needs to be preset as a switching trigger condition. In a specific application, any direction can be selected as the first sliding direction.
1023. And displaying the second operation interface of the flashlight.
In this embodiment, in step 1022, if it is determined that the first sliding direction is not the first sliding direction preset by the flashlight application, the second operation interface of the flashlight is not displayed.
In a specific example, the step 103 of adjusting the brightness of the second operation interface of the flashlight according to the sliding operation received by the second operation interface of the flashlight may include the following steps 1031 to 1033, which are not shown in fig. 1:
1031. and determining a second sliding direction according to the sliding operation received by the second operation interface of the flashlight.
1032. And determining the brightness adjustment operation corresponding to the second sliding direction according to the corresponding relation between the second sliding direction preset by the flashlight application program and the brightness adjustment operation.
In this embodiment, the brightness adjustment operation includes brightness reduction and brightness increase, and in a specific application, any two sliding directions may be selected to respectively correspond to the brightness reduction and the brightness increase.
1033. And adjusting the brightness of a second operation interface of the flashlight according to the brightness adjustment operation corresponding to the second sliding direction.
In a specific example, the determining, in step 1032, the brightness adjustment operation corresponding to the second sliding direction specifically includes:
if the second sliding direction is towards the left, determining that the brightness adjustment operation is brightness reduction;
and if the second sliding direction is towards the right, determining that the brightness adjusting operation is increasing the brightness.
In this embodiment, the corresponding relationship between the second sliding direction and the brightness adjustment operation is as follows: sliding left corresponds to decreasing brightness and sliding right corresponds to increasing brightness.
In a specific example, before determining the brightness adjustment operation corresponding to the second sliding direction according to the correspondence relationship between the second sliding direction and the brightness adjustment operation preset by the flashlight application in step 1032, the method shown in fig. 1 may further include the following steps 1032' and 1032 ″ not shown in fig. 1:
1032', judging whether the second sliding direction is a second sliding direction preset by the flashlight application program; if yes, go to step 1032 ".
In this embodiment, the preset second sliding direction is opposite to the preset first sliding direction in step 1022, for example, if the preset first sliding direction is downward, the preset second sliding direction is upward.
1032 ", a first operating interface of the flashlight is shown.
In this embodiment, in step 1032', if it is determined that the second sliding direction is not the second sliding direction preset by the flashlight application, step 1032 is executed.
In this embodiment, by presetting the second sliding direction as the trigger condition, when the user performs the sliding operation in the preset second sliding direction on the second operation interface of the flashlight, the switching operation of the second operation interface of the flashlight to the first operation interface of the flashlight may be triggered. Therefore, in the embodiment, the first operation interface of the flashlight and the second operation interface of the flashlight can be switched with each other through the preset first sliding direction and the preset second sliding direction.
Based on the flashlight operation interface control method disclosed in the above embodiment, the flashlight operation interface control flow is described as the following steps 1 to 4 by combining the flashlight operation interface application scene diagrams shown in fig. 3 to 7:
step 1, when detecting that an icon of a flashlight application program is clicked, displaying a first flashlight operation interface shown in fig. 3.
On the first operating interface of the flashlight shown in fig. 3, the switch buttons are shown. The background of the flashlight operation interface shown in fig. 3 is the field at night, and any night scene can be adopted in specific applications, so that the flashlight operation interface accords with the flashlight use scene and meets the use expectation of users. When the switch key is not clicked, the background of the first operation interface of the flashlight is in a light-off state.
After the switch button is clicked, the first operation interface of the flashlight shown in fig. 4 is displayed, in fig. 4, the background of the first operation interface of the flashlight is changed to an on state, for example, a tent in the field is lighted. On the first operation interface of the flashlight shown in fig. 4, six frequency selection keys are displayed around the switch key, four of the six frequency selection keys are marked by numbers 0 to 5, another frequency is marked by an SOS, the frequency corresponding to the SOS is the frequency of the international morse code rescue signal, 0 to 5 correspond to different frequencies respectively, and the frequencies can be preset or set by a user. The switch keys and all the frequency selection keys are displayed as a disc, the switch keys are positioned in the center of the disc, and the frequency selection keys are positioned on the periphery of the disc.
On the first operation interface of the flashlight shown in fig. 4, a pointing label is displayed on the edge of the disc, the pointing label is an inverted triangle on the edge of the disc in fig. 4, the pointing label points to a fixed position, after the switch key is clicked, the inverted triangle points to "0" by default, that is, after the switch key is clicked by a user, the flashlight flickers by default at a frequency corresponding to "0". And after the disk is rotated, if the frequency selection key is positioned at the position pointed by the pointing label, determining that the frequency selection key is triggered.
After the switch button in the first operation interface of the flashlight shown in fig. 4 is clicked, that is, the user wants to turn off the flashlight, the flashlight operation interface shown in fig. 3 is displayed again.
It is thus clear that through show at least one frequency selection button on the first operation interface of flashlight, the user can select different frequency selection buttons, after detecting that the frequency selection button is selected, control the flashlight according to the frequency that the frequency selection button corresponds and twinkle, consequently, make flashlight APP not only can realize opening and closing of rear light, and can make rear light twinkle with certain frequency moreover, make the equipment of receiving the light with this frequency scintillation or the information of user's distinguishable this frequency, flashlight APP's function has been enriched.
And 2, displaying a second flashlight operation interface shown in the figure 5 according to the sliding operation received by the first flashlight operation interface. Specifically, a first sliding direction is determined according to sliding operation received by a first operation interface of the flashlight; judging whether the first sliding direction is a first sliding direction preset by a flashlight application program; and if so, displaying the second operation interface of the flashlight. In this embodiment, the first sliding direction is downward. The background of the second flashlight operation interface shown in fig. 5 is the sky at night, the first flashlight operation interface shown in fig. 4 is switched to the second flashlight operation interface shown in fig. 5, and for a user, the visual experience is that the field of vision is upward from the ground in the field at night to the sky in the field, so that the use expectation of the user is met.
And 3, after the second operation interface of the flashlight shown in the figure 5 is displayed, adjusting the brightness of the second operation interface of the flashlight according to the sliding operation received by the second operation interface of the flashlight. Specifically, a second sliding direction is determined according to the sliding operation received by the second operation interface of the flashlight; determining brightness adjustment operation corresponding to a second sliding direction according to a corresponding relation between the second sliding direction preset by a flashlight application program and the brightness adjustment operation; and adjusting the brightness of a second operation interface of the flashlight according to the brightness adjustment operation corresponding to the second sliding direction. In this embodiment, if the second sliding direction is leftward, it is determined that the brightness adjustment operation is to reduce the brightness, and the second operation interface of the flashlight with reduced brightness is shown in fig. 6; if the second sliding direction is rightward, the brightness adjustment operation is determined to be brightness increase, and the second operation interface of the flashlight after brightness increase is shown in fig. 7.
And 4, if the second sliding direction is judged to be the second sliding direction preset by the flashlight application program, for example, the preset second sliding direction is upward, redisplaying the first operation interface of the flashlight.
It is thus clear that flashlight APP provides two operation interfaces, is opened the back at flashlight APP, shows the first operation interface of flashlight to according to the sliding operation that the first operation interface of flashlight received, show flashlight second operation interface, richened flashlight APP's operation interface.
Furthermore, two operation interfaces provided by the flashlight APP can receive sliding operation of a user, and man-machine interaction is improved.
Furthermore, the flashlight APP can respond to the sliding operation received by the second flashlight operation interface and adjust the brightness of the second flashlight operation interface, so that the flashlight APP can provide another lighting mode except the lighting mode of the rear lamp of the control terminal, namely, the flashlight APP can illuminate through the brightness of the second flashlight operation interface, the application requirement of a user on not large brightness requirement or long-time illumination is met, and the functions of the flashlight APP are enriched.
In a second aspect, as shown in fig. 2, an embodiment of the invention discloses:
a1, a flashlight operation interface control device, comprising: the first display unit 21, the second display unit 22 and the adjusting unit 23, each unit is specifically described as follows:
the first display unit 21 is used for displaying a first flashlight operation interface when detecting that an icon of the flashlight application program is clicked;
the second display unit 22 is used for displaying the second flashlight operation interface according to the sliding operation received by the first flashlight operation interface;
and the adjusting unit 23 is configured to adjust the brightness of the second operation interface of the flashlight according to the sliding operation received by the second operation interface of the flashlight after the second operation interface of the flashlight is displayed.
A2, the device of A1, the second display unit 22, for:
determining a first sliding direction according to the sliding operation received by the first operation interface of the flashlight;
judging whether the first sliding direction is a first sliding direction preset by the flashlight application program;
and if so, displaying the second operation interface of the flashlight.
A3, the device according to A1, the adjusting unit 23, may comprise units not shown in FIG. 2: a first determining subunit 231, a second determining subunit 232, and an adjusting subunit 233. The units are specifically described as follows:
a first determining subunit 231, configured to determine a second sliding direction according to the sliding operation received by the second operation interface of the flashlight;
a second determining subunit 232, configured to determine, according to a correspondence between a second sliding direction preset by the flashlight application and a brightness adjustment operation, a brightness adjustment operation corresponding to the second sliding direction;
and the adjusting subunit 233, configured to adjust the brightness of the second operation interface of the flashlight according to the brightness adjusting operation corresponding to the second sliding direction.
A4, the apparatus of A3, the second determining subunit 232 to:
if the second sliding direction is towards the left, determining that the brightness adjustment operation is brightness reduction;
and if the second sliding direction is towards the right, determining that the brightness adjusting operation is increasing the brightness.
A5, the device according to A3, which device may further comprise units not shown in FIG. 2: a judging unit 24 and a third display unit 25. The units are specifically described as follows:
a judging unit 24, configured to judge whether the second sliding direction is a second sliding direction preset by the flashlight application;
the third display unit 25 is configured to display the first flashlight operation interface after the determination unit 24 determines that the second sliding direction is the second sliding direction preset by the flashlight application program;
correspondingly, the second determining subunit 232 is configured to, after the determining unit 24 determines that the second sliding direction is not the second sliding direction preset by the flashlight application, determine, according to a corresponding relationship between the second sliding direction preset by the flashlight application and the brightness adjusting operation, the brightness adjusting operation corresponding to the second sliding direction.
The flashlight operation interface control device disclosed in the above embodiments can implement the processes of the flashlight operation interface control methods disclosed in the embodiments of the first aspect, and details are not repeated for avoiding repetition.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.