Android DataBinding With Fragment

As we already know how to use DataBinding with Activity from Working with Data Binding Android article, but here we will see how to use DataBinding with fragment.

To bind a view of fragment we need to use onCreateView() . Here is a code snippet of fragment onCreateView()

Disable Landscape Mode In Android Application
getResources().getColor() is deprecated