Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and system for displaying long data based on android terminal

A technology for displaying systems and long data, applied in digital data processing, input/output process of data processing, instruments, etc., can solve the problem of easily misleading users, and improve user experience and reduce operation difficulty , good user experience effect

Active Publication Date: 2021-04-06
成都天翼空间科技有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method and system for displaying long data based on an Android terminal. This method solves the problem of easily misleading users into the illusion that the end has reached the end when displaying long data, and reduces the difficulty of operation. , which enhances the user experience

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for displaying long data based on android terminal
  • A method and system for displaying long data based on android terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0039] Based on the method of the present invention, if the parent View is a ScrollView, and the direction is to slide left and right, then define a method smoothScrollToMid that slides to the middle, and pass in parameters: a focusable sub-View, bind a focus monitoring event to the sub-View, and when the sub-View is focused , call this method.

[0040] The smoothScrollToMid method is: first obtain the visible width width in the left and right directions of the ScrollView, then obtain the distance left (getLeft) from the child View to the visible left part of the parent View, and then calculate the width vWidth (getWidth) of the child View, and calculate the left at this time The value of +vWidth / 2-width / 2 (the difference between the center of the sub-Viw and the center of the screen), this value is the distance that the sub-View needs to move (smoothScrollBy) on the X-axis of fatherView, that is, the middle position of the screen, so the visible area It will always be the cen...

Embodiment 2

[0042] Based on the method of the present invention, if the parent View is ScrollView, and the direction is to slide up and down, then define a method smoothScrollToMid that slides to the middle, and pass in parameters: a focusable sub-View, bind a focus monitoring event to the sub-View, when the sub-View is focused , call this method.

[0043]The smoothScrollToMid method is as follows: first obtain the height of the visible area in the upper and lower directions of the ScrollView, and then obtain the upper margin of the visible area from the child View to the parent View and the height vheight (getheight) of the child View. At this time, calculate upper+vheight / 2 -height / 2 (the width difference between the center of the sub-Viw and the center of the screen), this value is the distance that the sub-View needs to move (smoothScrollBy) on the Y-axis of fatherView, that is, the middle position of the screen, so that the visible area is always the sub-View The center position of t...

Embodiment 3

[0045] Based on the method of the present invention, if the parent View is a list View such as RecyclerView, take RecyclerView as an example to illustrate the implementation method of the invention: first, define a method for moving through the coordinate position of the item, and also take left and right movement as an example smoothScrollToMid, while maintaining the child View Under the premise of being in the middle position, the calculation is performed in the focus change event of the item. The calculation method is similar to that of ScrollView. First, calculate the distance left between the item and the leftmost part of RecyclerView, and then obtain the width vwidth of the item, and the left and right directions of the RecyclerView displayable area. Width, and finally calculate the distance that the item needs to move distance=left+vwidth / 2-Width / 2, then you can call the movement method (smoothScrollBy) to move the item on the X axis. In this way, the target View is alwa...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and system for displaying long data based on an Android terminal. The method specifically includes steps: (1) sub-View acquires the focus, and when the focus is not at the head or tail, perform step (2); (2) acquire The position of the currently focused sub-View, and determine whether the current position of the sub-View is in the middle of the visible area of ​​the parent View, if not, then perform step (3); (3) calculate the distance that the parent View needs to move; ( 4) Move the parent View according to the distance, so that the child View is located in the middle of the visible area of ​​the parent View. The present invention solves the problem of easily misleading the user to have the illusion that the end has been reached when displaying long data, reduces the difficulty of operation, and enhances the effect of user experience.

Description

technical field [0001] The invention belongs to the technical field of terminal application display, and more specifically, relates to a long data display method and system based on an Android terminal. Background technique [0002] There are two main methods for displaying long data on existing Android terminals: [0003] 1. Use ListView, GridView, RecyclerView and other reusable sub-item list Views to divide the data into pieces and put them into corresponding items, so that the sub-items can get the focus and scroll the data by continuously moving the focus. Generally speaking, the use of this type of View is usually data in a similar format. The data is displayed in a list, and the number of items is adaptive according to the amount of data. Because the width and height of the item have been specified in advance, it is easy to make some table types. style, and then parse the formatted beans, and place them in each position of the item according to the corresponding rela...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/451G06F3/0481
CPCG06F3/0481G06F9/451
Inventor 唐选勇吴江秦贤徐剑谭功强廖勇军
Owner 成都天翼空间科技有限公司