Is there a way to exclude a view from being data-b...
# android-databinding
s
Is there a way to exclude a view from being data-bound? I need the ID to arrange the view, but I don’t need to reference it programmatically.
👍 1
p
Maybe I don't understand the question, but what stays against having both? You do not need to use dataBinding. Please elaborate more the question.
s
I have a view that is simply a dividing line. I need to add an ID so that the views know how to arrange around it. Every view with an ID gets “saved” into sViewsWithIds. I don’t need that view to be saved or data-bound so I’d like to exclude it.
o
That's something which bothers me as well. When we use constraint layout or relative layout we need ids for positioning and when all views have ids, generated binding class has lots of unnecessary properties. But as far as I know there is not a solution for that for now (like an attribute or annotation to tell it ignore )
😞 1