Git Product home page Git Product logo

Comments (7)

YoKeyword avatar YoKeyword commented on September 8, 2024

嗯 确实不是很方便的~

当然犹豫了下,使用的是现在自己强转的方式;

想不强转的话:Adapter就需要3个泛型了:

class YourAdapter extends IndexableAdapter<YourEntity,TitleVH,ContentVH>{
}

这样使用者写起来感觉有点怪怪的,所以选用了 自己强转的方式,当然这个选择只是个人想法,可能确实欠妥 :)

from indexablerecyclerview.

qssq666123 avatar qssq666123 commented on September 8, 2024

@YoKeyword 嗯嗯,希望可以弄那种类似QQ音乐 里面的歌手 列表那种风格也就是只要一个title,而不是每一个都有title

from indexablerecyclerview.

qssq666123 avatar qssq666123 commented on September 8, 2024

为什么设置data没有回调呢?奇怪啊,你的demo是正常的,我这里自己写的就不正常了。我都断点调试了,就是回调没走

from indexablerecyclerview.

qssq666123 avatar qssq666123 commented on September 8, 2024

调试看了一下为什么观察者没注册成功

from indexablerecyclerview.

qssq666123 avatar qssq666123 commented on September 8, 2024

问题出来了,不过 逻辑要写严谨一点哦、比如观察者没注册 报错之类的

from indexablerecyclerview.

qssq666123 avatar qssq666123 commented on September 8, 2024

mFuture = mExecutorService.submit(new Runnable() {
@OverRide
public void run() {
final ArrayList datas = transform(mIndexableAdapter.getItems());
if (datas == null) return;

            getSafeHandler().post(new Runnable() {
                @Override
                public void run() {
                    mRealAdapter.setDatas(datas);
                    mIndexBar.setDatas(mShowAllLetter, mRealAdapter.getItems());

                    if (mIndexableAdapter.getIndexCallback() != null) {
                        mIndexableAdapter.getIndexCallback().onFinished(datas);
                    }

                }
            });
        }
    });

执行到这里 没法调试了,没有数据是不可能的。

from indexablerecyclerview.

YoKeyword avatar YoKeyword commented on September 8, 2024

#32

最近个人闲余时间较少,开源方面重心在Fragmentation上,该库暂时没有更细致的维护打算,不过欢迎提PR,一起完善该库~

from indexablerecyclerview.

Related Issues (20)

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.