Last active
August 4, 2018 22:20
-
-
Save paulocns/0aeeba4b77786d53ffc48f5ca38f954a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class QueryFragment extends BaseFragment { | |
| private FragmentQueryMvvmBinding binding; | |
| @Nullable | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |
| View view = inflater.inflate(R.layout.fragment_query_mvvm, container, false); | |
| binding = DataBindingUtil.bind(view); | |
| return view; | |
| } | |
| @Override | |
| public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |
| super.onViewCreated(view, savedInstanceState); | |
| QueryViewModelArc queryViewModelArc = | |
| ViewModelProviders.of(this, getViewModelFactory()).get(QueryViewModelArc.class); | |
| binding.setViewModel(queryViewModelArc); | |
| binding.setLifecycleOwner(this); | |
| binding.executePendingBindings(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment