Giter Club home page Giter Club logo

yhaolpz / slideadapter Goto Github PK

View Code? Open in Web Editor NEW
190.0 190.0 45.0 1.73 MB

一句代码搞定 RecycleView 侧滑菜单、添加头部底部、加载更多 , 像 Glide 一样简洁的链式调用轻松实现 Adapter

Home Page: http://www.yhao.xyz/2017/09/08/%E6%90%9E%E5%AE%9A%20RecycleView%20%E4%BE%A7%E6%BB%91%E8%8F%9C%E5%8D%95%E3%80%81%E6%B7%BB%E5%8A%A0%E5%A4%B4%E9%83%A8%E5%BA%95%E9%83%A8%E3%80%81%E5%8A%A0%E8%BD%BD%E6%9B%B4%E5%A4%9A/

License: Apache License 2.0

Java 100.00%

slideadapter's Issues

实现屏蔽某个ItemView 的左右活动

你好,有个需求:所有的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())

                        });
            }

下拉刷新

头部可以做成默认隐藏,然后下拉刷新时露出头部吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.