CN103927186A - Method for controlling function key based on Android system - Google Patents

Method for controlling function key based on Android system Download PDF

Info

Publication number
CN103927186A
CN103927186A CN201410181317.XA CN201410181317A CN103927186A CN 103927186 A CN103927186 A CN 103927186A CN 201410181317 A CN201410181317 A CN 201410181317A CN 103927186 A CN103927186 A CN 103927186A
Authority
CN
China
Prior art keywords
function button
function
screen
coordinate
button
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.)
Granted
Application number
CN201410181317.XA
Other languages
Chinese (zh)
Other versions
CN103927186B (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.)
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201410181317.XA priority Critical patent/CN103927186B/en
Publication of CN103927186A publication Critical patent/CN103927186A/en
Application granted granted Critical
Publication of CN103927186B publication Critical patent/CN103927186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for controlling a function key based on an Android system. The method includes the steps that firstly, whether a dragging event occurs in the function key or not is judged, and if yes, the second step is executed; secondly, position setting function information stored in a database is read, whether the position setting function of the function key is started or not is judged, and if yes, the third step is executed; thirdly, a track coordinate value generated when a user conducts dragging operation is read, and the function key is moved according to the track coordinate value; fourthly, whether the dragging event is finished or not is judged, if yes, the fifth step is executed, and if not, the third step is repeated; fifthly, a coordinate value, in the database, of the function key is changed into the coordinate value, generated when the dragging event is finished, of the function key. By the adoption of the method, the position of the function key on a screen can be freely configured, expansibility and flexibility of the function key are improved, and user experience is improved.

Description

A kind of function button control method based on Android system
Technical field
The present invention relates to human-computer interaction technique field, relate in particular to a kind of function button control method based on Android system.
Background technology
In the prior art, the position of the function button of the handheld terminal based on Android system (as return key, home key, menu key etc.) is fixing not revisable.Yet along with the change in size of handheld terminal, the fixing of function button position can not guarantee that it is all rationally distributed and attractive in appearance on the handheld terminal of various sizes.Meanwhile, due to user's hand size and to handheld terminal to hold custom different, the fixing function button in position cannot meet the user demand of different user, has affected customer experience.
In the handheld terminal of existing configurable functionality button, system is by topology file (layout.xml), to come the position of writing function button, and the equipment of different screen size is adjusted the position of function button by loading different topology file realizations.Yet the handheld terminal of a kind of screen size and resolution can only be used a set of topology file, and after loading, the position of function button just can not change, and makes it lack dirigibility.
Summary of the invention
The embodiment of the present invention proposes a kind of function button control method based on Android system, can the position of free configuration feature button on screen, increase extendability and the dirigibility of function button, and improve user and experience.
The embodiment of the present invention provides a kind of function button control method based on Android system, comprising:
S1: whether arbitration functions button pulls event, if so, performs step S2;
S2: the set positions function information of preserving in reading database, and judge that whether the set positions function of described function button is opened, if open, performs step S3;
S3: read the trajectory coordinates value of user while carrying out drag operation, and move described function button according to described trajectory coordinates value;
S4: pull event described in judgement and whether finish, if so, perform step S5, if not, return to step S3;
S5: the coordinate figure of the function button when pulling event described in the coordinate figure of function button described in database is revised as and finishing.
Further, before described step S1, also comprise:
S01: the screen orientation information of preserving in reading database, and judge that whether current screen direction is consistent with the screen orientation information of preserving, if consistent, perform step S02, if inconsistent, screen orientation information in database be revised as to current screen directional information, and perform step S03;
S02: the coordinate figure of the function button of preserving in reading database, and calculate the layout parameter of described function button on screen according to the coordinate figure of preserving; And perform step S04;
S03: the coordinate figure that calculates described function button according to the Aspect Ratio of screen, and the coordinate figure of function button described in database is revised as to the coordinate figure of the function button after calculating, and calculate the layout parameter of described function button on screen according to the coordinate figure after calculating;
S04: described function button is loaded on screen according to described layout parameter.
Implement the embodiment of the present invention, there is following beneficial effect:
The function button control method based on Android system that the embodiment of the present invention provides can, by increase the coordinate figure of function button in database, make user come the position of free configuration feature button on screen according to different application programs; By increase screen orientation information in database, make the fixed position that function button still can be in relative screen when screen orientation changes; By increase set positions function information in database, make user freely select whether to need the position of set-up function button; Increase extendability and the dirigibility of function button, improve user and experience.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of first embodiment of the function button control method based on Android system provided by the invention;
Fig. 2 is the schematic flow sheet of second embodiment of the function button control method based on Android system provided by the invention;
Fig. 3 is the structural representation of configuration interface.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Referring to Fig. 1, be the schematic flow sheet of an embodiment of the function button control method based on Android system provided by the invention, comprising:
S1: whether arbitration functions button pulls event, if so, performs step S2;
S2: the set positions function information of preserving in reading database, and whether the set positions function of arbitration functions button open, if open, performs step S3;
S3: read the trajectory coordinates value of user while carrying out drag operation, and according to trajectory coordinates value locomotive function button;
S4: whether judgement pulls event and finish, and if so, performs step S5, if not, returns to step S3;
S5: the coordinate figure of the function button when coordinate figure of function button in database is revised as to the event of pulling and finishes.
Further, as shown in Figure 2, before step S1, also comprise:
S01: the screen orientation information of preserving in reading database, and judge that whether current screen direction is consistent with the screen orientation information of preserving, if consistent, perform step S02, if inconsistent, screen orientation information in database be revised as to current screen directional information, and perform step S03;
S02: the coordinate figure of the function button of preserving in reading database, and according to the coordinate figure computing function button of preserving the layout parameter on screen; And perform step S04;
S03: according to the coordinate figure of the Aspect Ratio computing function button of screen, and the coordinate figure of function button in database is revised as to the coordinate figure of the function button after calculating, and according to the coordinate figure computing function button after calculating the layout parameter on screen;
S04: function button is loaded on screen according to layout parameter.
It should be noted that, when each startup system, all need to detect screen orientation and whether change.If screen orientation changes, i.e., during system generation roller blind, length and the width of screen change, and system need recalculate the coordinate figure of function button according to the Aspect Ratio of current screen, make function button still on the position with relative before roller blind.
In Android system, different layout type correspondences different layout parameter.The coordinate figure of function button need be calculated as according to concrete layout type corresponding layout parameter and be loaded on screen.
Further, after step S5, also comprise:
S6: the set positions function of closing function button, the coordinate figure of lock function button.
It should be noted that, the set positions function that system opens or closes function button can open or close set positions function button at configuration interface by user and realize.Wherein, configuration interface is arranged on the primary system Settings layer of Android.One preferred embodiment in, at Settings layer, increase a function_keys_position column, and in function_keys_position column, add function_keys_position.xml file and function_keys_position.java file.Wherein, the layout of function_keys_position.xml document definition configuration interface, the logic of function_keys_position.java document definition configuration interface.As shown in Figure 3, user opens configuration interface, clicks the D item in configuration interface left side, and D item arranges button for function key position, and the interface that function key position arranges appears in configuration interface right side.When user chooses ena-bung function key position this function is set, the set positions function of opening function button; When user cancels when choosing ena-bung function key position this function being set, the set positions function of closing function button.
Further, step S2 specifically comprises:
Set positions function information in reading database, if set positions function information is true, the set positions function of function button is for opening; If set positions function information is false, the set positions function of function button is for closing.
Further, step S3 specifically comprises:
Read the trajectory coordinates value of user while carrying out drag operation, and horizontal direction displacement and the vertical direction displacement with respect to current location according to trajectory coordinates value set-up function button, function button is moved according to trajectory coordinates value.Concrete, when user carries out drag operation, system adopts the method for the setTranslationX that calls in graphic element (View class) and setTranslationY to change the position of function button.
Further, screen orientation information comprises horizontal screen status information and perpendicular screen status information.
One preferred embodiment in, function button comprises return key, home key and menu key.Corresponding with function button, in the database of the primary system Framework layer of Android, increase by 8 key assignments, be respectively return_button_x, return_button_y, home_button_x, home_button_y, menu_button_x, menu_button_y, function_buttons_config_rotation and function_buttons_position_configable.Wherein, return_button_x, return_button_y are respectively x axial coordinate value, the y axial coordinate value of return key, home_button_x, home_button_y are respectively x axial coordinate value, the y axial coordinate value of home key, menu_button_x, menu_button_y are respectively x axial coordinate value, the y axial coordinate value of menu key, function_buttons_config_rotation is screen orientation information, and function_buttons_position_configable is set positions function information.
The coordinate figure of return key, home key and menu key can read at any time and revise from system database, system is loaded into return key, home key and menu key on screen by the coordinate figure in database dynamically, realizes freely configuring of return key on screen, home key and menu key position.Function_buttons_config_rotation key assignments comprises horizontal screen state and perpendicular screen state.When there is roller blind, system need recalculate the coordinate figure of return key, home key and menu key according to the Aspect Ratio of current screen, meanwhile, and the function_buttons_config_rotation key assignments in Update Table storehouse.Function_buttons_position_configable key assignments comprises open mode and closed condition.When user is when configuration interface is chosen ena-bung function key position this function is set, in the interface Update Table storehouse in calling data storehouse, function_buttons_position_configable key assignments is true, make the set positions function of return key, home key and menu key in open mode, for user, on screen, freely configure the position of return key, home key and menu key; When user cancels when choosing ena-bung function key position this function being set, in the interface Update Table storehouse in calling data storehouse, function_buttons_position_configable key assignments is false, make the set positions function of return key, home key and menu key in closed condition, thus locking return key, home key and the position of menu key on screen.
The function button control method based on Android system that the embodiment of the present invention provides can, by increase the coordinate figure of function button in database, make user come the position of free configuration feature button on screen according to different application programs; By increase screen orientation information in database, make the fixed position that function button still can be in relative screen when screen orientation changes; By increase set positions function information in database, make user freely select whether to need the position of set-up function button; Increase extendability and the dirigibility of function button, improve user and experience.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.

Claims (6)

1. the function button control method based on Android system, is characterized in that, comprising:
S1: whether arbitration functions button pulls event, if so, performs step S2;
S2: the set positions function information of preserving in reading database, and judge that whether the set positions function of described function button is opened, if open, performs step S3;
S3: read the trajectory coordinates value of user while carrying out drag operation, and move described function button according to described trajectory coordinates value;
S4: pull event described in judgement and whether finish, if so, perform step S5, if not, return to step S3;
S5: the coordinate figure of the function button when pulling event described in the coordinate figure of function button described in database is revised as and finishing.
2. the function button control method based on Android system as claimed in claim 1, is characterized in that, before described step S1, also comprises:
S01: the screen orientation information of preserving in reading database, and judge that whether current screen direction is consistent with the screen orientation information of preserving, if consistent, perform step S02, if inconsistent, screen orientation information in database be revised as to current screen directional information, and perform step S03;
S02: the coordinate figure of the function button of preserving in reading database, and calculate the layout parameter of described function button on screen according to the coordinate figure of preserving; And perform step S04;
S03: the coordinate figure that calculates described function button according to the Aspect Ratio of screen, and the coordinate figure of function button described in database is revised as to the coordinate figure of the function button after calculating, and calculate the layout parameter of described function button on screen according to the coordinate figure after calculating;
S04: described function button is loaded on screen according to described layout parameter.
3. the function button control method based on Android system as claimed in claim 1, is characterized in that, after described step S5, also comprises:
S6: close the set positions function of described function button, lock the coordinate figure of described function button.
4. the function button control method based on Android system as claimed in claim 1, is characterized in that, described step S2 specifically comprises:
Set positions function information in reading database, if described set positions function information is true, the set positions function of described function button is for opening; If described set positions function information is false, the set positions function of described function button is for closing.
5. the function button control method based on Android system as claimed in claim 1, is characterized in that, described step S3 specifically comprises:
Read the trajectory coordinates value of user while carrying out drag operation, and set described function button with respect to horizontal direction displacement and the vertical direction displacement of current location according to described trajectory coordinates value, described function button is moved according to described trajectory coordinates value.
6. the function button control method based on Android system as claimed in claim 2, is characterized in that, described screen orientation information comprises horizontal screen status information and perpendicular screen status information.
CN201410181317.XA 2014-04-30 2014-04-30 A kind of function button control method based on android system Active CN103927186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410181317.XA CN103927186B (en) 2014-04-30 2014-04-30 A kind of function button control method based on android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410181317.XA CN103927186B (en) 2014-04-30 2014-04-30 A kind of function button control method based on android system

Publications (2)

Publication Number Publication Date
CN103927186A true CN103927186A (en) 2014-07-16
CN103927186B CN103927186B (en) 2017-11-03

Family

ID=51145418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410181317.XA Active CN103927186B (en) 2014-04-30 2014-04-30 A kind of function button control method based on android system

Country Status (1)

Country Link
CN (1) CN103927186B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446745A (en) * 2015-12-15 2016-03-30 惠州Tcl移动通信有限公司 Self-defining method and system for function keys in display area of mobile terminal
CN105808032A (en) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 Focus control method and device based on android control
CN106339165A (en) * 2016-08-18 2017-01-18 广州视睿电子科技有限公司 Object position adjusting method and device
CN109960456A (en) * 2019-03-12 2019-07-02 维沃移动通信有限公司 A kind of generation method and terminal device of virtual key layout

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369210A (en) * 2008-08-22 2009-02-18 深圳华为通信技术有限公司 Method and device for regulating user interface element
US20130002565A1 (en) * 2011-06-28 2013-01-03 Microsoft Corporation Detecting portable device orientation and user posture via touch sensors
CN102945112A (en) * 2012-10-11 2013-02-27 广东欧珀移动通信有限公司 Method for managing Android functional key and mobile intelligent terminal thereof
CN103472992A (en) * 2013-08-29 2013-12-25 广东欧珀移动通信有限公司 Method of dynamically adjusting shoot button and mobile terminal
CN103576958A (en) * 2012-07-31 2014-02-12 英业达科技有限公司 Touch device with function keys and function key processing method of touch device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369210A (en) * 2008-08-22 2009-02-18 深圳华为通信技术有限公司 Method and device for regulating user interface element
US20130002565A1 (en) * 2011-06-28 2013-01-03 Microsoft Corporation Detecting portable device orientation and user posture via touch sensors
CN103576958A (en) * 2012-07-31 2014-02-12 英业达科技有限公司 Touch device with function keys and function key processing method of touch device
CN102945112A (en) * 2012-10-11 2013-02-27 广东欧珀移动通信有限公司 Method for managing Android functional key and mobile intelligent terminal thereof
CN103472992A (en) * 2013-08-29 2013-12-25 广东欧珀移动通信有限公司 Method of dynamically adjusting shoot button and mobile terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808032A (en) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 Focus control method and device based on android control
CN105808032B (en) * 2014-12-30 2019-04-26 Tcl集团股份有限公司 Focus control method and device based on android control
CN105446745A (en) * 2015-12-15 2016-03-30 惠州Tcl移动通信有限公司 Self-defining method and system for function keys in display area of mobile terminal
CN106339165A (en) * 2016-08-18 2017-01-18 广州视睿电子科技有限公司 Object position adjusting method and device
CN106339165B (en) * 2016-08-18 2019-06-11 广州视睿电子科技有限公司 The method of adjustment and device of object's position
CN109960456A (en) * 2019-03-12 2019-07-02 维沃移动通信有限公司 A kind of generation method and terminal device of virtual key layout
CN109960456B (en) * 2019-03-12 2021-06-15 维沃移动通信有限公司 Virtual key layout generation method and terminal equipment

Also Published As

Publication number Publication date
CN103927186B (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN105637564B (en) Generate the Augmented Reality content of unknown object
CN103927186A (en) Method for controlling function key based on Android system
CN107219916B (en) Multi-platform based experience generation
US10048824B2 (en) User terminal device and display method thereof
CN103049250A (en) Interface control method and terminal
CN104885047A (en) Terminal and terminal operating method
CN103116454B (en) A kind of mobile terminal touch screen view layout method of adjustment
KR20110090642A (en) Method for displaying the lock screen of terminal including touch screen and the terminal
CN106185497B (en) System and method for calling starting elevator service by inputting elevator call
KR20140112918A (en) Method and apparatus for controlling screen display using temperature and humidity
TW201525776A (en) Invocation control over keyboard user interface
CN105934739A (en) Virtual mouse for a touch screen device
US20130298079A1 (en) Apparatus and method for unlocking an electronic device
JP2011128962A (en) Information processing apparatus and method, and computer program
CN107074486A (en) By inputting the system and method that elevator call calls startup elevator service
EP2631823A1 (en) Method and apparatus for editing content view in a mobile device
CN106326566B (en) A kind of inner and outer decorative parts of automobile Supermarket design platform and method
JP2019504728A (en) Clothing processing equipment
CN103491243A (en) Rapid unlocking method of smart phone
CN101662621A (en) Method and device for adjusting television menu
CN102929506A (en) Method for quickly adding desktop elements to desktop
CN103279305A (en) Terminal device and control method thereof
CN104331249A (en) Operation control method and operation control device using terminal equipment simulation remote controller
CN106611119A (en) Terminal unlocking method and apparatus, and intelligent terminal
CN105759644B (en) The device that the field device of automated system is managed and is configured

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181030

Address after: 510663 5, No. 192, Ke Zhu Road, Guangzhou economic and Technological Development Zone, Guangdong

Patentee after: Guangzhou Mdt InfoTech Ltd

Address before: 510663, 4, No. 192, Ke Zhu Road, science and Technology City, Guangzhou high tech Industrial Development Zone, Guangdong

Patentee before: Guangzhou CVT Electronics Technology Co., Ltd.