CN102929537A - Android-based function menu interface display method and module - Google Patents

Android-based function menu interface display method and module Download PDF

Info

Publication number
CN102929537A
CN102929537A CN2012103853280A CN201210385328A CN102929537A CN 102929537 A CN102929537 A CN 102929537A CN 2012103853280 A CN2012103853280 A CN 2012103853280A CN 201210385328 A CN201210385328 A CN 201210385328A CN 102929537 A CN102929537 A CN 102929537A
Authority
CN
China
Prior art keywords
interface
function menu
menu interface
main interface
gesture
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
CN2012103853280A
Other languages
Chinese (zh)
Other versions
CN102929537B (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 Interactive Encyclopedia Network Technology Co.,Ltd.
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Interactive Online (beijing) Technology 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 Interactive Online (beijing) Technology Co Ltd filed Critical Interactive Online (beijing) Technology Co Ltd
Priority to CN201210385328.0A priority Critical patent/CN102929537B/en
Publication of CN102929537A publication Critical patent/CN102929537A/en
Application granted granted Critical
Publication of CN102929537B publication Critical patent/CN102929537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an Android-based function menu interface display method and an Android-based function menu interface display module. The method comprises the following steps of: adding a function menu interface and a main interface; judging the position of a touch point and performing a next step if the touch point is located on the main interface; judging whether a user makes a cross sliding gesture, and entering a next step if the user makes the cross sliding gesture; and moving the main interface in real time according to the gesture so as to display the function menu interface. The module comprises an interface addition unit, a first touch position judgment unit, a second touch position judgment unit and a movement unit. By a strict method process and a module design, a perfectly treated cross sliding effect is achieved, a user experience is enhanced, and the method and the device have a good business outlook.

Description

Function menu interface display method and module based on Android
Technical field
The present invention relates to the Android interface development.More specifically, the present invention relates to a kind of function menu interface display method and module based on Android.
Background technology
The exploitation of Android (Android) cell phone software is based on the SDK (Software Development Kit) SDK that Google provides, and according to software self-demand expansion or self-defined, writes code, and then develops software.The method of basic function, control or the special efficacy of exploitation android cell phone software is provided among the Android SDK, has experienced better special efficacy but want to make more beautiful, user, will write according to demand spreading code and realize.
Mobile phone is as a kind of palm instrument, the size of mobile phone screen always has certain restriction, therefore the displaying of content in the meeting restricted software interface in the time of the operation cell phone software, and almost in the interface of each software function button can be arranged, if these function buttons are received within same interface within will showing, can further reduce the space of content displaying.
In order to save space as much as possible to content displaying, can take function button is hidden the mode that shows again when needing.But it is particularly important that the position of hiding and Presentation Function button and mode are experienced the user, and it is worse that random hidden function button may cause whole user to experience.
Better for user's experience effect, need a kind of software function button to show the design that does not conflict and can make things convenient for the user to switch fast with software content.
Summary of the invention
The object of the invention is to provide a kind of function menu interface display method and module based on Android, strengthens the user in interface display and experiences.
Method of the present invention comprises:
Add function menu interface and main interface, described main interface is placed the upper strata at described function menu interface, described function menu interface comprises left function menu interface and/or right function menu interface.
When user's Touch Screen, judge the position of touch point, if touch point is on described main interface then carry out next step, if touch point is on the function menu interface then carried out user's gesture command by mobile phone operating system.
Whether the gesture of judging the user is horizontal slip, if otherwise carry out user's gesture command by mobile phone operating system, if so, then enter next step.
Thereby show described function menu interface according to the in real time mobile described main interface of described gesture.
Further, thus describedly in real time show that described function menu interface also comprises following substep in mobile described main interface according to described gesture:
Calculate respectively the size at described main interface and described function menu interface;
When main interface movement, respectively described main interface and described function menu interface are redrawn;
Gesture track according to the user calculates the direction of main interface transverse shifting and the distance of transverse shifting.
Function menu interface display module based on Android of the present invention comprises: interface adding device, the first position of touch judging unit, the second position of touch judging unit and mobile unit.
The interface adding device be used for to add function menu interface and main interface, and described main interface is placed the upper strata at described function menu interface, and described function menu interface comprises left function menu interface and/or right function menu interface;
The first position of touch judging unit, when being used for user's Touch Screen, judge the position of touch point, if touch point is on described main interface then start described the second position of touch judging unit, if touch point is on the function menu interface then carried out user's gesture command by mobile phone operating system;
The second position of touch judging unit is used for judging whether user's gesture is horizontal slip, if otherwise carry out user's gesture command by mobile phone operating system, if so, then start described mobile unit;
Mobile unit, thus be used for showing described function menu interface according to the in real time mobile described main interface of described gesture.
Described mobile unit further comprises following subelement:
The interface computing unit is for the size of calculating respectively described main interface and described function menu interface;
Main interface redraws the unit, is used for respectively described main interface and described function menu interface being redrawn when main interface movement;
Moving direction and metrics calculation unit are used for calculating the direction of main interface transverse shifting and the distance of transverse shifting according to user's gesture track.
The main interface selection function button simple realization sideslip effect only if in Android exploitation, will realize laterally sliding, the simple event effect of processing each interface, be difficult to satisfy the software users experience requirements, the present invention has realized one by rigorous method flow and modular design and has processed fairly perfect horizontal sliding effect, strengthen user's experience, had good commercial promise.
Description of drawings
Below with reference to accompanying drawings and in conjunction with the embodiments the present invention is specifically described.
Fig. 1 is the process flow diagram of method of the present invention;
Fig. 2 is each contact bed level synoptic diagram;
The effect synoptic diagram that Fig. 3 presents for carrying out the present invention;
Fig. 4 is the composition synoptic diagram of module of the present invention.
Embodiment
With reference to the accompanying drawings and by embodiments of the invention, technical scheme of the present invention is described in detail.
The invention provides a kind of function menu interface display method and module based on Android, described function menu interface display method based on Android comprises step S1 to step S4, specifies to see below.
Correspondingly, a kind of function menu interface display module based on Android provided by the invention comprises: interface adding device 1, the first position of touch judging unit 2, the second position of touch judging unit 3 and mobile unit 4.
Step S1 adds function menu interface and main interface, and described main interface is placed the upper strata at described function menu interface, and described function menu interface comprises left function menu interface and/or right function menu interface.
In Android exploitation, the design general using at interface is inherited the base class that Android SDK provides and the certain methods that rewrites in the base class realizes.Such as View class, ViewGroup class, HorizontalScrollView class, LinearLayout class or FrameLayout class.Utilized the ViewGroup class in the present embodiment.
Described interface adding device 1 is used for execution in step S1.
In this step S1, use the add method of ViewGroup class to create respectively main interface and function menu interface, software content is placed main interface, the function button of software is placed the function menu interface, thereby separate with the main interface at software content place, function button is become relatively independent menu interface.And, the main interface of showing software content is placed the upper strata at function menu interface, user friendly gesture includes but not limited to involved operation in following each step to main interface.Need to prove that the upper strata that described main interface is placed described function menu interface is when mobile phone screen shows, main interface is the covering function menu interface fully, only needs function button is placed the lower floor at main interface.Like this, the user does not need hidden function button specially can not affect the abundant displaying of software content on the main interface yet.When having left function menu interface and right function menu interface simultaneously, one of them function menu interface is on another function menu interface or all at same layer, as shown in Figure 2.Need to prove, in order to illustrate hierarchical relationship, the height at left and right function menu interface and main interface is had any different, in actual applications in Fig. 2 and Fig. 3, the view at each interface will require to carry out concrete adjustment according to mobile phone screen, be not limited to Fig. 2, form shown in Figure 3.
In addition, function button can divide as required and is listed in a plurality of function menus interface, present embodiment adds at least one function menu interface, and according to be divided into left function menu interface and/or right function menu interface with respect to the transverse shifting of main interface in following step.Each contact bed level synoptic diagram as shown in Figure 2.
Step S2, when user's Touch Screen, judge the position of touch point, if touch point is on described main interface then execution in step S3, if touch point is on the function menu interface then carried out user's gesture command by mobile phone operating system.
Described the first position of touch judging unit 2 is used for execution in step S2.
In the present embodiment, described the first position of touch judging unit 2 utilizes the onInterceptTouchEvent method in the ViewGroup class to judge, the onInterceptTouchEvent method is for the treatment of the touch-control event transfer, when the position of touch point is on described main interface, the onInterceptTouchEvent rreturn value is true, stop the transmission of touch-control event, described the first position of touch judging unit 2 starts described the second position of touch judging unit 3; When touch point on the function menu interface then the onInterceptTouchEvent rreturn value be false, then the touch-control event is continued to hand on, namely continue to be carried out by mobile phone operating system user's gesture command, described mobile phone operating system refers to the andriod mobile phone operating system, described gesture comprises to be clicked and slip, click can be chosen, the opening function item, and slip can moving boundary, and the gesture command of carrying out the user by mobile phone operating system described here belongs to known technology.
Step S3, judge whether user's gesture is horizontal slip, if otherwise carry out user's gesture command by mobile phone operating system, if so, then enter step S4.
The second position of touch judging unit 3 is used for execution in step S3.
In this step S3, the second position of touch judging unit 3 still utilizes the onInterceptTouchEvent method to judge, when user's gesture is not when laterally sliding, then rreturn value is false, the touch-control event is continued to hand on, namely continue to be carried out by mobile phone operating system user's gesture command; When user's gesture is when laterally sliding, rreturn value is true, stops the transmission of touch-control event, and described the second position of touch judging unit 3 starts mobile units 4.Judging whether laterally slides is greater than the longitudinal sliding motion distance according to horizontal sliding distance.In Android, laterally be the x axle, vertically be the y axle.User's gesture greater than the sliding distance in Y direction, is laterally to slide at the axial sliding distance of x when x direction of principal axis distance is greater than 20 pixel simultaneously.
Thereby step S4, in real time show described function menu interface in mobile described main interface according to described gesture.
Mobile unit 4 is used for execution in step S4.
Particularly, described step S4 comprises following substep:
S41, calculate the size at described main interface and described function menu interface respectively;
S42, when main interface movement, respectively described main interface and described function menu interface are redrawn;
S43, calculate the direction of main interface transverse shifting and the distance of transverse shifting according to user's gesture track.
Mobile unit 4 comprises following subelement:
Interface computing unit 41 is for the size of calculating respectively described main interface and described function menu interface;
Main interface redraws unit 42, is used for respectively described main interface and described function menu interface being redrawn when main interface movement;
Moving direction and metrics calculation unit 43 are used for calculating the direction of main interface transverse shifting and the distance of transverse shifting according to user's gesture track.
In the present embodiment, in step S41, interface computing unit 41 utilizes the onMeasure method to calculate the size of the view that described main interface and described function menu interface show, thereby guarantees that each interface display size is consistent all the time.When having left function menu interface and right function menu interface on the mobile phone screen, then utilize the onMeasure method to calculate the size at three interfaces.In step S42, main interface redraws unit 42 and utilizes the onLayout method, respectively described main interface and described function menu interface is redrawn when main interface movement.When having left function menu interface and right function menu interface on the mobile phone screen, then utilize the onLayout method to redraw three interfaces.In step S43, moving direction and metrics calculation unit 43 are utilized the onTouchEvent method, calculate the direction of main interface transverse shifting and the distance of transverse shifting according to user's gesture track.
Should be appreciated that the above detailed description of technical scheme of the present invention being carried out by preferred embodiment is illustrative and not restrictive.Those of ordinary skill in the art is reading on the basis of instructions of the present invention and can make amendment to the technical scheme that each embodiment puts down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.Protection scope of the present invention is only limited by the claims of enclosing.

Claims (4)

1. the function menu interface display method based on Android is characterized in that, may further comprise the steps:
Add function menu interface and main interface, described main interface is placed the upper strata at described function menu interface, described function menu interface comprises left function menu interface and/or right function menu interface;
When user's Touch Screen, judge the position of touch point, if touch point is on described main interface then carry out next step, if touch point is on the function menu interface then carried out user's gesture command by mobile phone operating system;
Whether the gesture of judging the user is horizontal slip, if otherwise carry out user's gesture command by mobile phone operating system, if so, then enter next step;
Thereby show described function menu interface according to the in real time mobile described main interface of described gesture.
2. the function menu interface display method based on Android according to claim 1 is characterized in that, thereby describedly in real time shows that described function menu interface also comprises following substep in mobile described main interface according to described gesture:
Calculate respectively the size at described main interface and described function menu interface;
When main interface movement, respectively described main interface and described function menu interface are redrawn;
Gesture track according to the user calculates the direction of main interface transverse shifting and the distance of transverse shifting.
3. the function menu interface display module based on Android is characterized in that, comprising: interface adding device, the first position of touch judging unit, the second position of touch judging unit and mobile unit;
The interface adding device be used for to add function menu interface and main interface, and described main interface is placed the upper strata at described function menu interface, and described function menu interface comprises left function menu interface and/or right function menu interface;
The first position of touch judging unit, when being used for user's Touch Screen, judge the position of touch point, if touch point is on described main interface then start described the second position of touch judging unit, if touch point is on the function menu interface then carried out user's gesture command by mobile phone operating system;
The second position of touch judging unit is used for judging whether user's gesture is horizontal slip, if otherwise carry out user's gesture command by mobile phone operating system, if so, then start described mobile unit;
Mobile unit, thus be used for showing described function menu interface according to the in real time mobile described main interface of described gesture.
4. the function menu interface display module based on Android shown in according to claim 3 is characterized in that described mobile unit further comprises following subelement:
The interface computing unit is for the size of calculating respectively described main interface and described function menu interface;
Main interface redraws the unit, is used for respectively described main interface and described function menu interface being redrawn when main interface movement;
Moving direction and metrics calculation unit are used for calculating the direction of main interface transverse shifting and the distance of transverse shifting according to user's gesture track.
CN201210385328.0A 2012-10-12 2012-10-12 Function menu interface display method and module based on Android Active CN102929537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210385328.0A CN102929537B (en) 2012-10-12 2012-10-12 Function menu interface display method and module based on Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210385328.0A CN102929537B (en) 2012-10-12 2012-10-12 Function menu interface display method and module based on Android

Publications (2)

Publication Number Publication Date
CN102929537A true CN102929537A (en) 2013-02-13
CN102929537B CN102929537B (en) 2016-05-18

Family

ID=47644352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210385328.0A Active CN102929537B (en) 2012-10-12 2012-10-12 Function menu interface display method and module based on Android

Country Status (1)

Country Link
CN (1) CN102929537B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138233A (en) * 2015-10-16 2015-12-09 上海斐讯数据通信技术有限公司 Method and system for implementing sideslip menus, and electronic equipment
CN105549980A (en) * 2015-12-29 2016-05-04 武汉斗鱼网络科技有限公司 Android application development system
CN105589627A (en) * 2014-10-23 2016-05-18 北大方正集团有限公司 Shortcut menu display method, shortcut menu display device and terminal
CN106201227A (en) * 2016-07-06 2016-12-07 深圳市明泰电讯有限公司 A kind of mobile terminal realizes the method and system of 3D sliding door type slip menu
CN106502514A (en) * 2016-11-04 2017-03-15 上海传英信息技术有限公司 The control method of sideslip menu and user terminal
CN106201227B (en) * 2016-07-06 2019-07-16 深圳市明泰电讯有限公司 A kind of mobile terminal realizes the method and system of 3D sliding door type sliding menu
CN110795194A (en) * 2019-10-31 2020-02-14 北京字节跳动网络技术有限公司 Desktop display control method, device, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1826575A (en) * 2003-06-20 2006-08-30 苹果电脑有限公司 Computer interface having a virtual single-layer mode for viewing overlapping objects
US20110035708A1 (en) * 2009-08-04 2011-02-10 Palm, Inc. Multi-touch wallpaper management
CN102339208A (en) * 2010-07-14 2012-02-01 华硕电脑股份有限公司 Interface display adjustment method and touch display apparatus using the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1826575A (en) * 2003-06-20 2006-08-30 苹果电脑有限公司 Computer interface having a virtual single-layer mode for viewing overlapping objects
US20110035708A1 (en) * 2009-08-04 2011-02-10 Palm, Inc. Multi-touch wallpaper management
CN102339208A (en) * 2010-07-14 2012-02-01 华硕电脑股份有限公司 Interface display adjustment method and touch display apparatus using the same

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589627A (en) * 2014-10-23 2016-05-18 北大方正集团有限公司 Shortcut menu display method, shortcut menu display device and terminal
CN105138233A (en) * 2015-10-16 2015-12-09 上海斐讯数据通信技术有限公司 Method and system for implementing sideslip menus, and electronic equipment
CN105549980A (en) * 2015-12-29 2016-05-04 武汉斗鱼网络科技有限公司 Android application development system
CN105549980B (en) * 2015-12-29 2018-09-21 武汉斗鱼网络科技有限公司 A kind of Android application development system
CN106201227A (en) * 2016-07-06 2016-12-07 深圳市明泰电讯有限公司 A kind of mobile terminal realizes the method and system of 3D sliding door type slip menu
CN106201227B (en) * 2016-07-06 2019-07-16 深圳市明泰电讯有限公司 A kind of mobile terminal realizes the method and system of 3D sliding door type sliding menu
CN106502514A (en) * 2016-11-04 2017-03-15 上海传英信息技术有限公司 The control method of sideslip menu and user terminal
CN106502514B (en) * 2016-11-04 2019-09-17 上海传英信息技术有限公司 The control method and user terminal of sideslip menu
CN110795194A (en) * 2019-10-31 2020-02-14 北京字节跳动网络技术有限公司 Desktop display control method, device, terminal and storage medium
CN110795194B (en) * 2019-10-31 2021-09-07 北京字节跳动网络技术有限公司 Desktop display control method, device, terminal and storage medium
US11782579B2 (en) 2019-10-31 2023-10-10 Beijing Bytedance Network Technology Co., Ltd. Desktop display control by intelligently nesting one object in another object

Also Published As

Publication number Publication date
CN102929537B (en) 2016-05-18

Similar Documents

Publication Publication Date Title
KR102052424B1 (en) Method for display application excution window on a terminal and therminal
KR102089447B1 (en) Electronic device and method for controlling applications thereof
RU2678482C2 (en) Electronic device and method for controlling screen display using temperature and humidity
CN102937876B (en) The dynamic scaling of touch sensor
CN102981768B (en) A kind of method and system realizing floated overall situation button at touch screen terminal interface
CN104102441B (en) A kind of menu item execution method and device
EP2595043B1 (en) Mobile device for executing multiple applications and method thereof
JP5865535B1 (en) User interface program
US20140098142A1 (en) System and method for generation and manipulation of a curve in a dynamic graph based on user input
KR102102157B1 (en) Display apparatus for executing plurality of applications and method for controlling thereof
CN103793093A (en) Multiscreen portable terminal and touch control method thereof
US9880697B2 (en) Remote multi-touch control
US9870144B2 (en) Graph display apparatus, graph display method and storage medium
CN103914258A (en) Mobile terminal and method for operating same
US20140145945A1 (en) Touch-based input control method
CN102929537A (en) Android-based function menu interface display method and module
US20140035853A1 (en) Method and apparatus for providing user interaction based on multi touch finger gesture
CN102929556A (en) Method and equipment for interaction control based on touch screen
EP2770443A2 (en) Method and apparatus for making contents through writing input on touch screen
CN103902150A (en) Simulated mouse
JP2014241030A (en) Graph display device, program, and server device
CN106843681A (en) The progress control method of touch-control application, device and electronic equipment
CN104516638A (en) Volume control method and device
CN101482799A (en) Method for controlling electronic equipment through touching type screen and electronic equipment thereof
CN102768597A (en) Method and device for operating electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 100085 Haidian District, on the road to information on the ground floor, No. 28, road, A7F

Patentee after: BEIJING HUDONG BAIKE NETWORK TECHNOLOGY CO.,LTD.

Address before: 100029 Chaoyang District, the stability of the door outside the court in the town of miracle Plaza, No. 1 Interactive Encyclopedia building, Fortune Plaza, Beijing

Patentee before: Hudong Online (Beijing) Technology Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100085 Haidian District, on the road to information on the ground floor, No. 28, road, A7F

Patentee after: Beijing Interactive Encyclopedia Network Technology Co.,Ltd.

Address before: 100085 Haidian District, on the road to information on the ground floor, No. 28, road, A7F

Patentee before: BEIJING HUDONG BAIKE NETWORK TECHNOLOGY CO.,LTD.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190924

Address after: 100041, room 2, building 3, building 30, Xing Xing street, Shijingshan District, Beijing,

Patentee after: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address before: 100085 Haidian District, on the road to information on the ground floor, No. 28, road, A7F

Patentee before: Beijing Interactive Encyclopedia Network Technology Co.,Ltd.