Giter Club home page Giter Club logo

arecyclerview's Issues

报!又发现一重大bug,动画时间造成的白屏

XSTATECONTROLER 的 animationState

因为动画设置了时常0.3 秒,动画开始时 进入view 显示 结束时出view隐藏

当加载时间过快,animationState连续调用两次,,从content状态转移到loading(A状态),在从loading状态 转换为 content状态(B状态)

动画开始 两个view 同时显示 ,再隔0.3秒动画完毕 出view 同时隐藏

然而exitview A状态下是loadingview B状态下是swiprefreshview,结束动画时,同时隐藏后啥都没了,都不显示白屏了。。。

adapter删除item有bug

/**
* 删除元素
*
* @param position
*/
public void removeElement(int position) {
if (data != null && data.size() > position) {
data.remove(position);
notifyItemRemoved(position);
notifyItemChanged(position);
}
}

建议:网格视图下 可以封装个间距设置方法

现在好像只有线性的

public XRecyclerView noDivider() {
    setItemAnimator(new DefaultItemAnimator());
    setHasFixedSize(true);
    return this;
}

public XRecyclerView horizontalDivider(@ColorRes int colorRes, @DimenRes int dimenRes) {
    setItemAnimator(new DefaultItemAnimator());
    setHasFixedSize(true);
    addItemDecoration(new HorizontalDividerItemDecoration.Builder(getContext())
            .colorResId(colorRes)
            .size(getContext().getResources().getDimensionPixelSize(dimenRes))
            .build()
    );
    return this;
}

public XRecyclerView verticalDivider(@ColorRes int colorRes, @DimenRes int dimenRes) {
    setItemAnimator(new DefaultItemAnimator());
    setHasFixedSize(true);
    addItemDecoration(new VerticalDividerItemDecoration.Builder(getContext())
            .colorResId(colorRes)
            .size(getContext().getResources().getDimensionPixelSize(dimenRes))
            .build()
    );
    return this;
}

多余label

lib中的AndroidManifest.xml中有label=“appname”,在自定义打包配置的时候会有影响,建议去掉

网格设置setSpanSizeLookup无效。

GridLayoutManager manager = new GridLayoutManager(getContext(), 2);
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@OverRide
public int getSpanSize(int position) {
Log.d(TAG, "getSpanSize: " + position);
Object object = items.get(position);
return object instanceof LiveBean.DataBean.PartitionsBean.LivesBean ? 2 : 0;
}
});

设置无效,谢谢亲

下拉刷新和上拉加载更多冲突

hello,在使用的时候,发现当条目的数量没有充满屏幕时,使用下拉刷新的时候会调用起onLoadMore方法。不知道怎么解决,希望能帮助我一下。

自定义loadMoreView不行吗

View loadView = LayoutInflater.from(this).inflate(R.layout.view_load_more,xRecyclerView,false);
xRecyclerView.loadMoreFooterView(loadView);

adapter的BUG

image

在XrecyclerbView里面setadapter 方法中,有个adapter类型判断,判断属于不属于XRecyclerAdapter,
然而 adapter都是继承自你封装的RecyclerAdapter,所以一定是不属于XRecyclerAdapter,每次setAdapter都生成新的XrecyclerAdapter 也将header 和footer重置为了null

造成适配多个数据源情况下,一旦调用了setAdaper都得重新add header,应该是个BUG。望解决!= =

发现了两个坑。。求修复

XrecyclerviewContentLayout 禁用刷新后,再度下拉,又会触发recyclerview的滚动监听,在最下面又将setEnabale设为true 刷新禁用又变成了启用。这个问题很大。。。

Arecyclerview中,加载的时候会默认展示一个viewholder的布局,原版的recyclerview不会默认展示啊,这问题是出在了哪?

XRecyclerView中的setGridSpanLookUp(GridLayoutManager layoutManager, final GridLayoutManager.SpanSizeLookup lookup)方法存在问题。

您好,非常感谢作者的开源这个控件我个人觉得非常好用,但是今天使用的时候发现一个问题,特来请求修复。

在XRecyclerView的代码344行中。

public void setGridSpanLookUp(GridLayoutManager layoutManager, final GridLayoutManager.SpanSizeLookup lookup) {
layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@OverRide
public int getSpanSize(int position) {
if (adapter != null) {
if (adapter.isHeaderOrFooter(position)) return 1; //注意这里

                return lookup.getSpanSize(position);
            }
            return GridLayoutManager.DEFAULT_SPAN_COUNT;
        }
    });
}

//中的

 if (adapter.isHeaderOrFooter(position)) return 1;//不应该返回1 

而是返回layoutManager.getSpanCount() ,返回1 导致GridLayout布局下底部占用为1个item无法占满。
应该是作者大大粗心了,因为第321行中的方法就没有写错。

adapter删除item有问题,出现这个错误Called attach on a child which is not detached: ViewHolder

场景:在adapter有一个尾布局时,删除最后一个item出现cause:Called attach on a child which is not detached: ViewHolder{6f3df28 position=2 id=-1, oldPos=-1, pLpos:-1} cn.droidlover.xrecyclerview.XRecyclerView{4c46441 VFED..... ......ID 0,0-1020,1520 #7f0900a1 app:id/add_device_recyclerview}, adapter:cn.droidlover.xrecyclerview.XRecyclerAdapter@970ade6, layout:android.support.v7.widget.LinearLayoutManager@fda4f27

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.