当前位置:网站首页>Recyclerview computehorizontalscrollextend computehorizontalscrollrange computehorizontalscroll for calculating the sliding distance
Recyclerview computehorizontalscrollextend computehorizontalscrollrange computehorizontalscroll for calculating the sliding distance
2022-07-25 22:45:00 【Chun does what he says】
// At present RcyclerView The height of the display area . The horizontal list screen displays from left to right
int extent = recyclerView.computeHorizontalScrollExtent();
// Overall height , Attention is the whole , Included outside the display area
int range = recyclerView.computeHorizontalScrollRange();
// The distance that has been scrolled down , by 0 Hour means it is at the top
int offset = recyclerView.computeHorizontalScrollOffset();
// Percentage that has scrolled [0.0-1.0]
float percentage = (offset / (float)(range - extent))
Here is the picture I drew

边栏推荐
- 【集训DAY15】简单计算【树状数组】【数学】
- 【集训DAY15】好名字【hash】
- [training Day12] be go! [dynamic programming] [mathematics]
- [training Day11] Nescafe [greed]
- 依法严厉打击违规自媒体运营者:净化自媒体行业迫在眉睫
- [MySQL rights] UDF rights (with Malaysia)
- To light up all the positions in the string that need to be lit, at least a few lights are needed
- Today, I sorted out some problems about high collapse
- [PMP learning notes] Chapter 1 Introduction to PMP System
- 3 lexical analysis
猜你喜欢

Naming rules of software test pytest pytest the pre and post confitest of use cases Py customized allure report @pytest.mark.parameter() decorator as data-driven

【集训DAY15】Boring【树形DP】

【集训DAY13】Backpack【动态规划】【贪心】

数据平台下的数据治理

Xiaobai programmer's sixth day

JSON object
![[training Day11] Calc [mathematics]](/img/a7/cbb33f0c241e1bad90a282bba990d1.png)
[training Day11] Calc [mathematics]

【MySQL提权】UDF提权(附带大马)

关于getchar和scanf的使用示例及注意点

分享两个音乐播放地址
随机推荐
[training Day12] min ratio [DFS] [minimum spanning tree]
【集训DAY12】X equation 【高精度】【数学】
Qtreewidget control of QT
Array中可以用泛型吗
Session and cookie, token and storage
XSS tool beef XSS installation and use
Matrixcube unveils the complete distributed storage system matrixkv implemented in 102-300 lines
CMU AI PhD 第一年总结
【PMP学习笔记】第1章 PMP体系引论
Simulated Xiaomi mall head home page
LabVIEW develops PCI-1680U dual port can card
Ribbon execution logic source code analysis
Xiaobai programmer day 8
Anaconda~Upload did not complete.
贴片微型滚珠振动开关的结构原理
Short circuit and &, short circuit or |, logic and &, logic or |; Conditional operator
C语言逆序打印字符串的两种方法
Simple setting of drop-down triangle
JD quick navigation box
Structure principle of micro ball vibration switch with chip