CN107087234A - A kind of focus control method and system - Google Patents

A kind of focus control method and system Download PDF

Info

Publication number
CN107087234A
CN107087234A CN201710203757.4A CN201710203757A CN107087234A CN 107087234 A CN107087234 A CN 107087234A CN 201710203757 A CN201710203757 A CN 201710203757A CN 107087234 A CN107087234 A CN 107087234A
Authority
CN
China
Prior art keywords
view
focus
moved
active
next view
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
CN201710203757.4A
Other languages
Chinese (zh)
Other versions
CN107087234B (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710203757.4A priority Critical patent/CN107087234B/en
Publication of CN107087234A publication Critical patent/CN107087234A/en
Application granted granted Critical
Publication of CN107087234B publication Critical patent/CN107087234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Eye Examination Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a kind of focus control method and system, based on RecyclerView controls, it is related to network technique field.This method comprises the following steps:Monitor slide instruction, the slide is instructed is moved to target view, multiple views of the form including active view and target view for the focus in the form that will be shown according to specified glide direction in viewing area from the active view at place;In the table, next view of active view is searched according to glide direction;When finding next view according to lookup result, focus is moved to next view from active view, until focus is moved on target view;When not finding next view, terminate.Focus movement is correct when the present invention ensure that speed switching, it is to avoid focus entanglement or the problem of lose, and focus moves smoother, flow, and user interface is more friendly, improves Consumer's Experience.

Description

A kind of focus control method and system
The present invention relates to network technique field, a kind of focus control method and system are specifically related to.
Background technology
Before user uses Android TV (Android TV), installation in advance is needed on Android TV or android set top box And Android application program is run, because most Android TVs do not have touch-screen, user is mainly the operation sent by remote control Instruct to control application program, so as to realize interactive operation.At present, the RecyclerView controls of Android primary are due to its extension The advantage such as property is good, more flexible and be increasingly being used for user interface UI display and control.The user interface of Android TV UI is generally laid out to realize the layout effect of project (item) using grid, includes the view (View) of many list of items per a line, By showing that focus lets the user know that current operated object on the view of project, and instructed according to the slide of user Project outside the viewing area of pull-up loading video screen.Therefore, the application program and mobile phone of Android TV or set top box The maximum difference of application is focal point control, and remote control is used to one to choose the project outside viewing area as user When direction rapidly switches, focal track is not gone straight to a direction but entanglement is beated, and its reason is:Carry out quick During switching, the view of the project outside video screen has not yet been displayed on the tv screen, RecyclerView control internal searchings During the position of next focus, it is impossible to find correct focal position, cause focus dull or dap, and RecylerView controls do not support automatic paging loading function, reduce user experience.
The content of the invention
For defect present in prior art, it is a primary object of the present invention to provide a kind of focus control method, this The another object of invention is to provide a kind of autofocus control system, and focus movement is correct when ensure that speed switching, it is to avoid focus The problem of entanglement or loss, and focus moves smoother, flow, and user interface is more friendly, improves Consumer's Experience.
The present invention provides a kind of focus control method, based on RecyclerView controls, the described method comprises the following steps:
Monitor slide instruction, the slide instruct for according to specified glide direction by viewing area Focus in the form shown is moved on target view from the active view at place, and the form includes active view and mesh Mark multiple views including view;
In the table, next view of active view is searched according to the glide direction;
When finding next view according to lookup result, focus is moved to next view, Zhi Daojiao from active view Point is moved on target view;When not finding next view, terminate.
On the basis of above-mentioned technical proposal, the viewing area is in on-screen display (osd) area or on-screen display (osd) area Subregion.
On the basis of above-mentioned technical proposal, in the table, searched according to the glide direction under active view One view includes:
The glide direction is obtained from slide instruction;
Obtain the active view where the focus in the form;
According to the position of active view and the moving direction of focus, next view is searched in the table.
On the basis of above-mentioned technical proposal, the method that next view is searched in the table is:Grasped by Android The focus lookup class FocusFinder for making system searches next view in the table.
On the basis of above-mentioned technical proposal, distribute function dispatchKeyEvent returns using key-press event next The lookup result of view, when finding next view, returns to the information for finding next view, focus is moved from active view Next view is moved, until focus is moved on target view;When lookup result is space-time, next view is not found in return Information, and operation layer is returned to by callback method.
On the basis of above-mentioned technical proposal, when the next view found is located in the viewing area, by focus Next view is moved to from the active view, until focus is moved on target view.
On the basis of above-mentioned technical proposal, when the next view found is located at outside the viewing area, it will find Next view load and be shown in the viewing area, focus is moved to next view from active view, until Focus is moved on target view.
On the basis of above-mentioned technical proposal, when the glide direction is laterally or vertically, it is next that loading is found All views in row or column where individual view, and all views of loading are included in the viewing area.
On the basis of above-mentioned technical proposal, the form includes one or more paging, and each described paging is used In a part of view that the form is shown in the viewing area;
When the next view found is located at outside the viewing area, in paging where loading the next view found All views, and by all views of loading include in the viewing area.
The present invention also provides a kind of autofocus control system, and based on RecyclerView controls, the system includes:
Module is monitored, it is used to monitor slide instruction, and the slide is instructed for according to specified slip Focus in the form that direction will be shown in viewing area is moved on target view from the active view at place, the form Multiple views including active view and target view;
Searching modul, it is used for the next view for searching active view according to the glide direction in the table;
Control module, when it is used to find next view according to lookup result, focus is moved to down from active view One view, until focus is moved on target view;When not finding next view, terminate.
Compared with prior art, advantages of the present invention is as follows:
(1) next view of active view is searched according to the glide direction for monitoring slide instruction, when looking for During to next view, focus is moved to next view from active view, can until focus is moved on target view Ensure that focus movement is correct during speed switching, it is to avoid focus entanglement or the problem of lose, and focus moves smoother, flow, User interface is more friendly, improves Consumer's Experience.
(2) row, column that can respectively according to where next view or paging load next view so that Yong Hujie The control mode in face is more flexible.
(3) search class FocusFinder using the focus of Android operation system and search next view in the table, can be with It is directly used in RecyclerView controls, meets the specific demand of RecyclerView controls so that Android application and development Journey becomes apparent from succinctly, and improves development efficiency.
Brief description of the drawings
Fig. 1 is focus control method flow chart of the embodiment of the present invention;
Fig. 2 is autofocus control system schematic diagram of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawings and specific embodiment the present invention is described in further detail.
The method of the present invention realizes that heavily loaded constructed fuction rewrites RecylerView's by the way that RecyclerView is self-defined Key-press event distribution function dispatchKeyEvent is intercepted and captured to the event of remote control, then passes through Android operation system Focus searches class FocusFinder and searches next view in the table, to search out correct focal position, so as to ensure distant The movement of RecylerView internal focal points is correct when control device is switched fast.
Shown in Figure 1, the embodiment of the present invention provides a kind of focus control method, based on RecyclerView controls, side Method comprises the following steps:
S1. monitor slide instruction, slide instruct for according to specified glide direction by viewing area Focus in the form shown is moved on target view from the active view at place, and form includes active view and target is regarded Multiple views including figure.
Slide instruction can be the operational order for switch view that user is sent by remote control, for example, fixed The direction direction=-1 of adopted current remote control switching, viewing area is in on-screen display (osd) area or on-screen display (osd) area Subregion, form all can be shown in viewing area, can also only show a part of view of form, form also may be used So that including one or more paging, each paging is used for a part of view that form is shown in viewing area.
S2. in the table, next view of active view is searched according to glide direction.
Step S2 is specifically included:Glide direction is obtained from slide instruction, specifically, obtaining current remote events The direction of switching is simultaneously assigned to direction, is obtained by the RecyclerView api function getFocusedChild carried The active view where focus in form, according to the position of active view and the moving direction of focus, under searching in the table One view.
Wherein, the method for next view being searched in the table is:
Class FocusFinder is searched by the focus of Android operation system and searches next view in the table, specifically, The method getInstance for calling focus to search class FocusFinder itself acquisition example gets FocusFinder pair As calling the findNextFocus functions of FocusFinder objects, incoming current RecyclerView objects (form) and working as The switching direction direction of front view, remote control, can obtain next view of correct focus.FocusFinder is peace The focus query function class realized inside tall and erect operating system, the instrument of the position for inquiring about the view where next focus Class.Class FocusFinder is searched using the focus of Android operation system and searches next view in the table, is used directly for In RecyclerView controls, the specific demand of RecyclerView controls is met so that Android application development process is more clear It is clear succinct, and improve development efficiency.
When S3. finding next view according to lookup result, focus is moved to next view from active view, until Focus is moved on target view;When not finding next view, terminate.
Step S3 is specifically included:Distribute function dispatchKeyEvent using key-press event and return to looking into for next view Result is looked for, when finding next view, the information for finding next view is returned, focus is moved to from active view next Individual view, until focus is moved on target view;When lookup result is space-time, the information for not finding next view is returned, And operation layer is returned to by callback method.If specifically, return next view for sky, DispatchKeyEvent returns to false and represents to be correctly found next focal position, if sky, then it represents that focus is arrived RecyclerView form edge, dispatchKeyEvent is returned as true, so as to be fed back by callback method Other related matters are handled to operation layer.
According to the information of next view of return, when the next view found is located in viewing area, by focus Next view is moved to from active view, until focus is moved on target view.Show when the next view found is located at When showing outside region, the next view found is loaded and including in viewing area, focus is moved to down from active view One view, until focus is moved on target view.Wherein, the next view found is loaded and including in viewing area Include:
It is all in the row or column where next view that loading is found when glide direction is laterally or vertically View, and all views of loading are included in viewing area.Or, in paging where loading the next view found All views, and all views of loading are included in viewing area, not only conveniently and efficiently realize in user interface layer The automatic paging loading function of data is carried out, and row, column respectively according to where next view or paging loading are next Individual view so that the control mode of user interface is more flexible.
Glide direction according to slide instruction is monitored searches next view of active view, when finding down During one view, focus is moved to next view from active view, until focus is moved on target view, be ensure that Focus movement is correct during speed switching, it is to avoid focus entanglement or the problem of lose, and focus moves smoother, flow, user Interface is more friendly, improves Consumer's Experience.
Shown in Figure 2, the embodiment of the present invention also provides a kind of autofocus control system, based on RecyclerView controls, The system includes monitoring module, searching modul and control module.
Monitoring module is used to monitor slide instruction, and slide is instructed for that will show according to specified glide direction Show that the focus in the form shown in region is moved on target view from the active view at place, form includes active view With multiple views including target view.
Searching modul is used for the next view for searching active view according to glide direction in the table.
When control module is used to find next view according to lookup result, focus is moved to from active view next View, until focus is moved on target view;When not finding next view, terminate.
The key-press event rewritten by customized mode in RecyclerView distributes function dispatchKeyEvent, And the focus carried using Android operation system searches class FocusFinder classes, perfection solves Android TV or Android box The problem of focus entanglement or loss are caused due to quick sliding during application of the middle use based on RecyclerView, focus movement Smoother, flow, user interface is more friendly, improves Consumer's Experience.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from On the premise of the principle of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as the protection of the present invention Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.

Claims (10)

1. a kind of focus control method, based on RecyclerView controls, it is characterised in that the described method comprises the following steps:
Slide instruction is monitored, the slide is instructed for will be shown according to specified glide direction in viewing area Focus in the form gone out is moved on target view from the active view at place, and the form includes active view and target is regarded Multiple views including figure;
In the table, next view of active view is searched according to the glide direction;
When finding next view according to lookup result, focus is moved to next view from active view, until focus is moved Move on target view;When not finding next view, terminate.
2. focus control method as claimed in claim 1, it is characterised in that:The viewing area be on-screen display (osd) area or Subregion in on-screen display (osd) area.
3. focus control method as claimed in claim 1, it is characterised in that in the table, according to the glide direction Searching next view of active view includes:
The glide direction is obtained from slide instruction;
Obtain the active view where the focus in the form;
According to the position of active view and the moving direction of focus, next view is searched in the table.
4. focus control method as claimed in claim 3, it is characterised in that search the side of next view in the table Method is:Class FocusFinder is searched by the focus of Android operation system and searches next view in the table.
5. focus control method as claimed in claim 4, it is characterised in that:Distribute function using key-press event DispatchKeyEvent returns to the lookup result of next view, when finding next view, and next regard is found in return The information of figure, next view is moved to by focus from active view, until focus is moved on target view;Work as lookup result For space-time, the information for not finding next view is returned to, and operation layer is returned to by callback method.
6. focus control method as claimed in claim 5, it is characterised in that:When the next view found is located at the display When in region, focus is moved to next view from the active view, until focus is moved on target view.
7. focus control method as claimed in claim 5, it is characterised in that:When the next view found is located at the display When outside region, the next view found is loaded and including in the viewing area, focus is moved to from active view Next view, until focus is moved on target view.
8. focus control method as claimed in claim 7, it is characterised in that:When the glide direction is laterally or vertically When, all views in row or column where next view that loading is found, and all views of loading are included in institute State in viewing area.
9. focus control method as claimed in claim 7, it is characterised in that:The form includes one or more paging, Each described paging is used for a part of view that the form is shown in the viewing area;
When the next view found is located at outside the viewing area, the institute in paging where loading the next view found There is view, and all views of loading are included in the viewing area.
10. a kind of autofocus control system, based on RecyclerView controls, it is characterised in that the system includes:
Module is monitored, it is used to monitor slide instruction, and the slide is instructed for according to specified glide direction Focus in the form that will be shown in viewing area is moved on target view from the active view at place, and the form includes Multiple views including active view and target view;
Searching modul, it is used for the next view for searching active view according to the glide direction in the table;
Control module, when it is used to find next view according to lookup result, focus is moved to from active view next View, until focus is moved on target view;When not finding next view, terminate.
CN201710203757.4A 2017-03-30 2017-03-30 A kind of focus control method and system Active CN107087234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710203757.4A CN107087234B (en) 2017-03-30 2017-03-30 A kind of focus control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710203757.4A CN107087234B (en) 2017-03-30 2017-03-30 A kind of focus control method and system

Publications (2)

Publication Number Publication Date
CN107087234A true CN107087234A (en) 2017-08-22
CN107087234B CN107087234B (en) 2019-08-23

Family

ID=59614250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710203757.4A Active CN107087234B (en) 2017-03-30 2017-03-30 A kind of focus control method and system

Country Status (1)

Country Link
CN (1) CN107087234B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872726A (en) * 2017-11-27 2018-04-03 山东浪潮商用***有限公司 A kind of focus control method and device
CN108271062A (en) * 2017-12-27 2018-07-10 山东浪潮商用***有限公司 A kind of method and system for solving to lose after the movement of android focuses
CN110286973A (en) * 2019-05-14 2019-09-27 深圳康佳电子科技有限公司 A kind of key trigger event processing method, intelligent terminal and storage medium
CN112272329A (en) * 2020-10-28 2021-01-26 海看网络科技(山东)股份有限公司 Method for accelerating display speed of android list
CN113596592A (en) * 2021-07-13 2021-11-02 深圳市酷开网络科技股份有限公司 Television web page focus control method, device, terminal equipment and storage medium
CN113703626A (en) * 2021-08-13 2021-11-26 北京小米移动软件有限公司 Focus control method, device, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102625189A (en) * 2012-04-10 2012-08-01 深圳市茁壮网络股份有限公司 Focus moving method, set-top box and system
CN103473055A (en) * 2013-09-06 2013-12-25 乐视致新电子科技(天津)有限公司 Focus movement control method and device
CN103543922A (en) * 2013-07-01 2014-01-29 Tcl集团股份有限公司 Focus moving method, system and intelligent equipment
CN105812944A (en) * 2014-12-29 2016-07-27 深圳Tcl新技术有限公司 Interface focus movement control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102625189A (en) * 2012-04-10 2012-08-01 深圳市茁壮网络股份有限公司 Focus moving method, set-top box and system
CN103543922A (en) * 2013-07-01 2014-01-29 Tcl集团股份有限公司 Focus moving method, system and intelligent equipment
CN103473055A (en) * 2013-09-06 2013-12-25 乐视致新电子科技(天津)有限公司 Focus movement control method and device
CN105812944A (en) * 2014-12-29 2016-07-27 深圳Tcl新技术有限公司 Interface focus movement control method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872726A (en) * 2017-11-27 2018-04-03 山东浪潮商用***有限公司 A kind of focus control method and device
CN108271062A (en) * 2017-12-27 2018-07-10 山东浪潮商用***有限公司 A kind of method and system for solving to lose after the movement of android focuses
CN108271062B (en) * 2017-12-27 2020-05-08 山东云缦智能科技有限公司 Method and system for solving problem of loss of android focus after movement
CN110286973A (en) * 2019-05-14 2019-09-27 深圳康佳电子科技有限公司 A kind of key trigger event processing method, intelligent terminal and storage medium
CN110286973B (en) * 2019-05-14 2022-10-04 深圳康佳电子科技有限公司 Key triggering event processing method, intelligent terminal and storage medium
CN112272329A (en) * 2020-10-28 2021-01-26 海看网络科技(山东)股份有限公司 Method for accelerating display speed of android list
CN112272329B (en) * 2020-10-28 2023-02-28 海看网络科技(山东)股份有限公司 Method for accelerating display speed of android list
CN113596592A (en) * 2021-07-13 2021-11-02 深圳市酷开网络科技股份有限公司 Television web page focus control method, device, terminal equipment and storage medium
CN113596592B (en) * 2021-07-13 2023-10-31 深圳市酷开网络科技股份有限公司 Television webpage focus control method and device, terminal equipment and storage medium
CN113703626A (en) * 2021-08-13 2021-11-26 北京小米移动软件有限公司 Focus control method, device, electronic device and storage medium

Also Published As

Publication number Publication date
CN107087234B (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN107087234A (en) A kind of focus control method and system
CN103218165B (en) A kind of method, device and mobile terminal changing key arrangement
CN107153520B (en) Multi-screen cooperation control method, device and multi-screen management system
EP4016273A1 (en) Side toolbar display method and device, terminal, and storage medium
US9325952B2 (en) Method of multi-screen pagination playing
CN107273076B (en) A kind of method, apparatus and system for visualizing cooperation management of attending a banquet
CN103000015B (en) The accurate remote control thereof of display device based on wireless screen transmission and device
CN109324726B (en) Icon moving method and device and electronic equipment
CN105867762A (en) Method and apparatus for displaying video being played
US11687311B2 (en) Screen projection processing method and device
CN105376125B (en) A kind of smart home system control method and device
KR101925067B1 (en) Controller for Electro-Optical Tracking System and operating method for thereof
CN103873959A (en) Control method and electronic device
US11284161B2 (en) Method and device for loading electronic program guide, and non-transitory storage medium
CN105320481A (en) Data display method and device and mobile terminal
CN112269505B (en) Audio and video control method and device and electronic equipment
CN103870196A (en) Object switching method and device
CN112269506A (en) Screen splitting method and device and electronic equipment
CN106872836A (en) Distributed automatization detecting system and method on production line
CN104020939B (en) A kind of control method and electronic equipment
CN103218035B (en) A kind of gesture input method and electronic equipment
WO2015024466A1 (en) Remote control method and mobile terminal using same
CN113286085B (en) Display control method and device and electronic equipment
KR101473904B1 (en) A multi-functional integral cctv control method and a control system
CN104216624A (en) Display method and electronic device

Legal Events

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