yhaolpz / slideadapter Goto Github PK
View Code? Open in Web Editor NEW一句代码搞定 RecycleView 侧滑菜单、添加头部底部、加载更多 , 像 Glide 一样简洁的链式调用轻松实现 Adapter
License: Apache License 2.0
一句代码搞定 RecycleView 侧滑菜单、添加头部底部、加载更多 , 像 Glide 一样简洁的链式调用轻松实现 Adapter
License: Apache License 2.0
你好,有个需求:所有的RecycleView有左右滑动的事件,现在想让某个ItemView不能够左右滑动,但是上下的ItemView能够左右滑动的,这个怎么实现
博主你好!
我尝试用这个框架加载网络图片资源,也就是获取到的是个string类型的图片url地址。但显然通过ItemBind中的itemView.setImageResource(int viewId, int resId)是不行的,不知道可有什么优雅的解决方法?
麻烦了,谢谢!
请教博主,为啥我用demo中的基本写法,但是界面上数据却没出来。load(data)里传入的list是有数据的,item的布局也很简单;而且也不提示任何错误。有点没方向……
错误信息如下:
java.lang.ClassCastException: com.zqw.lightfilm.detail_movie.MovieDetailBean$DataBean$BasicBean$ActorsBean cannot be cast to com.zqw.lightfilm.detail_movie.MovieDetailBean
at com.zqw.lightfilm.detail_movie.DetailMovieActivity$3.onBind(DetailMovieActivity.java:227)
at com.wyh.slideAdapter.ItemBind.bind(ItemBind.java:13)
at com.wyh.slideAdapter.SlideAdapter.onBindViewHolder(SlideAdapter.java:120)
at com.wyh.slideAdapter.SlideAdapter.onBindViewHolder(SlideAdapter.java:28)
MovieDetailBean是一个实体类,我手动写适配器可以成功加载。
一下是代码第227行
ItemBind itemBind = new ItemBind<MovieDetailBean>() {
@Override
public void onBind(ItemView itemView, MovieDetailBean data, int position) {
final MovieDetailBean.DataBean.BasicBean.ActorsBean actors = data.getData().getBasic().getActors().get(position);
itemView.setText(R.id.tv_name, actors.getName())
.setText(R.id.tv_role_name, actors.getRoleName())
});
}
可以加上下拉刷新操作么?
请问有notifyDataSetChanged()方法用来更新RecyclerView吗
头部可以做成默认隐藏,然后下拉刷新时露出头部吗?
在原生中通过给adapter的list数据重新赋值,然后通知进行更新,不知道在slideAdapter中该如何实现呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.