@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View root = inflater.inflate(R.layout.fragment_calculation_results, container, false); setupViews(root); mPresenter.calculate(); mPresenter.refreshDisplay(); return root; }
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { case R.id.action_send: mPresenter.startActionSend(); return true; default: break; } return super.onOptionsItemSelected(item); }
@Override public void onAttach(Activity activity) { super.onAttach(activity); mPresenter.setContext(activity); }