Long data displaying method and system 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 achieve the reduction of operation steps and good user experience , the effect of reducing the difficulty of operation
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0039] Based on the above method, if the parent View is ScrollView, and the direction is to slide left and right, then define a method smoothScrollToMid that slides to the middle, and pass in parameters: the focusable child View, bind the focus monitoring event to the child View, when the child View is focused time, 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 center positio...
Embodiment 2
[0042] Based on the above method, if the parent View is ScrollView, and the direction is sliding up and down, then define a method smoothScrollToMid that slides to the middle, and pass in the parameters: the focusable sub-View, bind the focus monitoring event to the sub-View, when the sub-View is focused time, 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 the View....
Embodiment 3
[0045] Based on the above method, 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 to move through the coordinate position of the item, and also take left and right movement as an example smoothScrollToMid, and maintain the child View as Under the premise of the middle position, the calculation is performed in the focus change event of the item. The calculation method is similar to that of the ScrollView. First, calculate the distance left between the item and the leftmost part of the RecyclerView, and then obtain the width vwidth of the item, and the width of the left and right directions of the RecyclerView displayable area. Width, 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 always located in the...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

