CN102707887B - Glidingly-selecting method for list items in listView based on Android platform - Google Patents
Glidingly-selecting method for list items in listView based on Android platform Download PDFInfo
- Publication number
- CN102707887B CN102707887B CN201210146551.XA CN201210146551A CN102707887B CN 102707887 B CN102707887 B CN 102707887B CN 201210146551 A CN201210146551 A CN 201210146551A CN 102707887 B CN102707887 B CN 102707887B
- Authority
- CN
- China
- Prior art keywords
- list items
- listview
- event
- android platform
- control
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000005096 rolling process Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 12
- 230000009471 action Effects 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to a glidingly-selecting method for list items in listView based on an Android platform, comprising the following steps: step 101) of recognizing and judging whether coordinates corresponding to DOWN events are within a set range, if so, entering next step, or else, processing by a listView control oneself, returning false, and entering a step 106); step 102) of selecting current list item as a start position, and returning truth; step 103) of glidingly selecting all list items from the start position to current position according to MOVE events; step 104) of recognizing and judging whether UP events occur, if so, entering next step, or else, returning to the step 103); step 105) of selecting all list items from the start position to stop position corresponding to UP events; and step 106) of ending. The method can select continuous items according to the need, so that the method is convenient and fast, and is featured with good user experience.
Description
Technical field
The present invention relates to man-machine interaction programming and touch screen technology, method is chosen in the slip being specifically related to the middle list items (item) of a kind of list browse controls (listView) based on Android (Android) platform.
Background technology
In current Android phone, design for listView control is all based in user interface (UI) and efficiency mostly, and it is very ripe, present user is when multiple item in listView chosen by needs, all need each item of click one by one, time-consumingly require great effort again, Consumer's Experience is very poor.But under Android platform, also do not have the method for " slide on listView control and choose item " or such method to be disclosed.Following two key issues at least need be solved for realizing the method:
First key issue is, the primary mechanism of Android operation system does not support this function, slide on listView generally all can give listView control oneself process, then realizes scroll actions, and listView control itself can not realize slip and chooses item;
Second key issue is, if block this slide ((DOWN) event under a point, a series of movement (MOVE) event, one is left (UP) event) sequence of events, so listView can not realize rolling.
Therefore, consider from the mechanism of Android if single, so slide and choose the design of item to be not attainable.So just must solve following series of technical:
(i) when the sliding action pointed, trigger the rolling operation of listView, and that when triggers item chooses operation;
(ii) when the sliding action triggering pointed is the operation choosing item, and so when finger slides up and down, how this realizes the logical process to item;
(iii) as the item that finger sliding shows to last (or first), need to realize listView automatically upwards (or under) roll;
(iv), when listView starts automatic rolling, how the effect of rolling is done and optimize, make experience better;
(v), when UP event response, fault-tolerant processing is done to operation above.
Summary of the invention
The technical issues that need to address of the present invention are, how to provide a kind of sliding choosing method based on list items in the listView of Android platform, can realize choosing the slip of item on the basis not affecting the rolling of listView control simultaneously.
Technical matters of the present invention solves like this: build a kind of sliding choosing method based on list items in the listView of Android platform, utilize touch-screen, comprise the following steps:
101) identify and judge that the coordinate of corresponding DOWN event is positioned at setting range (list items chooses position)? be enter next step, otherwise processed by listView control oneself, return vacation, enter step 106);
102) choose the current list item and as starting position, return true;
103) starting position is chosen to arrive all list items of current location according to the slip of MOVE event;
104) identify and judge that UP event occurs? be enter next step, otherwise return step 103);
105) starting position is chosen to arrive all list items of the corresponding end position of UP event;
106) terminate.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, described step 103) in current location be the list items of first display, listView control rolls downwards automatically; Described step 103) in current location be last display list items, listView control upwards rolls automatically.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, the list items of first display is the list items of the top display, and the list items of last display is the list items of bottom display.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, described step 103) in list items of last display be last list items of listView or described step 103) in the list items of first display be first list items of listView, listView control stops rolling.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, the coordinate of corresponding DOWN event is plane (X, Y) coordinate or horizontal X coordinate, preferred X-coordinate.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, described list items comprise each self-corresponding be positioned at described setting range (list items chooses position) choose control, described in choose control in step 102)-105) and in the selected list items of mark.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, according to step 101) in return and false process MOVE event and UP event by listView control oneself.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, step 103) and 105) all comprise respective fault-tolerant processing.
According to the sliding choosing method based on list items in the listView of Android platform provided by the invention, described fault-tolerant processing comprises: first, as the item that finger sliding shows to last (or first), need to realize listView automatically upwards (or under) roll, when just starting the effect needing a smooth rolling when rolling, there is item only to show a part else if, when just starting to roll, screen there will be Flickering Phenomenon; The second, when up event occurs, if last item chosen has the part exceeding half not to be presented on screen, then for the rational consideration of operation, cancel and the operation chosen is done to this item.
Sliding choosing method based on list items in the listView of Android platform provided by the invention, breaks through Traditional Thinking, and be creatively designed to same sliding action to respond two different operations, comparatively prior art has the following advantages:
When 1, can need to choose continuous print item, convenient quick again;
2, slide the list items choosing last to show, and listView control rolls to up/down automatically, and Consumer's Experience is good;
3, the list items of last display is first list items or last list items of listView, and listView control stops rolling, and Consumer's Experience is fine.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail further:
Fig. 1 is finger sliding handling procedure software flow schematic diagram on the listView control on specific embodiment of the invention Android touch-screen smart mobile phone.
Embodiment
First, intention of the present invention is described:
Design based on Consumer's Experience, by being bold in innovation, be creatively designed to same sliding action to respond two different operations, thus namely do not affect listView control response scroll actions itself, achieving again slides simultaneously chooses the function of item.
The second, the concrete technical scheme of the present invention and key are described in detail in detail:
Step 1, when DOWN event occurs, set the interval (this interval mark be the near zone of checkBox) of a coordinate according to the position of checkBox.Because realize the operation choosing multiple item, so whether have a checkBox control in each item selected to mark current item; If the selected state of item is indicated by other controls, the interval so in like manner can compared according to the position setting coordinate of this control.
Step 2, judge whether to give listView process according to the coordinate of DOWN event.When the x coordinate of DOWN event is in the coordinate interval set, then triggers when sliding up and down and choose the operation of item, by choosing checkBox control in this item as mark; If the x coordinate of DOWN event is not in the interval of setting, then directly give listView oneself process.
If step 3 gives listView process, then directly return false, follow-up UP and MOVE event does not all process, and directly returns false;
If step 4 DOWN event gives the logical process of oneself, then, after being disposed, return true.
Step is below all under the prerequisite of the action of slip being given oneself process (namely slide and choose item).
Step 5, each MOVE event occur, then perform the logical process of oneself, first, judge whether to choose and are pointed the item pressed; Secondly, if finger continues to press is the item that last (first) shows, then make listView to upper (lower) rolling; Finally, if finger presses is last item of listView, then listView stops rolling.True is returned after logical process completes;
Step 6, when UP event occurs, a little fault-tolerant processing is done to the end of event, then returns true;
Step 7, end.
3rd, be described in detail in conjunction with the present invention's preferred specific embodiment:
As shown in Figure 1, on the listView control on specific embodiment of the invention Android touch-screen smart mobile phone, finger sliding handling procedure specifically comprises the following steps:
301) at listView control interfaces, DOWN event occurs to utilize touch-screen to detect;
302) scope (be positioned at list items and choose position) that the coordinate of corresponding DOWN event sets on listView control is judged? enter step 303), otherwise enter step 201);
201) vacation (false) is directly returned;
202) wait for that next event arrives;
Does 203) identification judge that UP event occurs? be return false, enter step 312); Otherwise enter next step;
204) there is (rolling of listView control) in MOVE event;
205) return false, enter step 202);
303) trigger item and choose logic, return true (ture);
304) wait for that next event arrives;
305) identify and judge that UP event occurs? later stage fault-tolerant processing, return ture, enter step 312), otherwise enter next step;
306) trigger item and choose logic;
307) item that chooses whether first display/last item shown is judged? be enter next step, otherwise enter step 309);
308) listView control rolls to up/down automatically;
309) item of the item that chooses whether last display is judged? be enter next step, otherwise enter step 311);
310) listView control stops rolling;
311) fault-tolerant processing, return ture, enter step 304);
312) terminate.
Wherein: step 305) and 311) in, fault-tolerant processing comprises, and when up event occurs, if last item chosen has the part exceeding half not to be presented on screen, then for the rational consideration of operation, cancels and does to this item the operation chosen.
Finally, the foregoing is only preferred embodiment of the present invention, all equalizations done according to the claims in the present invention scope change and modify, and all should belong to the covering scope of the claims in the present invention.
Claims (6)
1., based on a sliding choosing method for list items in the listView of Android platform, it is characterized in that, utilize touch-screen, comprise the following steps:
101) identify and judge that the coordinate of corresponding DOWN event is positioned at setting range? be enter next step, otherwise processed by listView control oneself, return vacation, enter step 106);
102) choose the current list item and as starting position, return true;
103) starting position is chosen to arrive all list items of current location according to the slip of MOVE event;
104) identify and judge that UP event occurs? be enter next step, otherwise return step 103);
105) starting position is chosen to arrive all list items of the corresponding end position of UP event;
106) terminate;
Described step 103) in current location be first display list items, listView control rolls downwards automatically; Described step 103) in current location be last display list items, listView control upwards rolls automatically; Described step 103) in list items of last display be last list items of listView or described step 103) in the list items of first display be first list items of listView, listView control stops rolling.
2. according to claim 1 based on the sliding choosing method of list items in the listView of Android platform, it is characterized in that, the coordinate of corresponding DOWN event is X-coordinate.
3. according to claim 1 based on the sliding choosing method of list items in the listView of Android platform, it is characterized in that, described list items comprise each self-corresponding be positioned at described setting range choose control, described in choose control in step 102)-105) and in the selected list items of mark.
4., according to claim 1 based on the sliding choosing method of list items in the listView of Android platform, it is characterized in that, according to step 101) in return and false process MOVE event and UP event by listView control oneself.
5., according to claim 1 based on the sliding choosing method of list items in the listView of Android platform, it is characterized in that, step 103) and 105) all comprise respective fault-tolerant processing.
6., according to claim 5 based on the sliding choosing method of list items in the listView of Android platform, it is characterized in that, described step 103) in fault-tolerant processing comprise: when just starting to roll, prevent screen flicker; Described step 105) in fault-tolerant processing comprise: when UP event occurs, cancel the list items be not presented on screen is done choose operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210146551.XA CN102707887B (en) | 2012-05-11 | 2012-05-11 | Glidingly-selecting method for list items in listView based on Android platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210146551.XA CN102707887B (en) | 2012-05-11 | 2012-05-11 | Glidingly-selecting method for list items in listView based on Android platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102707887A CN102707887A (en) | 2012-10-03 |
CN102707887B true CN102707887B (en) | 2015-02-11 |
Family
ID=46900732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210146551.XA Expired - Fee Related CN102707887B (en) | 2012-05-11 | 2012-05-11 | Glidingly-selecting method for list items in listView based on Android platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102707887B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103914213B (en) * | 2012-12-31 | 2017-02-15 | 北京新媒传信科技有限公司 | Method and device for eliminating page dithering |
CN103558963A (en) * | 2013-11-11 | 2014-02-05 | 北京网秦天下科技有限公司 | System and method for displaying multi-level list |
CN104391682B (en) * | 2014-07-24 | 2019-08-27 | 贵阳朗玛信息技术股份有限公司 | A kind of method and device showing content |
CN105183326B (en) * | 2015-07-17 | 2018-05-08 | 小米科技有限责任公司 | list display method and device |
CN105353956A (en) * | 2015-10-27 | 2016-02-24 | 北京齐尔布莱特科技有限公司 | Method for realizing horizontal slide of ListView on mobile device |
CN105451077B (en) * | 2015-12-02 | 2019-01-29 | Tcl集团股份有限公司 | A kind of button processing method and system based on module TV |
CN105898519A (en) * | 2015-12-31 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | WiFi list display method and device |
CN105786518A (en) * | 2016-03-17 | 2016-07-20 | 武汉斗鱼网络科技有限公司 | Feedback method and device used during list loading |
CN106155498A (en) * | 2016-06-27 | 2016-11-23 | 上海若雅软件系统有限公司 | Prevent list from sliding on a kind of Android platform and block the picture loading method timing |
CN109032473A (en) * | 2018-08-09 | 2018-12-18 | 广州市箭冠网络科技有限公司 | A kind of list top return method based on Android device |
CN112905075B (en) * | 2021-02-24 | 2022-06-07 | 富途网络科技(深圳)有限公司 | Page display method, device and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101634900A (en) * | 2008-07-25 | 2010-01-27 | 深圳富泰宏精密工业有限公司 | Project menu system and method |
CN102096543A (en) * | 2009-12-15 | 2011-06-15 | 和硕联合科技股份有限公司 | Control method of user interface |
CN102362255A (en) * | 2009-03-24 | 2012-02-22 | 微软公司 | Virtual keyboard with slider buttons |
CN102760029A (en) * | 2011-04-29 | 2012-10-31 | 汉王科技股份有限公司 | Method and device for operating list on display interface |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7907974B2 (en) * | 2007-01-04 | 2011-03-15 | Microsoft Corporation | Scrollable computing device display |
KR20110093097A (en) * | 2010-02-11 | 2011-08-18 | 삼성전자주식회사 | Apparatus and method for editing of list in portable terminal |
CN102741799B (en) * | 2012-03-06 | 2014-12-24 | 华为终端有限公司 | Touch screen operation method and terminal |
-
2012
- 2012-05-11 CN CN201210146551.XA patent/CN102707887B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101634900A (en) * | 2008-07-25 | 2010-01-27 | 深圳富泰宏精密工业有限公司 | Project menu system and method |
CN102362255A (en) * | 2009-03-24 | 2012-02-22 | 微软公司 | Virtual keyboard with slider buttons |
CN102096543A (en) * | 2009-12-15 | 2011-06-15 | 和硕联合科技股份有限公司 | Control method of user interface |
CN102760029A (en) * | 2011-04-29 | 2012-10-31 | 汉王科技股份有限公司 | Method and device for operating list on display interface |
Also Published As
Publication number | Publication date |
---|---|
CN102707887A (en) | 2012-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102707887B (en) | Glidingly-selecting method for list items in listView based on Android platform | |
US11740725B2 (en) | Devices, methods, and user interfaces for processing touch events | |
CN102722334B (en) | The control method of touch screen and device | |
CN101488063B (en) | Method for controlling electronic apparatus and control system | |
KR101229699B1 (en) | Method of moving content between applications and apparatus for the same | |
CN102946462A (en) | Contact information grouping method based on mobile phone and mobile phone | |
US20130212541A1 (en) | Method, a device and a system for receiving user input | |
US20140059460A1 (en) | Method for displaying graphical user interfaces and electronic device using the same | |
CN107000972B (en) | System and method for initiating elevator service by typing an elevator call | |
CN103513870B (en) | The list interface of intelligent terminal selects the method and device of multinomial entry | |
CN104881211A (en) | Folder classifying method, system and mobile terminal | |
CN102609191A (en) | Browsing interaction method for incoming messages of touchscreen cellphones | |
CN103793137A (en) | Display method and electronic device | |
WO2014056338A1 (en) | Method and device for interaction of list data of mobile terminal | |
WO2016044061A1 (en) | System and method of initiating elevator service by entering an elevator call | |
EP3215448A1 (en) | System and method of initiating elevator service by entering an elevator call | |
CN102830893A (en) | Screen display control method and system | |
CN103365532A (en) | Change method and change system of terminal application display | |
CN104571679A (en) | Touch control method and electronic device | |
CN103294392A (en) | Method and apparatus for editing content view in a mobile device | |
CN106201235A (en) | The method of object choice, device and terminal | |
CN106210259A (en) | A kind of multi-screen display method and terminal | |
CN103116446A (en) | List interactive method for touch portable device | |
CN103324430B (en) | The objects operating method and device of many fingers | |
CN103024568A (en) | Control method and remote control system of smart TV through air mouse |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150211 |