Comments (2)
Hi, @dakun666 谢谢你提交的 issue
现在已经修复了该回调相关的问题,还没提交到 Maven
上。
如果你想在可展开的父列表项展开的时候自动滑动到该项的底部来展示完全内容,你可以在监听器的回调里调用 RecyclerView
相关滚动接口来处理, 比如 scrollToPosition (int position)
传递 parent 的 adapterPosition + 该 parent 所含有的 child 的数量 的值进去就可以,亲测可行:
if (byUser) {
int scrollToPos = pvh.getAdapterPosition() + ((MyParent) pvh.getParent()).getChildCount();
rv.scrollToPosition(scrollToPos);
}
from expandablerecyclerview.
谢谢解答!我的解决方法是
Data data = (Data) getDataList().get(position);
rv.scrollToPosition(pvh.getLayoutPosition() + data.getChildren().size());
也是可以用的。
你的库很棒!我已经用到了我的项目中,有什么问题和建议我会发上来的。
再次感谢
from expandablerecyclerview.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expandablerecyclerview.