Invention content
The technical problem to be solved in the present invention is to provide a kind of interface control method, device and mobile terminals.
To solve the above-mentioned problems, the present invention provides a kind of interface control methods, including:
Configure the correspondence of contact region size and/or shape and interface resources layout;
The contact region size and/or shape on touch screen is obtained, according to the current contact area size and/or shape
Its corresponding interface resources layout is searched, by the interface of touch screen described in the interface resources distributing adjustment.
Further, the above method can also have the characteristics that, interface resources layout include menu on interface with/
Or the size and/or shape information of word.
Further, the above method can also have the characteristics that, the contact region size obtained on touch screen includes:
Contact position information is read, formation presses region, the size in region is pressed described in acquisition as contact region size;
Alternatively, reading contact position information, region is pressed in formation, and the minimum square for pressing region is accommodated according to the Area generation of pressing
Shape, using the size of the minimum rectangle as contact region size.
Further, the above method can also have the characteristics that, pair of the contact region size and interface resources layout
In should being related to, menu and/or word accordingly increase in its corresponding interface resources layout when contact region area increases.
Further, the above method can also have the characteristics that, the method further includes preserving current contact area size
And/or shape information, or current contact area size and/or the corresponding interface resources layout of shape information are preserved, subsequently make
In, according to the contact region size and/or shape information of preservation, its corresponding interface resources layout carries out touch screen interface
It has been shown that, alternatively, being laid out the display for carrying out touch screen interface according to the interface resources of preservation.
The present invention also provides a kind of interface control device, including user data acquisition module, Users'Data Analysis module and
Interface generation module, wherein:
User data acquisition module is used for:Contact position information on collection touch is reported to the user data point
Analyse module;
Users'Data Analysis module is used for:Current contact area size and/or shape are determined according to the contact position information
Shape;
Interface generation module is used for:Search pair of configured contact region size and/or shape and interface resources layout
It should be related to, obtain the current contact area size and/or the corresponding interface resources layout of shape, be laid out by the interface resources
Adjust the interface of the touch screen.
Further, above-mentioned apparatus can also have the characteristics that, interface resources layout include menu on interface with/
Or the size and/or shape information of word.
Further, above-mentioned apparatus can also have the characteristics that, the Users'Data Analysis module is for by such as lower section
Formula determines contact region size:Region is pressed according to contact position information formation, the size that region is pressed described in acquisition is made
For contact region size;Alternatively, pressing region according to contact position information formation, accommodated according to the Area generation of pressing
This presses the minimum rectangle in region, using the size of the minimum rectangle as contact region size.
Further, above-mentioned apparatus can also have the characteristics that, pair of the contact region size and interface resources layout
In should being related to, menu and/or word accordingly increase in its corresponding interface resources layout when contact region area increases.
Further, above-mentioned apparatus can also have the characteristics that, described device further includes user data memory module, is used for
Current contact area size and/or shape information are preserved, or preserves current contact area size and/or shape information is corresponding
Interface resources are laid out;
The interface generation module is additionally operable to:Subsequently in use, according to the contact region size and/or shape information of preservation
Its corresponding interface resources layout carries out the display of touch screen interface, alternatively, being touched according to the interface resources of preservation layout
Shield the display at interface.
The present invention also provides a kind of mobile terminals including above-mentioned interface control device.
The present invention can change interface resources layout according to contact region, reduce maloperation number.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature mutually can arbitrarily combine.
The embodiment of the present invention provides a kind of interface control method, including:
Configure the correspondence of contact region size and/or shape and interface resources layout;
The contact region size and/or shape on touch screen is obtained, according to the current contact area size and/or shape
Its corresponding interface resources layout is searched, by the interface of touch screen described in the interface resources distributing adjustment.
Wherein, the interface resources layout includes the size and/or shape information of menu and/or word on interface.
Wherein, the contact region size obtained on touch screen includes:
Contact position information is read, formation presses region, the size in region is pressed described in acquisition as contact region size;
Alternatively, reading contact position information, region is pressed in formation, and the minimum square for pressing region is accommodated according to the Area generation of pressing
Shape, using the size of the minimum rectangle as contact region size.
Wherein, in the correspondence of the contact region size and interface resources layout, when contact region area increases its
Menu and/or word accordingly increase in corresponding interface resources layout.Boundary can also be accordingly adjusted according to the shape of contact region
Menu and/or word shape in the resource placement of face.
Wherein, the method further includes preserving current contact area size and/or shape information, or preserve current touch
Point area size and/or the corresponding interface resources layout of shape information, subsequently in use, according to the contact region size of preservation
And/or shape information its corresponding interface resources layout carries out the display of touch screen interface, alternatively, according to the interface resources of preservation
Layout carries out the display of touch screen interface.
Wherein, when obtaining the size and/or shape of contact region, multi collect can be carried out, is averaged.In addition, can
To provide an acquisition function choosing-item contact region information collection is carried out when user selects the function choosing-item.It is of course also possible to
Automatic collection contact region information.
As shown in Figure 1, the present invention also provides a kind of interface control devices, including:
User data acquisition module for the contact position information on collection touch, and is reported to Users'Data Analysis
Module;
Users'Data Analysis module, for determining current contact area size and/or shape according to the contact position information
Shape;Wherein, current contact area size is determined as follows:Region is pressed according to contact position information formation, is obtained
The size for pressing region is as contact region size;Alternatively, region is pressed according to contact position information formation, according to
The Area generation of pressing accommodates the minimum rectangle for pressing region, using the size of the minimum rectangle as contact region size.
User data memory module:For preserving current contact area size and/or shape information, or preserve current touch
Point area size and/or the corresponding interface resources layout of shape information;
Interface generation module:Search the corresponding pass that configured contact region size and/or shape is laid out with interface resources
System obtains the current contact area size and/or the corresponding interface resources layout of shape, by the interface resources distributing adjustment
The interface of the touch screen, it is follow-up in use, its corresponding interface provides according to the contact region size and/or shape information of preservation
Source layout carries out the display of touch screen interface, alternatively, being laid out the display for carrying out touch screen interface according to the interface resources of preservation.
The present invention also provides a kind of mobile terminals including above-mentioned interface control device.
It is further illustrated the present invention below by specific embodiment.
According to the medium of the operation principle and transmission information of touch screen, touch screen can be divided into four kinds, respectively resistance-type, electricity
Hold induction type, infrared-type and surface acoustic wave type.The touch screen of current more mainstream is capacitance touch screen, herein also with capacitance
Touch screen is introduced as model.Capacitance touch screen is worked using the electric current induction of human body.Capacitive touch screen
It is one piece of four-layer compound glass screen, the inner surface and interlayer of glass screen are respectively coated with one layer of ITO, and outermost layer is a thin layer silicon soil glass
Protective layer, interlayer ITO coatings draw four electrodes as working face on four angles, internal layer ITO is that shielded layer is good to ensure
Working environment.When finger touches on the metal layer, due to human body electric field, user and touch screen surface are formed with a coupling electricity
Hold, for high-frequency current, capacitance is direct conductor, and then finger siphons away the electric current of a very little from contact point.This electricity
Flow point is flowed out from the electrode on the quadrangle of touch screen, and flow through the electric currents of this four electrodes at a distance from finger to quadrangle at
Direct ratio, controller obtain the position of contact by being accurately calculated to this four current ratios.
By taking the special Meier mXT1386 chipsets of capacitance touch screen ATMEL love as an example, the special Meier mXT1386 chipsets of ATMEL love
Using the excellent multiple point touching technology of industry, there is unlimited touch, lowest power consumption, fastest response speed, highest signal to noise ratio and most
The advantages such as high sensitivity can detect the touch of nail, writing pencil and glove finger.It is widely applied to tablet computer
(tablet), smartbook (smartbook), mobile internet device (MID), net book, laptop and a series of works
On industry application apparatus.The present invention is not limited to specific touch screen, other touch screens are can be applicable to.
As shown in Fig. 2, interface control method of the embodiment of the present invention comprises the following processes:Contact information gatherer process, contact
Information analysis process, contact information storing process, UI (User Interface, user interface) generating process.
Contact information gatherer process:
As shown in figure 3, capacitive touch screen is usually the double-deck ITO structure, one layer is row battle array, and one layer is array.Its shape
Upper is usually diamond shape, and size needs to meet certain touch screen accuracy standard (sufficiently small).When we use finger in condenser type
When carrying out pressing operation on touch screen, touch screen control chip is scanned axial coordinate formula sensing unit matrix.Scanning result
It is recorded in relevant chip register, hardware driving layer reads corresponding register information from touch screen chip, obtains
Contact region information.
MXT1386 chips store contact screen information by the way of memory mapping, when user touches touch screen, memory
In contact information can be updated, while touch screen processing chip will produce hardware interrupts, be read in interrupt handling routine
Corresponding memory information, as shown in figure 4, TOUCH_MULTITOUCHSCREEN_T9 stores contact information.
Contact information analytic process:
Application layer software obtains button from bottom and acquires message, obtains corresponding contact information.According in contact information
Size sizes come judge show menu size.Certain strategy and rule can be formulated to update the configuration of menu size.Than
Such as Size sizes:
0~100 corresponds to configuration parameter config_info=1;
101~200 correspond to configuration parameter config_info=2;
201~300 correspond to configuration parameter config_info=3;
301~400 correspond to configuration parameter config_info=4;
Different configuration parameters can also be corresponded to according to the shape difference of contact region, alternatively, according to the big of contact region
It is small different with shape to correspond to different configuration parameters.Alternatively, it is also possible to directly directly correspond to interface resources layout, it is not provided with matching
Set parameter.
Contact information storing process:
Analysis result config_info is saved in terminal nonvolatile storage (such as Flash, efs file system, NV
Area etc.), in case can continue to use after power down.
UI interface generation process (the present embodiment by taking android system as an example, however, the present invention is not limited thereto system):
The layout (layout) of multigroup different menu and word size and/or shape is pre-defined in systems, it is different
The corresponding different config_info values of layout;Call different layout to menu according to config_info when display or
The size and/or shape of word is adjusted, as shown in figure 5, including:
The configuration information config_info of reading and saving;
For newly opening Activity, a new view is created according to the corresponding layouts of configuration information config_info
(view), new view and Activity are bound;
For currently needing the Activity adjusted, then first, in accordance with the corresponding layouts (layout) of config_info, wound
A new view is built, old view is replaced with new view.
Wherein, the display effect of UI is all carried out with the corresponding layouts of the config_info preserved during follow-up use
UI is shown.If user changes, contact information acquisition can be re-started, the display effect for enabling UI and the use of new user are practised
It is used to be consistent, and update the config_info of terminal storage area.
The present invention cannot be only used for mobile terminal, can also be applied to other devices, such as PC etc. for using touch screen.
Interface control method and device provided in an embodiment of the present invention, can be according to the size and/or shape of contact, to touching
Menu and word on screen carry out size and shape adjusting automatically, and the point for adapting it to currently used person touches custom, and reduction is pressed
Maloperation number when touch screen.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program
Related hardware is completed, and described program can be stored in computer readable storage medium, such as read-only memory, disk or CD
Deng.Optionally, all or part of step of above-described embodiment can also be realized using one or more integrated circuits.Accordingly
Ground, the form that hardware may be used in each module/unit in above-described embodiment are realized, the shape of software function module can also be used
Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.