Comments (3)
SlimAdapter.create()
.register(R.layout.recycler_item, new SlimInjector<Foo>() {
@Override
public void onInject(Foo data, IViewInjector injector) {
injector.clicked(R.id.YOUR_ID_ROOT_ELEMENT, view -> {
//Some Action
});
}
})
.attachTo(mRecycler);
@miszmaniac
Try to put ID in your root element. I guess that's what you want.
from slimadapter.
I know that I can do that this way, it's just cumbersome, and in Kotlin it prevents for use of {}
from slimadapter.
@miszmaniac
Just call 'clicked' passing a listener. I'll wait your feedback, if all things are ok make a pull request.
Replace these files.
DefaultViewInjector.txt
IViewInjector.txt
from slimadapter.
Related Issues (20)
- Nested Adapter
- Fastscroller support HOT 1
- Lamda function not working
- How to get value of TextView ? HOT 1
- What about if I wanna get the position of every element like I do with adapter class ? HOT 14
- How to implement OnItemSelectedListener (Spinner) in Kotlin?
- 请帅斌支持下lamda表达式
- How to filter search
- Can you add item animation? HOT 1
- glide不生效
- not The DEFAULT injector found...
- 有没办法更新一个吧position也在onInject()回调里返回的
- 如何清空所有adapter的数据,在重新初始化?RemovedData方法没有?
- Recyclerview Changing Items During Scroll
- How to change enableLoadMore default text
- How to incress speed
- 数据多时候,导致不流畅和数据错乱。
- Jcenter bintray is shutting down
- How we can programmatically (automatically) click on specific item?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slimadapter.