android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.4k stars 8.29k forks source link

[ViewBinding] How to Ignore single view/viewgroup? #988

Closed yizems closed 1 year ago

yizems commented 3 years ago

How to ignore single view/viewgroup or viewgroup & his children? Whether the relevant configuration rules can be added?

like this:

viewbinding.ignore

abc_**
**_abc
jun-wu-tw commented 1 year ago

I guess no, we can only handle it one by one now. 🤷

<LinearLayout
        ...
        tools:viewBindingIgnore="true" >
    ...
</LinearLayout>

The official document introduced the way of ignoring the code generated by ViewBinding. https://developer.android.com/topic/libraries/view-binding#setup

yizems commented 1 year ago

Too rough