CN108664309A - A kind of long method for exhibiting data and system based on Android terminal - Google Patents

A kind of long method for exhibiting data and system based on Android terminal Download PDF

Info

Publication number
CN108664309A
CN108664309A CN201810466915.XA CN201810466915A CN108664309A CN 108664309 A CN108664309 A CN 108664309A CN 201810466915 A CN201810466915 A CN 201810466915A CN 108664309 A CN108664309 A CN 108664309A
Authority
CN
China
Prior art keywords
view
sub
father
distance
visible area
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
CN201810466915.XA
Other languages
Chinese (zh)
Other versions
CN108664309B (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.)
Chengdu Tianyi Interspace Technology Ltd
Original Assignee
Chengdu Tianyi Interspace Technology 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 Chengdu Tianyi Interspace Technology Ltd filed Critical Chengdu Tianyi Interspace Technology Ltd
Priority to CN201810466915.XA priority Critical patent/CN108664309B/en
Publication of CN108664309A publication Critical patent/CN108664309A/en
Application granted granted Critical
Publication of CN108664309B publication Critical patent/CN108664309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The long method for exhibiting data and system, this method that the invention discloses a kind of based on Android terminal specifically include step:(1) sub- View obtains focus, when focus is not or not head or tail portion, executes step (2);(2) position of the sub- View of present convergence is obtained, and judges whether the current location of the sub- View is located at the centre position of the visible area of father View, if it is not, thening follow the steps (3);(3) it calculates father View and needs mobile distance;(4) according to the mobile father View of distance, the sub- View is made to be located at the centre position of the visible area of father View.The present invention solves the problems, such as that user is easily misled when long data displaying to be occurred, to the illusion of tail portion, reducing operation difficulty, enhancing user experience effect.

Description

A kind of long method for exhibiting data and system based on Android terminal
Technical field
The invention belongs to terminal applies display technique field, more specifically, is related to a kind of based on Android terminal Long method for exhibiting data and system.
Background technology
There are mainly two types of the long method for exhibiting data modes of existing Android terminal:
1. using ListView, the list View of the sub- item of the reusables such as GridView, RecyclerView divides data It is segmented into one piece one piece to be respectively put into corresponding item, allows sub- item that can obtain focus, rolled by continuous moving focal point Data.In general usually all it is the similar data of format, the display data by way of list, according to number using such View The number of the adaptive item of data bulk, because in advance it has been specified that the width height of good item, is easy to make some table classes Style, then parse formatted bean, be placed on each position of item according to correspondence, but with regard to table format and Speech the biggest problems are that implying that user this table is the only page, or should be when several item just occupy one page Left and right page turning or page turning up and down, and designer can also be designed to that each item is completely shown in one page mostly for beauty In, just need to assist lower button or progress bar this when, the corresponding problem of upper lower button also occurs simultaneously:User is more Single stepping;Code needs to accurately calculate the item of every page of displaying.With significant limitation, the appearance of progress bar also influences U.S. See design.
2. it is also to allow sub- View acquisition focus that use father's layout, which be ScrollView, moving focal point changes the number of display According to.Use ScrollView for father's layout type, sub- View have and can only there are one, usually GroupView, sub- View compare Flexible and changeable, the scene used is also relatively more, and if there is click event, that also must be the sub- View that can be focused to sub- View.
ScrollView, which is different from list View, does not have larger paging trend, is more processing slip event, because It is more flexible, so when sub- View neatly occurs, it is more prone to mislead user and occurs to the feeling of tail portion, ScrollView also becomes more dependent on the progress that progress bar is brought and shows, progress bar influences design style, and expectation is also had when nested Except Bug.
To sum up, existing methods of exhibiting controls the sliding of View in display data by focus movement, when focus moves To that when the corner of page, can give a kind of data of user on earth without the illusion of lower page of data, paging is loaded for terminal For increase the operation difficulty of user, reduce the ease for use of software, bad experience brought to user.
Invention content
The long data exhibition based on Android terminal that it is an object of the invention to overcome the deficiencies of the prior art and provide a kind of Show method and system, this method solve easily mislead user when long data are shown the problem of having arrived the illusion of tail portion, drop occur Low operation difficulty, enhances user experience effect.
For achieving the above object, the long data displaying based on Android terminal that on the one hand the present invention provides a kind of Method specifically includes following steps:
(1) sub- View obtains focus, when focus is not or not head or tail portion, executes step (2);
(2) position of the sub- View of present convergence is obtained, and judges whether the current location of the sub- View is located at father View Visible area centre position, if it is not, thening follow the steps (3);
(3) it calculates father View and needs mobile distance;
(4) according to the mobile father View of distance, the sub- View is made to be located at the centre position of the visible area of father View.
Advantageous effect of the present invention:The present invention drags father's View sliding distances by switching the sub- View that can be focused, every time When sub- View obtains focus, all carry out judging that the sub- View whether in the centre position of visible area, if not existing, calculates father View needs mobile distance, and sub- View is allowed to be located at the centre of father View, when focus appears in head or tail portion, sub- View It just can be at the non-intermediate position of father View.User is easily misled when the present invention solves long data displaying to occur to the mistake of tail portion The problem of feel, reduces the operating procedure of user, reduces operation difficulty, gives the better using experience degree of user.
Further, step (3) are implemented as:
Obtain the width width of father's View left and right directions visible area;Sub- View is obtained to the visible area of father View The width vWidth of left margin left and sub- View, passes through formula:
Distance=left+vWidth/2-width/2
It calculates father View and needs mobile distance, that is, screen centre position.
The advantageous effect of above-mentioned further scheme:While guaranteed efficiency, reduce size of code, improves user experience Degree.
Further, step (3) are implemented as:
Obtain the height height of father's View upper and lower directionss visible area;Sub- View is obtained to the visible area of father View The height vheight of top margin upper and sub- View, passes through formula:
Distance=upper+vheight/2-height/2
It calculates father View and needs mobile distance, that is, screen centre position.
The advantageous effect of above-mentioned further scheme:While guaranteed efficiency, reduce size of code, improves user experience Degree.
On the other hand, the present invention also provides a kind of long data display systems based on Android terminal, including:
Focus module obtains focus for sub- View;
Position judging module, the position of the sub- View for obtaining present convergence, and judge the current location of the sub- View Whether the centre position of the visible area of father View is located at;
Distance calculation module needs mobile distance for calculating father View;
Mobile module, for according to the mobile father View of distance, the sub- View being made to be located at the centre of the visible area of father View Position.
Description of the drawings
Fig. 1 is the method for the present invention flow chart;
Fig. 2 is present system block diagram.
Specific implementation mode
The specific implementation mode of the present invention is described below in conjunction with the accompanying drawings, preferably so as to those skilled in the art Understand the present invention.Requiring particular attention is that in the following description, when known function and the detailed description of design perhaps When can desalinate the main contents of the present invention, these descriptions will be ignored herein.
As shown in Figure 1, the present invention occurs to easily mislead user when solving long data displaying to the illusion of tail portion The problem of, it is proposed that a kind of long method for exhibiting data based on Android terminal specifically includes following steps:
(1) sub- View obtains focus, when focus is not or not head or tail portion, executes step (2);
(2) position of the sub- View of present convergence is obtained, and judges whether the current location of the sub- View is located at father View Visible area centre position, if it is not, thening follow the steps (3);
(3) it calculates father View and needs mobile distance;
(4) according to the mobile father View of distance, the sub- View is made to be located at the centre position of the visible area of father View.
The present invention drags father's View sliding distances by switching the sub- View that can be focused, and focus is obtained per second son View When, whether all carry out judging the sub- View in the centre position of visible area, if not existing, calculate father View need it is mobile away from From allowing sub- View to be located at the centre of father View, when focus appears in head or tail portion, sub- View just can be in the non-of father View Intermediate position.The present invention solves the problems, such as that user is easily misled when long data displaying to be occurred, to the illusion of tail portion, reducing Operation difficulty enhances user experience effect.
Embodiment 1
Based on the above method, if father View is ScrollView, direction is to horizontally slip, then defining one slides into centre Method smoothScrollToMid, and incoming parameter:The sub- View that can be focused binds focus monitor event to sub- View, when When sub- View is focused, the method is called.
SmoothScrollToMid methods are:The visual width width of ScrollView left and right directions is got first, then Sub- View is obtained to the distance left (getLeft) of the visual left parts of father View, then calculates the width vWidth of sub- View (getWidth), the value of left+vWidth/2-width/2 (the sub- centers Viw and screen center's width are poor) is calculated this when Value, this value are exactly the distance that sub- View needs mobile (smoothScrollBy) in the X-axis of fatherView, also It is screen centre position, such visible area is just always the center of sub- View, this side is all called in every sub- View focusing Method, the sub- View is moved to the centers fatherView when every sub- View is focused, and group View does not occur In center, then illustrate the bottom for having arrived data, have any operation without user, we are browsed by calculating in user When have been completed the translations of data.
Embodiment 2
Based on the above method, if father View is ScrollView, direction is to slide up and down, then defining one slides into centre Method smoothScrollToMid, and incoming parameter:The sub- View that can be focused binds focus monitor event to sub- View, when When sub- View is focused, the method is called.
SmoothScrollToMid methods are:The height of ScrollView upper and lower directionss visible area is got first Height, then obtain sub- View to the top margin upper and sub- View of the visible areas father View height vheight (getheight), calculate upper+vheight/2-height/2 this whens (the sub- centers Viw and screen center's width are poor) Value value, this value, which is exactly sub- View, needs the distance of mobile (smoothScrollBy) in the Y-axis of fatherView, Namely screen centre position, such visible area are just always the center of sub- View, and every sub- View focusing is all called The method, the sub- View is moved to the centers fatherView when every sub- View is focused, and group View does not have Center is appeared in, then illustrates the bottom for having arrived data, has any operation without user, we are by calculating in user Moving up and down for data is had been completed when browsing.
Embodiment 3
It is explained by taking RecyclerView as an example based on the above method if father View is the lists View such as RecyclerView State the implementation method of the invention:Define a method moved by the coordinate position of item first, equally with move left and right for Example smoothScrollToMid is carried out under the premise of it is centre position to maintain sub- View in the focal variation event of item It calculates, computational methods and ScrollView are similar, calculate the distance of item distances RecyclerView most left parts first Left, then obtain item width vwidth and RecyclerView can display area left and right directions width Width, finally It calculates item and needs mobile distance distance=left+vwidth/2-Width/2, so that it may to call moving method (smoothScrollBy) positions of the mobile item in X-axis.Target View in this way is always positioned at the centers father View, reaches The effect as ScrollView is arrived.While guaranteed efficiency, reduce size of code, improves user experience.
Embodiment 4
It is explained by taking RecyclerView as an example based on the above method if father View is the lists View such as RecyclerView State the implementation method of the invention:Define a method moved by the coordinate position of item first, equally with move up and down for Example smoothScrollToMid is carried out under the premise of it is centre position to maintain sub- View in the focal variation event of item It calculates, computational methods and ScrollView are similar, calculate item distances RecyclerView top margins upper and son first The height vheight (getheight) and RecyclerView of View can display area upper and lower directions height height, most Item is calculated afterwards and needs mobile distance distance=upper+vheight/2-height/2, so that it may to call movement side Positions of the mobile item of method (smoothScrollBy) in Y-axis.Target View in this way is always positioned at the centers father View, Achieve the effect that as ScrollView.While guaranteed efficiency, reduce size of code, improves user experience.
As shown in Fig. 2, the present invention also provides a kind of long data display systems based on Android terminal, including:
Focus module obtains focus for sub- View;
Position judging module, the position of the sub- View for obtaining present convergence, and judge the current location of the sub- View Whether the centre position of the visible area of father View is located at;
Distance calculation module needs mobile distance for calculating father View;
Mobile module, for according to the mobile father View of distance, the sub- View being made to be located at the centre of the visible area of father View Position.
As an embodiment of the present invention, the distance calculation module is implemented as:
Obtain the width width of father's View left and right directions visible area;Sub- View is obtained to the visible area of father View The width vWidth of left margin left and sub- View, passes through formula:
Distance=left+vWidth/2-width/2
It calculates father View and needs mobile distance, that is, screen centre position.
As an embodiment of the present invention, the distance calculation module is implemented as:
Obtain the height height of father's View upper and lower directionss visible area;Sub- View is obtained to the visible area of father View The height vheight of top margin upper and sub- View, passes through formula:
Distance=upper+vheight/2-height/2
It calculates father View and needs mobile distance, that is, screen centre position.
Target View is automatically moved to centre position when user browses data between slidably View and passed through by the present invention Switch the sub- View that can focus to drag father's View sliding distances, when obtaining focus per second son View, all carries out judging the son Whether View is in the centre position of visible area, if not existing, the sliding distance of dynamic mobile father View allows sub- View to lean on as possible The centre of nearly father View, has and if only if when focus appears in head or tail portion, focus just can be at the non-intermediate position of father View. Therefore, the present invention solves the problems, such as that user is easily misled when long data displaying to be occurred, to the illusion of tail portion, reducing operation Difficulty enhances user experience effect.
The present invention is the primary control based on android system, is optimized on this basis, reaches efficient, height experience The change of degree, the equipment suitable for being mostly based on android system, including mobile phone, tablet computer, Intelligent set top box etc..
Although the illustrative specific implementation mode of the present invention is described above, in order to the technology of the art Personnel understand the present invention, it should be apparent that the present invention is not limited to the range of specific implementation mode, to the common skill of the art For art personnel, if various change the attached claims limit and determine the spirit and scope of the present invention in, these Variation is it will be apparent that all utilize the innovation and creation of present inventive concept in the row of protection.

Claims (6)

1. a kind of long method for exhibiting data based on Android terminal, which is characterized in that include the following steps:
(1) sub- View obtains focus, when focus is not or not head or tail portion, executes step (2);
(2) obtain present convergence sub- View position, and judge the sub- View current location whether positioned at father View can The centre position of viewed area, if it is not, thening follow the steps (3);
(3) it calculates father View and needs mobile distance;
(4) according to the mobile father View of distance, the sub- View is made to be located at the centre position of the visible area of father View.
2. the long method for exhibiting data according to claim 1 based on Android terminal, which is characterized in that the step (3) be implemented as:
Obtain the width width of father's View left and right directions visible area;Obtain sub- View to the visible area of father View the left side Width vWidth away from left and sub- View, passes through formula:
Distance=left+vWidth/2-width/2
It calculates father View and needs mobile distance, that is, screen centre position.
3. the long method for exhibiting data according to claim 1 based on Android terminal, which is characterized in that the step (3) be implemented as:
Obtain the height height of father's View upper and lower directionss visible area;Obtain sub- View to the visible area of father View top Height vheight away from upper and sub- View, passes through formula:
Distance=upper+vheight/2-height/2
It calculates father View and needs mobile distance, that is, screen centre position.
4. a kind of long data display systems based on Android terminal, which is characterized in that including:
Focus module obtains focus for sub- View;
Position judging module, the position of the sub- View for obtaining present convergence, and judge the sub- View current location whether Centre position positioned at the visible area of father View;
Distance calculation module needs mobile distance for calculating father View;
Mobile module, for according to the mobile father View of distance, the sub- View being made to be located at the centre position of the visible area of father View.
5. the long data display systems according to claim 4 based on Android terminal, which is characterized in that the distance Computing module is implemented as:
Obtain the width width of father's View left and right directions visible area;Obtain sub- View to the visible area of father View the left side Width vWidth away from left and sub- View, passes through formula:
Distance=left+vWidth/2-width/2
It calculates father View and needs mobile distance, that is, screen centre position.
6. the long data display systems according to claim 4 based on Android terminal, which is characterized in that the distance Computing module is implemented as:
Obtain the height height of father's View upper and lower directionss visible area;Obtain sub- View to the visible area of father View top Height vheight away from upper and sub- View, passes through formula:
Distance=upper+vheight/2-height/2
It calculates father View and needs mobile distance, that is, screen centre position.
CN201810466915.XA 2018-05-16 2018-05-16 Android terminal-based long data display method and system Active CN108664309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810466915.XA CN108664309B (en) 2018-05-16 2018-05-16 Android terminal-based long data display method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810466915.XA CN108664309B (en) 2018-05-16 2018-05-16 Android terminal-based long data display method and system

Publications (2)

Publication Number Publication Date
CN108664309A true CN108664309A (en) 2018-10-16
CN108664309B CN108664309B (en) 2021-04-06

Family

ID=63779679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810466915.XA Active CN108664309B (en) 2018-05-16 2018-05-16 Android terminal-based long data display method and system

Country Status (1)

Country Link
CN (1) CN108664309B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656639A (en) * 2018-12-25 2019-04-19 深圳创维数字技术有限公司 A kind of interface rolling motion method, apparatus, equipment and medium
CN109725795A (en) * 2018-12-27 2019-05-07 北京字节跳动网络技术有限公司 A kind of method, apparatus and computer readable medium for Multi-view display

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019678A (en) * 2012-11-16 2013-04-03 Tcl集团股份有限公司 Method and device for focus alternating of list focal plane frame
US20130085719A1 (en) * 2011-10-03 2013-04-04 Siemens Ag Application-generated function block for data exchange between control programs and building automation objects
CN107402700A (en) * 2017-06-21 2017-11-28 北京小度信息科技有限公司 Page display method and device
CN107450915A (en) * 2017-07-18 2017-12-08 四川长虹电器股份有限公司 A kind of method of the quick interception long figure of multi-screen

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130085719A1 (en) * 2011-10-03 2013-04-04 Siemens Ag Application-generated function block for data exchange between control programs and building automation objects
CN103019678A (en) * 2012-11-16 2013-04-03 Tcl集团股份有限公司 Method and device for focus alternating of list focal plane frame
CN107402700A (en) * 2017-06-21 2017-11-28 北京小度信息科技有限公司 Page display method and device
CN107450915A (en) * 2017-07-18 2017-12-08 四川长虹电器股份有限公司 A kind of method of the quick interception long figure of multi-screen

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656639A (en) * 2018-12-25 2019-04-19 深圳创维数字技术有限公司 A kind of interface rolling motion method, apparatus, equipment and medium
CN109656639B (en) * 2018-12-25 2022-04-15 深圳创维数字技术有限公司 Interface rolling method, device, equipment and medium
CN109725795A (en) * 2018-12-27 2019-05-07 北京字节跳动网络技术有限公司 A kind of method, apparatus and computer readable medium for Multi-view display

Also Published As

Publication number Publication date
CN108664309B (en) 2021-04-06

Similar Documents

Publication Publication Date Title
US10545580B2 (en) 3D interaction method, device, computer equipment and storage medium
US9396215B2 (en) Search device, search method, recording medium, and program
US9651782B2 (en) Wearable tracking device
KR20190136085A (en) On-screen comment display method and electronic device
CN105824409A (en) Interactive control method and device for virtual reality
CN103383603B (en) The method and electronic equipment of information processing
WO2020082275A1 (en) Method and device for processing drawn content on terminal apparatus, and terminal apparatus
CN106161953A (en) A kind of track up method and apparatus
CN110215690A (en) View angle switch method, apparatus and electronic equipment in scene of game
CN110727496B (en) Layout method and device of graphical user interface, electronic equipment and storage medium
JP6178048B2 (en) Image processing apparatus, image processing method, and program
CN103324414A (en) Method and mobile terminal for adjusting icon positions
CN105979360A (en) Rendering image processing method and device
CN110163806A (en) A kind of image processing method, device and storage medium
CN105094675B (en) A kind of man-machine interaction method and touch screen wearable device
CN107832001B (en) Information processing method, information processing device, electronic equipment and storage medium
CN109889727A (en) Unmanned photographic subjects switching method and system, unmanned cameras and storage medium
CN106648056A (en) Method and device for switching between landscape display and portrait display of mobile terminal
US20150121301A1 (en) Information processing method and electronic device
CN110968227B (en) Control method and device of intelligent interactive panel
CN108664309A (en) A kind of long method for exhibiting data and system based on Android terminal
CN106371755B (en) Multi-screen interaction method and system
CN104238983A (en) Control method and electronic equipment
JP6468656B2 (en) AR information display device
CN106569651A (en) Positioning method and device for page popup layer position

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