CN105930034B - The method and apparatus for showing dialog box - Google Patents

The method and apparatus for showing dialog box Download PDF

Info

Publication number
CN105930034B
CN105930034B CN201610262849.5A CN201610262849A CN105930034B CN 105930034 B CN105930034 B CN 105930034B CN 201610262849 A CN201610262849 A CN 201610262849A CN 105930034 B CN105930034 B CN 105930034B
Authority
CN
China
Prior art keywords
button
dialog box
length
arrangement mode
maximum length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610262849.5A
Other languages
Chinese (zh)
Other versions
CN105930034A (en
Inventor
吴华
王文林
董红光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610262849.5A priority Critical patent/CN105930034B/en
Publication of CN105930034A publication Critical patent/CN105930034A/en
Application granted granted Critical
Publication of CN105930034B publication Critical patent/CN105930034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure is directed to show the method and apparatus of dialog box.This method comprises: the operation of detection display dialog box;Obtain the quantity of the button in the corresponding dialog box to be shown of the operation and the maximum length of the character to be shown in each button;According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;The dialog box is shown according to the arrangement mode of setting.When the disclosure realizes display dialog box, dynamic adjusts the layout of the button in dialog box.Also, due to consideration that the maximum length of the character to be shown in button, and the arrangement mode of button is set according to the maximum length, therefore can greatly reduce the case where content in button can not completely be shown.

Description

The method and apparatus for showing dialog box
Technical field
This disclosure relates to terminal field of display technology, more particularly to the method and apparatus of display dialog box.
Background technique
With the continuous development of intelligent terminal technology, more and more people carry out social, study, work using intelligent terminal Make, entertain etc..In user's using terminal, it is often necessary to which the operation for user shows dialog box in the terminal.In dialog box Including the button clicked for user, the character for explaining operation representated by the button or meaning is shown in button.One It may include two or more buttons in a dialog box, and also need to show the contents such as text in button, therefore, how Not only it is a urgent problem to be solved that beautiful but also ideally display, which has the dialog box of button,.
Summary of the invention
The embodiment of the present disclosure provides a kind of method and apparatus for showing dialog box.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of method showing dialog box is provided, comprising:
The operation of detection display dialog box;
Obtain the quantity of the button in the corresponding dialog box to be shown of the operation and to be shown in each button The maximum length of character;
According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;
The dialog box is shown according to the arrangement mode of setting.
Optionally, the quantity and the maximum length according to the button, is arranged the button in the dialog box Arrangement mode, comprising:
If the quantity of the button is less than or equal to preset quantity, the first length of the button is obtained, described first is long Degree is the length that each button has when the button is horizontally arranged in the dialog box;
If the maximum length is greater than first length, it is longitudinal that the arrangement mode of the button in the dialog box, which is arranged, Arrangement, and the button is set with the second length more than or equal to the maximum length.
Optionally, the quantity and the maximum length according to the button, is arranged the button in the dialog box Arrangement mode, further includes:
If the quantity of the button is greater than the preset quantity, the arrangement mode for the button being arranged in the dialog box is vertical To arrangement, and the button is set with the second length more than or equal to the maximum length.
Optionally, first length is obtained, comprising:
According to the length of the preset dialog box and the quantity of the button, first length is obtained.
Optionally, the method also includes:
According to the corresponding relationship of preset arrangement mode and button Background, pressed corresponding to the arrangement mode for obtaining setting Button Background;
The dialog box is shown according to the arrangement mode of setting, comprising:
The dialog box is shown according to the arrangement mode of setting and the button Background of acquisition.
According to the second aspect of an embodiment of the present disclosure, a kind of device showing dialog box is provided, comprising:
Detection module, for detecting the operation of display dialog box;
First obtains module, for obtain in the corresponding dialog box to be shown of operation that the detection module detects by The maximum length of the quantity of button and the character to be shown in each button;
Setup module, the quantity of the button for being obtained according to the first acquisition module and described most greatly enhances Degree, is arranged the arrangement mode of the button in the dialog box;
Display module, arrangement mode for being arranged according to the setup module show the dialog box.
Optionally, the setup module, comprising:
Acquisition submodule, if the quantity for obtaining the button that module obtains for described first is less than or equal to present count Amount, obtains the first length of the button, and first length is horizontally arranged in each described when the dialog box for the button The length that button has;
First setting submodule, if obtaining the maximum length that module obtains for described first is greater than acquisition First length that module obtains, the arrangement mode that the button in the dialog box is arranged is longitudinal arrangement, and institute is arranged Stating button has the second length for being greater than or equal to the maximum length.
Optionally, the setup module, further includes:
Second setting submodule, if the quantity for obtaining the button that module obtains for described first is greater than described preset Quantity, be arranged the button in the dialog box arrangement mode be longitudinal arrangement, and be arranged the button have be greater than or wait In the second length of the maximum length.
Optionally, the acquisition submodule, for according to the length of the preset dialog box and the number of the button Amount obtains first length.
Optionally, described device further include:
Second acquisition module is set described in acquisition for the corresponding relationship according to preset arrangement mode and button Background Set button Background corresponding to the arrangement mode of module setting;
The display module, the arrangement mode and described second for being also used to be arranged according to the setup module obtain module The button Background of acquisition shows the dialog box.
According to the third aspect of an embodiment of the present disclosure, a kind of device showing dialog box is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The operation of detection display dialog box;
Obtain the quantity of the button in the corresponding dialog box to be shown of the operation and to be shown in each button The maximum length of character;
According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;
The dialog box is shown according to the arrangement mode of setting.
The technical scheme provided by this disclosed embodiment can include the following benefits:
Above-mentioned technical proposal, according to the quantity of button in dialog box to be shown and the maximum of the character to be shown in button The arrangement mode of the button in dialog box is arranged in length.When realizing display dialog box, dynamic adjusts the button in dialog box Layout.Also, due to consideration that the maximum length of the character to be shown in button, and the row of button is set according to the maximum length Column mode, therefore the case where content in button can not completely be shown can be greatly reduced.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is the flow chart of the method for display dialog box shown according to an exemplary embodiment.
Fig. 2 is the flow chart of the method for the display dialog box shown according to another exemplary embodiment.
Fig. 3 is exemplary the schematic diagram of the button longitudinal arrangement in dialog box.
Fig. 4 is the transversely arranged schematic diagram of the button in the dialog box of another exemplary.
Fig. 5 is the schematic diagram of the button longitudinal arrangement in the dialog box of another exemplary.
Fig. 6 is the flow chart of the method for display dialog box shown according to an exemplary embodiment.
Fig. 7 is the block diagram of the device of display dialog box shown according to an exemplary embodiment.
Fig. 8 is the block diagram of the setup module in the device of the display dialog box shown according to another exemplary embodiment.
Fig. 9 is the block diagram of the setup module in the device of the display dialog box shown according to another exemplary embodiment.
Figure 10 is the block diagram of the device of the display dialog box shown according to another exemplary embodiment.
Figure 11 is the block diagram of terminal device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
The technical solution that the embodiment of the present disclosure provides, is related to terminal device, for example may include smart phone, plate electricity Brain, laptop, desktop computer.
Fig. 1 is a kind of flow chart of method for showing dialog box shown according to an exemplary embodiment, as shown in Figure 1, Method is for including the following steps S11-S14 in terminal device:
In step s 11, the operation of detection display dialog box.
For example, then detecting the operation of display dialog box when detecting that user clicks preset options.For example, when using It when family clicks " deletion " option, needs to show dialog box, to ask the user whether that confirmation deletes or unerases.
In step s 12, it obtains in quantity and each button of the button in the corresponding dialog box to be shown of the operation The maximum length of character to be shown.
In step s 13, according to the quantity of button and maximum length, the arrangement mode of the button in dialog box is set.
In the other embodiments of the disclosure, the arrangement mode of button may include transversely arranged and longitudinal arrangement.According to The maximum length of character to be shown in the quantity and button of the button of acquisition, adjustable button are transversely arranged or longitudinal row Column.
In step S14, dialog box is shown according to the arrangement mode of setting.
In the present embodiment, according to most greatly enhancing for the quantity of button in dialog box to be shown and the character to be shown in button The arrangement mode of the button in dialog box is arranged in degree.When realizing display dialog box, dynamic adjusts the cloth of the button in dialog box Office.Also, due to consideration that the maximum length of the character to be shown in button, and the arrangement of button is set according to the maximum length Mode so that button can completely show character to be shown, therefore can greatly reduce the content in button and can not completely show The case where.
The arrangement illustrated below how button in dialog box is set according to the quantity of button and maximum length Mode.It is a kind of flow chart of the method for the display dialog box shown according to another exemplary embodiment, this method as shown in Figure 2 It may comprise steps of:
In the step s 21, the operation of detection display dialog box.
In step S22, according to the corresponding relationship of preset operation and dialog box to be shown, determine corresponding to the operation Dialog box to be shown.
The corresponding relationship of various operations and dialog box to be shown can be preset.For example, " deletion " in the selection page Dialog box to be shown corresponding to the operation of option is dialog box 1.Indicate that the long-pressing touch operation of " Quan Xuan " is corresponding to be shown Dialog box is dialog box 2.
In step S23, obtain the quantity x of the button in determining dialog box to be shown and in each button to aobvious Show the maximum length of character.
The length of the character to be shown in each button in dialog box to be shown, more each word to be shown are obtained respectively The length of symbol, to obtain the maximum length.
The length of character to be shown may change according to the language of Systematic selection, for example, word using Chinese and When English indicates, length is likely to will be different.
In step s 24, judge whether the quantity x of the button obtained is less than or equal to preset quantity;If so, executing step S25;If it is not, executing step S29.
The preset quantity can be according to the length of the character shown in the length of dialog box, button and visual effect etc. Because usually determining.Button that may be transversely arranged without enough spaces when button quantity is more, in dialog box.Or Allow to transversely arranged, but the length of each button is smaller, and may cause can not character in complete the Show Button.Work as button When negligible amounts, it is also desirable to according to the character length in button come the arrangement of decision button.Preset quantity is usually two or three It is a.
In step s 25, the first length of button is obtained, the first length is that button is horizontally arranged in each button when dialog box The length having.
Button can be horizontally arranged in dialog box as default setting.It, can be in another embodiment of the present disclosure According to the length of preset dialog box and the quantity of button, first length is obtained.In general, for beauty, multiple buttons Length be it is the same, it is therefore, simplest, the length of dialog box can be used divided by the quantity x of button, obtain first length Value.
In step S26, judge whether maximum length is greater than the first length;If so, executing step S27;If it is not, executing step Rapid S28.
The step is to judge whether button can completely show the maximum character to be shown of length.
In step s 27, the arrangement mode for the button being arranged in dialog box is longitudinal arrangement, and the button tool is arranged There is the second length more than or equal to the maximum length, then executes step S210.
When button is transversely arranged, the maximum character to be shown that can not completely show length when, need to carry out on button longitudinal Arrangement, also, button must have enough length, completely to show the maximum character to be shown of length.As shown in figure 3, wanting Does is the theme of the dialog box of display: determining " deletion "?.Include in dialog box three can button for selection by the user.Fig. 3 be by The effect picture after three button A, B, C longitudinal arrangements in dialog box.Wherein, the length of the character in button C is maximum, is 15 Character.Button A, B, C have the second length more than or equal to the maximum length.Three buttons A, B, C can not be transversely arranged, Obviously, if transversely arranged, the length of button will be not enough to completely show character therein.
In step S28, be arranged dialog box in button arrangement mode be it is transversely arranged, then execute step S210.
If the maximum length of character to be shown is smaller, length when button is transversely arranged is enough completely to show word to be shown Symbol, then, just using the horizontal mode of default.It is illustrated in figure 4 three buttons A, B, C in dialog box are transversely arranged Effect picture afterwards.
In step S29, the arrangement mode that the button in dialog box is arranged is longitudinal arrangement, and the button tool is arranged There is the second length more than or equal to the maximum length, then executes step S210.
When button quantity is more, be not easy to transversely arranged certainly when, button is directly set and is arranged as longitudinal arrangement.Such as figure 5 show the effect picture after five button A, B, C, D, E longitudinal arrangements in dialog box.
In step S210, dialog box is shown according to the arrangement mode of setting.
In another embodiment of the disclosure, after the arrangement mode of the button in dialog box is arranged, it is also an option that phase The Background answered, so that the button shown is beautiful.It is a kind of display shown according to another exemplary embodiment as shown in Figure 6 The flow chart of the method for dialog box, this method may comprise steps of:
In step S61, the operation of detection display dialog box.
In step S62, according to the corresponding relationship of preset operation and dialog box to be shown, determine corresponding to the operation Dialog box to be shown.
In step S63, the quantity of the button in determining dialog box to be shown and to be shown in each button is obtained The maximum length of character.
In step S64, judge whether the quantity of the button obtained is less than or equal to preset quantity;If so, executing step S65;If it is not, executing step S69.
In step S65, the first length of button is obtained, the first length is that button is horizontally arranged in each button when dialog box The length having.
In step S66, judge whether maximum length is greater than the first length;If so, executing step S67;If it is not, executing step Rapid S68.
In step S67, the arrangement mode that the button in dialog box is arranged is longitudinal arrangement, and the button tool is arranged There is the second length more than or equal to the maximum length, then executes step S610.
In step S68, be arranged dialog box in button arrangement mode be it is transversely arranged, then execute step S610.
In step S69, the arrangement mode that the button in dialog box is arranged is longitudinal arrangement, and the button tool is arranged There is the second length more than or equal to the maximum length, then executes step S610.
In step S610, according to the corresponding relationship of preset arrangement mode and button Background, the arrangement of setting is obtained Button Background corresponding to mode.
In step s 611, dialog box is shown according to the arrangement mode of setting and the button Background of acquisition.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.
Fig. 7 is a kind of block diagram of device for showing dialog box shown according to an exemplary embodiment, which can lead to Cross being implemented in combination with as some or all of of electronic equipment of software, hardware or both.As shown in fig. 7, the display is talked with The device of frame includes:
Detection module 701 is configured as the operation of detection display dialog box;
For example, then detecting the operation of display dialog box when detecting that user clicks preset options.For example, when using It when family clicks " deletion " option, needs to show dialog box, to ask the user whether that confirmation deletes or unerases.
First obtains module 702, is configured as obtaining the corresponding dialog box to be shown of operation that detection module 701 detects In button quantity and the character to be shown in each button maximum length;
The corresponding relationship of various operations and dialog box to be shown can be preset.For example, " deletion " in the selection page Dialog box to be shown corresponding to the operation of option is dialog box 1.Indicate that the long-pressing touch operation of " Quan Xuan " is corresponding to be shown Dialog box is dialog box 2.Then the quantity of the button in words frame and the maximum length of the character to be shown in button are obtained.
The length of the character to be shown in each button in dialog box to be shown, more each word to be shown are obtained respectively The length of symbol, to obtain the maximum length.The length of character to be shown may change according to the language of Systematic selection, example Such as, when a word is indicated using Chinese and English, length is likely to will be different.
Setup module 703 is configured as the quantity and maximum length that obtain the button that module 701 obtains according to first, The arrangement mode of button in dialog box is set;
In the other embodiments of the disclosure, the arrangement mode of button may include transversely arranged and longitudinal arrangement.According to The maximum length of character to be shown in the quantity and button of the button of acquisition, adjustable button are transversely arranged or longitudinal row Column.
Display module 704 is configured as the arrangement mode being arranged according to setup module 703 to show dialog box.
In the present embodiment, according to most greatly enhancing for the quantity of button in dialog box to be shown and the character to be shown in button The arrangement mode of the button in dialog box is arranged in degree.When realizing display dialog box, dynamic adjusts the cloth of the button in dialog box Office.Also, due to consideration that the maximum length of the character to be shown in button, and the arrangement of button is set according to the maximum length Mode, therefore the case where content in button can not completely be shown can be greatly reduced.
In another embodiment of the disclosure, as shown in figure 8, including: in the setup module 703
Acquisition submodule 7031, if the quantity for being configured as the button that the first acquisition module 702 obtains is less than or equal in advance If quantity, the first length of button is obtained, the first length is the length that each button has when button is horizontally arranged in dialog box;
The preset quantity can be according to the length of the character shown in the length of dialog box, button and visual effect etc. Because usually determining.Button that may be transversely arranged without enough spaces when button quantity is more, in dialog box.Or Allow to transversely arranged, but the length of each button is smaller, and may cause can not completely show character.When button negligible amounts When, it is also desirable to according to the character length in button come the arrangement of decision button.Preset quantity is usually two or three.
Button can be horizontally arranged in dialog box as default setting.
First setting submodule 7032, if being configured as the maximum length that the first acquisition module 702 obtains is greater than described obtain The first length for taking submodule 7031 to obtain, the arrangement mode that the button in dialog box is arranged is longitudinal arrangement, and is arranged and presses Button has the second length more than or equal to maximum length.
When button is transversely arranged, the maximum character to be shown that can not completely show length when, need to carry out on button longitudinal Arrangement, also, button must have enough length, completely to show the widest character to be shown of length.As shown in figure 3, wanting Does is the theme of the dialog box of display: determining " deletion "?.Include in dialog box three can button for selection by the user.Fig. 3 be by The effect picture after three button A, B, C longitudinal arrangements in dialog box.Wherein, the length of the character in button C is most wide, is 15 Character.Button A, B, C have the second length more than or equal to the maximum length.Three buttons A, B, C can not be transversely arranged, Obviously, if transversely arranged, the length of button will be not enough to completely show character therein.If the maximum length of character to be shown Smaller, length when button is transversely arranged is enough completely to show character to be shown, then, just using the transversely arranged side of default Formula.It is illustrated in figure 4 the effect picture by three buttons A, B, C in dialog box after transversely arranged.
Acquisition submodule 7031 is configured as the quantity of the length and button according to preset dialog box, obtains first Length.
In general, for beauty, the length of multiple buttons be it is the same, it is therefore, simplest, the length of dialog box can be used Degree obtains the value of first length divided by the quantity x of button.
In another embodiment of the disclosure, as shown in figure 9, setup module 703, further includes:
Second setting submodule 7033 is preset if the quantity for being configured as the button that the first acquisition module 702 obtains is greater than Quantity, be arranged dialog box in button arrangement mode be longitudinal arrangement, and be arranged button have be greater than or equal to most greatly enhance Second length of degree.
When button quantity is more, be not easy to transversely arranged certainly when, button is directly set and is arranged as longitudinal arrangement.Such as figure 5 show the effect picture after five button A, B, C, D, E longitudinal arrangements in dialog box.
In another embodiment of the disclosure, as shown in Figure 10, described device further include:
Second obtains module 705, is configured as the corresponding relationship according to preset arrangement mode and button Background, obtains Button Background corresponding to the arrangement mode that setup module 703 is arranged;
Display module 704, the arrangement mode and second for being configured as being arranged according to setup module 703 obtain module 705 The button Background of acquisition shows dialog box.
The disclosure also provides a kind of device for showing dialog box, comprising:
Processor;
It is configured as the memory of storage processor executable instruction;
Wherein, processor is configured as:
The operation of detection display dialog box;
Obtain the quantity of the button in the corresponding dialog box to be shown of the operation and to be shown in each button The maximum length of character;
According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;
The dialog box is shown according to the arrangement mode of setting.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Figure 11 is shown according to an exemplary embodiment a kind of for showing the block diagram of the device 800 of dialog box.For example, Device 800 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, doctor Treat equipment, body-building equipment, personal digital assistant etc..
Referring to Fig.1 1, device 800 may include following one or more components: processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in equipment 800.These data are shown Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 may include power management system System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between device 800 and user.In some realities It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detect duration and pressure relevant to touch or slide.In some embodiments, multimedia component 808 includes One front camera and/or rear camera.It is such as in a shooting mode or a video mode, preceding when equipment 800 is in operation mode It sets camera and/or rear camera can receive external multi-medium data.Each front camera and rear camera can Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor module 814 can detecte the state that opens/closes of equipment 800, the relative positioning of component, such as component For the display and keypad of device 800, sensor module 814 can be with the position of 800 1 components of detection device 800 or device Set change, the existence or non-existence that user contacts with device 800, the temperature in 800 orientation of device or acceleration/deceleration and device 800 Variation.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, for answering in imaging With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, communication component 816 further includes near-field communication (NFC) module, to promote short range communication.For example, Radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, bluetooth can be based in NFC module (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete the above method.For example, Non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light Data storage device etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is held by the processor of mobile terminal When row, so that mobile terminal is able to carry out a kind of method for showing dialog box, method includes:
The operation of detection display dialog box;
Obtain the quantity of the button in the corresponding dialog box to be shown of the operation and to be shown in each button The maximum length of character;
According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;
The dialog box is shown according to the arrangement mode of setting.
Optionally, the quantity and the maximum length according to the button, is arranged the button in the dialog box Arrangement mode, comprising:
If the quantity of the button is less than or equal to preset quantity, the first length of the button is obtained, described first is long Degree is the length that each button has when the button is horizontally arranged in the dialog box;
If the maximum length is greater than first length, it is longitudinal that the arrangement mode of the button in the dialog box, which is arranged, Arrangement, and the button is set with the second length more than or equal to the maximum length.
Optionally, the quantity and the maximum length according to the button, is arranged the button in the dialog box Arrangement mode, further includes:
If the quantity of the button is greater than the preset quantity, the arrangement mode for the button being arranged in the dialog box is vertical To arrangement, and the button is set with the second length more than or equal to the maximum length.
Optionally, first length is obtained, comprising:
According to the length of the preset dialog box and the quantity of the button, first length is obtained.
Optionally, the method also includes:
According to the corresponding relationship of preset arrangement mode and button Background, pressed corresponding to the arrangement mode for obtaining setting Button Background;
The dialog box is shown according to the arrangement mode of setting, comprising:
The dialog box is shown according to the arrangement mode of setting and the button Background of acquisition.
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (7)

1. a kind of method for showing dialog box characterized by comprising
The operation of detection display dialog box;
The quantity for obtaining the button in the corresponding dialog box to be shown of the operation and the character to be shown in each button Maximum length;
According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;
The dialog box is shown according to the arrangement mode of setting;
The quantity and the maximum length according to the button, is arranged the arrangement mode of the button in the dialog box, Include:
If the quantity of the button is less than or equal to preset quantity, the first length of the button is obtained, first length is The button length that each button has when being horizontally arranged in the dialog box;If the maximum length is greater than described first Length, be arranged the button in the dialog box arrangement mode be longitudinal arrangement, and be arranged the button have be greater than or wait In the second length of the maximum length;
If the quantity of the button is greater than the preset quantity, the arrangement mode of the button in the dialog box is set for longitudinal row Column, and the button is set with the second length more than or equal to the maximum length.
2. the method according to claim 1, wherein obtaining first length, comprising:
According to the length of the preset dialog box and the quantity of the button, first length is obtained.
3. the method according to claim 1, wherein the method also includes:
According to the corresponding relationship of preset arrangement mode and button Background, the back of button corresponding to the arrangement mode of setting is obtained Jing Tu;
The dialog box is shown according to the arrangement mode of setting, comprising:
The dialog box is shown according to the arrangement mode of setting and the button Background of acquisition.
4. a kind of device for showing dialog box characterized by comprising
Detection module, for detecting the operation of display dialog box;
First obtains module, for obtaining the button in the corresponding dialog box to be shown of operation that the detection module detects The maximum length of quantity and the character to be shown in each button;
Setup module, for obtaining the quantity and the maximum length of the button that module obtains according to described first, if Set the arrangement mode of the button in the dialog box;
Display module, arrangement mode for being arranged according to the setup module show the dialog box;
The setup module, comprising:
Acquisition submodule, if the quantity for obtaining the button that module obtains for described first is less than or equal to preset quantity, The first length of the button is obtained, first length is that the button is horizontally arranged in each button when the dialog box The length having;
First setting submodule, if obtaining the maximum length that module obtains for described first is greater than the acquisition submodule First length obtained, the arrangement mode that the button in the dialog box is arranged is longitudinal arrangement, and is pressed described in setting Button has the second length more than or equal to the maximum length;
Second setting submodule, if the quantity for obtaining the button that module obtains for described first is greater than the present count Amount, be arranged the button in the dialog box arrangement mode be longitudinal arrangement, and be arranged the button have be greater than or equal to Second length of the maximum length.
5. device according to claim 4, which is characterized in that the acquisition submodule, for according to preset described right The length of frame and the quantity of the button are talked about, first length is obtained.
6. device according to claim 4, which is characterized in that described device further include:
Second acquisition module obtains the setting mould for the corresponding relationship according to preset arrangement mode and button Background Button Background corresponding to the arrangement mode of block setting;
The display module, the arrangement mode and described second for being also used to be arranged according to the setup module obtain module and obtain Button Background show the dialog box.
7. a kind of device for showing dialog box, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The operation of detection display dialog box;
The quantity for obtaining the button in the corresponding dialog box to be shown of the operation and the character to be shown in each button Maximum length;
According to the quantity of the button and the maximum length, the arrangement mode of the button in the dialog box is set;
The dialog box is shown according to the arrangement mode of setting;
The quantity and the maximum length according to the button, is arranged the arrangement mode of the button in the dialog box, Include:
If the quantity of the button is less than or equal to preset quantity, the first length of the button is obtained, first length is The button length that each button has when being horizontally arranged in the dialog box;If the maximum length is greater than described first Length, be arranged the button in the dialog box arrangement mode be longitudinal arrangement, and be arranged the button have be greater than or wait In the second length of the maximum length;
If the quantity of the button is greater than the preset quantity, the arrangement mode of the button in the dialog box is set for longitudinal row Column, and the button is set with the second length more than or equal to the maximum length.
CN201610262849.5A 2016-04-25 2016-04-25 The method and apparatus for showing dialog box Active CN105930034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610262849.5A CN105930034B (en) 2016-04-25 2016-04-25 The method and apparatus for showing dialog box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610262849.5A CN105930034B (en) 2016-04-25 2016-04-25 The method and apparatus for showing dialog box

Publications (2)

Publication Number Publication Date
CN105930034A CN105930034A (en) 2016-09-07
CN105930034B true CN105930034B (en) 2019-03-15

Family

ID=56837162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610262849.5A Active CN105930034B (en) 2016-04-25 2016-04-25 The method and apparatus for showing dialog box

Country Status (1)

Country Link
CN (1) CN105930034B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102363499B1 (en) * 2017-10-09 2022-02-15 후아웨이 테크놀러지 컴퍼니 리미티드 Display processing method and electronic device
CN109710368B (en) * 2018-12-29 2021-10-22 联想(北京)有限公司 Processing method, device and system
CN114115779B (en) * 2021-11-22 2024-03-15 珠海格力电器股份有限公司 Parameter display control method and device, display panel and household appliance

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040018609A (en) * 2002-08-23 2004-03-04 에스케이 텔레콤주식회사 Method and System for Providing Long Message Services by Using a Telecommunication Network
CN1916843A (en) * 2006-09-06 2007-02-21 华为技术有限公司 Method and system for laying out and accessing modules of user interface
CN101741954A (en) * 2009-12-18 2010-06-16 中兴通讯股份有限公司 Mobile terminal and method for dynamically adjusting display of soft keys in menu bar
CN104199626A (en) * 2014-05-15 2014-12-10 小米科技有限责任公司 Background display method, device and electronic device
CN104216616A (en) * 2014-08-27 2014-12-17 深圳创维-Rgb电子有限公司 Interactive processing method and system of display interface
CN104317519A (en) * 2014-10-23 2015-01-28 广州华多网络科技有限公司 Interface button application method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040018609A (en) * 2002-08-23 2004-03-04 에스케이 텔레콤주식회사 Method and System for Providing Long Message Services by Using a Telecommunication Network
CN1916843A (en) * 2006-09-06 2007-02-21 华为技术有限公司 Method and system for laying out and accessing modules of user interface
CN101741954A (en) * 2009-12-18 2010-06-16 中兴通讯股份有限公司 Mobile terminal and method for dynamically adjusting display of soft keys in menu bar
CN104199626A (en) * 2014-05-15 2014-12-10 小米科技有限责任公司 Background display method, device and electronic device
CN104216616A (en) * 2014-08-27 2014-12-17 深圳创维-Rgb电子有限公司 Interactive processing method and system of display interface
CN104317519A (en) * 2014-10-23 2015-01-28 广州华多网络科技有限公司 Interface button application method and system

Also Published As

Publication number Publication date
CN105930034A (en) 2016-09-07

Similar Documents

Publication Publication Date Title
US11334225B2 (en) Application icon moving method and apparatus, terminal and storage medium
JP6321296B2 (en) Text input method, apparatus, program, and recording medium
CN106657780B (en) Image preview method and device
JP6322768B2 (en) Call interface display method and apparatus
CN104731688B (en) Point out the method and device of reading progress
CN106034170B (en) Group's generation method and device
CN105426086A (en) Display processing method and device of searching functional block in page
US9959487B2 (en) Method and device for adding font
CN107798309B (en) Fingerprint input method and device and computer readable storage medium
CN106033397B (en) Memory buffer area adjusting method, device and terminal
CN104978200A (en) Application program display method and device
CN105447109A (en) Key word searching method and apparatus
CN105242942A (en) Application control method and apparatus
US10013151B2 (en) Method and terminal device for adjusting widget
CN105930034B (en) The method and apparatus for showing dialog box
CN105786944A (en) Method and device for automatically turning pages of browser
CN112584222A (en) Video processing method and device for video processing
CN110221739A (en) A kind of data processing method, device and electronic equipment
CN104199609A (en) Cursor positioning method and device
CN106844717A (en) Webpage search display methods and device
JP2017520877A (en) SEARCH METHOD, SEARCH DEVICE, PROGRAM, AND RECORDING MEDIUM
CN104836880A (en) Method and device for processing contact person head portrait
CN106101372B (en) Using prompting setting method and device
CN106060253B (en) Information presentation method and device
CN105677406A (en) Application operating method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant