CN110851223A - Method for realizing mouse shortcut operation of smart television - Google Patents

Method for realizing mouse shortcut operation of smart television Download PDF

Info

Publication number
CN110851223A
CN110851223A CN201911092687.5A CN201911092687A CN110851223A CN 110851223 A CN110851223 A CN 110851223A CN 201911092687 A CN201911092687 A CN 201911092687A CN 110851223 A CN110851223 A CN 110851223A
Authority
CN
China
Prior art keywords
view
event
mouse
edge area
scrolling
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
CN201911092687.5A
Other languages
Chinese (zh)
Other versions
CN110851223B (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201911092687.5A priority Critical patent/CN110851223B/en
Publication of CN110851223A publication Critical patent/CN110851223A/en
Application granted granted Critical
Publication of CN110851223B publication Critical patent/CN110851223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Abstract

The invention discloses a method for realizing mouse shortcut operation of an intelligent television, which comprises the steps of monitoring the movement of a mouse, judging which edge area is up, down, left and right when the mouse moves to the edge area of a nested list control, obtaining a list control with the highest priority in the corresponding direction, and scrolling the list. And continuously judging whether the edge area is still in the rolling process, if so, continuing rolling, and otherwise, stopping. And simultaneously monitoring whether the field of other controls is entered, and if so, stopping scrolling. The external list control is vertically scrolled, a plurality of list controls which are scrolled transversely are nested inside the external list control, when the mouse moves to the edge area above or below the external list control, the external list scrolls in the corresponding direction (up or down), and when the mouse moves to the edge area on the left side or the right side of the external list control, the internal list scrolls in the corresponding direction (left or right).

Description

Method for realizing mouse shortcut operation of smart television
Technical Field
The invention relates to the technical field of smart televisions, in particular to a method for realizing mouse shortcut operation of a smart television.
Background
At present, an Android system is used as a common smart television platform, most of smart televisions are operated by remote controllers at present, and information searching and mobile selection are not convenient, so that the smart televisions are operated by using a mouse, most of contents of the smart televisions are displayed by lists, and the users can conveniently operate and browse the contents quickly by realizing automatic scrolling of the contents of the lists, so that the users can find interesting contents quickly.
Disclosure of Invention
The invention aims to provide a method for realizing rapid mouse operation of a smart television to solve the problems.
The invention is realized by an OnGeneric Lister, which is an interface of a View control in an android system, when in a method of dispatching an event by a DispatchPointerEvent (motionEvent event), if the event is not a touch event, the DispatchGeneric Event (event) is called to continue dispatching the event until the event is processed, the event is processed and then is not transmitted downwards, and the interface mOnGeneric Listoneer.
Action _ home _ MOVE: the pointer moves in the window or View area, but is not pressed;
action _ home _ ENTER: the pointer moves into a window or View area, but is not pressed;
action _ home _ EXIT: moving the pointer out of the window or the View area, but not pressing;
the specific implementation mode of the nested list automatic rolling takes a RecycleView as an example, the external RecycleView vertically rolls, and a plurality of RecycleView horizontally rolls are nested inside. To implement automatic scrolling without confusion in nested lists, the following problems need to be solved:
in particular which RecyclerView handles the scroll event
When to trigger a list scroll event
Specific implementation of interface content scrolling
When to stop scrolling.
The invention realizes the purpose through the following technical scheme:
a method for realizing mouse shortcut operation of an intelligent television comprises the following steps:
step 1, defining attributes to represent a horizontal and vertical priority, defining a static set for storing the id of View and an OnGeneric Listener monitor, traversing the parent View of the View through the parameter View in an interface method ONGeneric monitor (View, MotionEvent event) in the event of mouse movement, obtaining the OnGeneric Listener monitor through the id of the View, obtaining a RecycleView with the highest horizontal and vertical priority, and submitting a rolling event to the RecycleView for processing;
step 2, defining an edge area (for example, within a range of 10px within the boundary of the RecyclerView) around the RecyclerView, judging whether the mouse is in the edge area in the event of mouse movement, if so, triggering a timing operation, triggering a rolling event after 2s, and if the mouse leaves the edge area within 2s, canceling the timing operation, wherein the buffering of the 2s time is to reduce misoperation of a user;
step 3, scrolling the interface content, processing through the scrolling event of the list, calling a scrolling method of the RecycleView when receiving one scrolling event, scrolling by 3px and continuing to trigger timing operation;
and 4, immediately canceling the timing operation when the mouse leaves the defined edge area.
Further, in the step 1, the self-defined class edgeScrollListener inherits the OnGenericMylotionListener; the attributes mhozolintalpriority and mVerticalPriority are defined in edgescalListener, representing horizontal and vertical priority, respectively.
Further, in the step 1, a static set mlistener sparsearray is defined to store the id of View and the ontogenicmemorialisionlistener, traverse all parent views of the View through View.
The method further comprises rewriting ongenericcount (View, MotionEvent event) method, obtaining event type through event.getactionmask (), obtaining mouse position (x, y) through event.getrawx () and event.getrawy () if motionevent.action _ home _ MOVE (which does not judge exit event because exit event does not occur if list control is as large as screen), obtaining View position information through view.getglobalsilrect method, judging whether (x, y) is in edge area of View, if yes, triggering timing operation through Handler's postDelayed (running, long layMillis) method.
The Handler judges the direction of rolling after obtaining the rolling event, judges whether the view can roll, calls the view.scrollby () method to roll for a certain distance, and triggers the timing operation again to form the continuous rolling effect;
once it is determined that the mouse position exceeds the edge position, the timing operation is cancelled by a handler.
The invention has the beneficial effects that:
the external list control is vertically scrolled, a plurality of list controls which are scrolled transversely are nested inside the external list control, when the mouse moves to the edge area above or below the external list control, the external list scrolls in the corresponding direction (up or down), and when the mouse moves to the edge area on the left side or the right side of the external list control, the internal list scrolls in the corresponding direction (left or right).
The automatic scrolling of the interface list content can enable a user to operate more conveniently, browse the content quickly, help the user find interesting content quickly and improve user experience.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the embodiments or the drawings needed to be practical in the prior art description, and obviously, the drawings in the following description are only some embodiments of the embodiments, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of the auto-scroll of the present invention.
FIG. 2 is a flow chart of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
In any embodiment, as shown in fig. 1-2, a method for realizing mouse shortcut operation by a smart television of the present invention includes:
defining attributes to represent a horizontal and vertical priority, defining a static set to store the id of View and an OnGenericListener monitor, traversing the parent View of the View through a parameter View in an interface method ontGenericListeneration (View View, MotionEvent event) in the event of mouse movement, obtaining the OnGenericListener monitor according to the id of the View, obtaining a RecycleView with the highest horizontal and vertical priority, and submitting the scrolling event to the RecycleView for processing.
Defining an edge area (for example, a range of 10px within the boundary of the RecyclerView) around the RecyclerView, judging whether the mouse is in the edge area in the event of mouse movement, if so, triggering a timing operation, triggering a scrolling event after a certain time (for example, 2s), and if the mouse leaves the edge area within the 2s, canceling the timing operation, wherein the buffering of the 2s time is used for reducing misoperation of a user.
The scrolling of the interface content can be handled by the scrolling event of the list itself, and each time a scrolling event is received, the scrolling method of the RecycleView is called, the scrolling is performed for a certain distance (for example, 3 px. if the distance is too large, the user cannot see the content clearly), and the timing operation is continuously triggered.
When the mouse leaves the defined edge area, the timing operation is cancelled immediately.
The method comprises the steps of inheriting an OnGeneMicrolotionLister from a definition class EdgeScrollLister, defining attributes mHorizontalPriority and mVerticalPriority in the EdgeScrollLister, respectively representing horizontal and vertical priorities, defining a static set mListeneSparseArray for storing the id of the View and an OnGeneMicroTolistener monitor, traversing all father views of the View through View.
Rewriting ongenericcount (View, MotionEvent event) method, obtaining event type through event.getactionmask (), if it is motionevent.action _ home _ MOVE (it is not judging exit event because it is not judging exit event if list control is as large as screen), obtaining mouse position (x, y) through event.getrawx () and event.getrawy (), obtaining View position information through view.getglobalsivisiableRect method, judging whether (x, y) is in edge area of View, if it is triggering timing operation through Handler's postDelayed (running delayMillis) method.
And after the Handler obtains the rolling event, judging the rolling in which direction, judging whether the view can roll, calling a view & scroll by () method to roll for a certain distance, and triggering the timing operation again to form the continuous rolling effect.
Once it is determined that the mouse position exceeds the edge position, the timing operation is cancelled by a handler.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims. It should be noted that the various technical features described in the above embodiments can be combined in any suitable manner without contradiction, and the invention is not described in any way for the possible combinations in order to avoid unnecessary repetition. In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as the disclosure of the present invention as long as it does not depart from the spirit of the present invention.

Claims (5)

1. A method for realizing mouse shortcut operation of an intelligent television is characterized by comprising the following steps:
step 1, defining attributes to represent a horizontal and vertical priority, defining a static set for storing the id of View and an OnGenericM Ionotifier monitor, traversing the parent View of the View by a parameter View in an interface method, in the event of mouse movement, obtaining the OnGenericM Ionotifier monitor by the id of the View, obtaining a RecycleView with the highest horizontal and vertical priority, and handing a scrolling event to the RecycleView for processing;
step 2, defining an edge area around the RecycleView, judging whether the mouse is in the edge area in the event of mouse movement, if so, triggering a timing operation, triggering a rolling event after 2s, and if the mouse leaves the edge area within 2s, canceling the timing operation, wherein the buffer of 2s time is used for reducing misoperation of a user;
step 3, scrolling the interface content, processing through the scrolling event of the list, calling a scrolling method of the RecycleView when receiving one scrolling event, scrolling by 3px and continuing to trigger timing operation;
and 4, immediately canceling the timing operation when the mouse leaves the defined edge area.
2. The method as claimed in claim 1, wherein in step 1, the self-defined class edgescorolllisterner inherits the onseculotionlisterner, and attributes mholtalpriority and mVerticalPriority are defined in the edgescorolllisterner, representing horizontal and vertical priorities, respectively.
3. The method as claimed in claim 1, wherein in step 1, a static set mllistenerspararray is defined for storing the id of View and the ontogenicmemorialionlistener listener, all parent views of View are traversed by View.
4. The method as claimed in claim 1, further comprising rewriting an onsource command method, obtaining an event type through event.getactionmask (), obtaining a mouse position (x, y) through event.getrawX () and event.getrawY () if the event is motionevent.ACTION _ HOVER _ MOVE, obtaining view position information through view.getGlobalVisibleRect method, judging whether the (x, y) is in an edge area of view, and triggering a timing operation through Handler's postDelayed method if the (x, y) is in the edge area of view.
5. The method for realizing mouse shortcut operation of the smart television as claimed in claims 1-4, wherein after obtaining the scroll event, the Handler determines what direction the scroll is, determines whether the view can be scrolled, calls the view.
Once it is determined that the mouse position exceeds the edge position, the timing operation is cancelled by a handler.
CN201911092687.5A 2019-11-08 2019-11-08 Method for realizing mouse shortcut operation of smart television Active CN110851223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911092687.5A CN110851223B (en) 2019-11-08 2019-11-08 Method for realizing mouse shortcut operation of smart television

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911092687.5A CN110851223B (en) 2019-11-08 2019-11-08 Method for realizing mouse shortcut operation of smart television

Publications (2)

Publication Number Publication Date
CN110851223A true CN110851223A (en) 2020-02-28
CN110851223B CN110851223B (en) 2022-02-01

Family

ID=69601129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911092687.5A Active CN110851223B (en) 2019-11-08 2019-11-08 Method for realizing mouse shortcut operation of smart television

Country Status (1)

Country Link
CN (1) CN110851223B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201210349Y (en) * 2008-02-27 2009-03-18 刘烽 Interactive television user interface remote control system based on movement induction
CN102497599A (en) * 2011-12-29 2012-06-13 深圳Tcl新技术有限公司 Method for realizing mouse action by utilizing infrared remote controller and apparatus thereof
CN102508675A (en) * 2011-12-28 2012-06-20 Tcl集团股份有限公司 Response processing method and device for mouse motion based on android platform
US20120235908A1 (en) * 2009-03-10 2012-09-20 Henty David L Multi-directional remote control system and method with automatic cursor speed control
CN103747312A (en) * 2013-12-23 2014-04-23 乐视致新电子科技(天津)有限公司 Method for controlling a smart television by using mouse and a smart television

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201210349Y (en) * 2008-02-27 2009-03-18 刘烽 Interactive television user interface remote control system based on movement induction
US20120235908A1 (en) * 2009-03-10 2012-09-20 Henty David L Multi-directional remote control system and method with automatic cursor speed control
CN102508675A (en) * 2011-12-28 2012-06-20 Tcl集团股份有限公司 Response processing method and device for mouse motion based on android platform
CN102497599A (en) * 2011-12-29 2012-06-13 深圳Tcl新技术有限公司 Method for realizing mouse action by utilizing infrared remote controller and apparatus thereof
CN103747312A (en) * 2013-12-23 2014-04-23 乐视致新电子科技(天津)有限公司 Method for controlling a smart television by using mouse and a smart television

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WENJU_SONG: "针对Android Tv的自定义RecyclerView", 《HTTPS://WWW.JIANSHU.COM/P/566BD6188F4D》 *
小熊猫123: ""安卓TV开发(九) Android模拟事件 遥控器变身成鼠标来操作TV"", 《HTTPS://WWW.SHUZHIDUO.COM/A/KJDWBLWA5N/》 *

Also Published As

Publication number Publication date
CN110851223B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
US11966558B2 (en) Application association processing method and apparatus
US20220083209A1 (en) Method, apparatus, and terminal for processing notification information
AU2013278136B2 (en) Information display apparatus and method of user device
CN103069379A (en) Motion continuation of touch input
CN109508213B (en) View rendering method, device, medium and intelligent terminal
US20120306796A1 (en) Method and implementation device for inertial movement of window object
CN109857303B (en) Interaction control method and device
CN109976655B (en) Long screen capturing method, device, terminal and storage medium
KR102411858B1 (en) Display method, apparatus and device of user interface
AU2019440748B2 (en) Method, device and apparatus for controlling touch operation mode, and storage medium
KR20130052416A (en) Method and apparatus for designating enire area using partial area touch in a portable equipment
CN106201445B (en) Reminding message editing method and device and terminal equipment
CN108062194B (en) Display method and device and mobile terminal
CN103365588A (en) Touch screen operation processing method and touch equipment
CN107066176A (en) A kind of control method and device of the singlehanded pattern of terminal
CN104035714B (en) Event processing method, device and equipment based on Android system
CN110851223B (en) Method for realizing mouse shortcut operation of smart television
CN103634631A (en) Icon selection method and system based on remote control touch screen
CN108700990B (en) Screen locking method, terminal and screen locking device
CN111026302B (en) Display method and electronic equipment
CN110908552B (en) Multi-window operation control method, device, equipment and storage medium
CN109426420A (en) A kind of double screen terminal picture sending method and device
CN110830648A (en) Control method for edge sliding operation of cloud mobile phone and mobile phone terminal
CN113093961B (en) Window switching method, storage medium and related equipment
CN105824590A (en) Split screen processing method and device in mobile equipment

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