Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能适配Viewbinding吗?谢谢 #71

Closed
dingxiansen1 opened this issue Nov 28, 2021 · 1 comment
Closed

能适配Viewbinding吗?谢谢 #71

dingxiansen1 opened this issue Nov 28, 2021 · 1 comment

Comments

@dingxiansen1
Copy link

作者您好!很辛苦您开源了一个这么好的库,请教您一下,如何在项目中用viewbinding的方式来使用这个库,谢谢,非常感激您的开源

@liangjingkanji
Copy link
Owner

liangjingkanji commented Nov 28, 2021

使用ViewBinding和使用findViewById没有多大区别, 不存在不支持

binding.rv.linear().setup {
    addType<DragModel>(R.layout.item_drag)
    onBind {
        val binding = getBinding<ItemDragBinding>()
    }
}.models = getData()

示例代码: ViewBinding

开源方便你我, 使用本框架后你就也是作者之一

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants