linisme / SlimAdapter

A slim & clean & typeable Adapter without# VIEWHOLDER
https://raw.githubusercontent.com/MEiDIK/SlimAdapter/master/SlimAdapter.jpg
MIT License
931 stars 117 forks source link

SlimInjector IllegalArgumentException (lambda) #8

Closed fcannizzaro closed 7 years ago

fcannizzaro commented 7 years ago

Using lambda instead of anonymous class make it crash.

(Episode episode, IViewInjector view) -> {                    
  // code
})

instead of

new SlimInjector<Episode>() {
    @Override
    public void onInject(Episode episode, IViewInjector view) {
        // code
    }
})
miszmaniac commented 7 years ago

Sadly you can't use it with lambda as there is no way to get type information after code is compiled. We've made fork https://github.com/kubatatami/SlimAdapter where we added second parameter with class in register method, just to make it work with lambda.

linisme commented 7 years ago

@miszmaniac thanks again for your solution