1example:
2
3public View onCreateView(LayoutInflater inflater,
4 @Nullable ViewGroup container,
5 @Nullable Bundle savedInstanceState) {
6 MartianDataBinding binding = DataBindingUtil.inflate(
7 inflater, R.layout.martian_data, container, false);
8 View view = binding.getRoot();
9 //here data must be an instance of the class MarsDataProvider
10 binding.setMarsdata(data);
11 return view;
12}
13