No More findViewById

I was recently told that Google likes Medium, so I’ve started posting there. Here’s a quick intro to using data binding in its most basic form:

No More findViewById


5 thoughts on “No More findViewById

  1. Data binding is great! I’ve managed to implement a nice MVVM approach that I’m quite pleased with. But I find something very useful is lacking – binding for option and toolbar menus. Any plans to add support for these? Would be great if it was possible to bind a menu item to its own ViewModel that controls a separate item in the menu. I mean its entire state – visibility, title, command, isChecked. Currently I don’t see a simple way to make a custom binding adapter to achieve such behavior. The problem is that in MVVM the ViewModel is forbidden to communicate to the View except through the binding mechanism.

  2. Hi George,

    My android code is full of generics GenericBindingAdapter , GenericArrayAdapter


    ==>GenericModel i am using wild card to catch any type which is a valid syntax,
    however i dont understand why it gives the error “?” type not found , generics do work this way , it is not necessary for me to see wild card type in intellisence which is for developer comfort , can you share any work around for this issue

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s