Android Databinding with menus

Viewed 2178

I'm testing out the new Data Binding feature built into Android. I've successfully done simple binding to text views, and even two-way binding, and binding a List<> to a RecyclerView. Now I want to test it with a menu view, but when I add a layout XML file to the menu folder, I see the menu and the item I added, but when I just wrap the contents of that menu view with a <layout> tag, it says the "Element layout must be declared". I didn't have to make a special declaration on the other layouts I've tested. which suggests that you can't use it with layouts in the menu folder. Is that the case, or am I missing something?

0 Answers
Related