binding fragment android

Solutions on MaxInterview for binding fragment android by the best coders in the world

showing results for - "binding fragment android"
Carla
28 Jan 2016
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