コード例 #1
0
  @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;
  }
コード例 #2
0
  @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);
  }
コード例 #3
0
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   mPresenter.setContext(activity);
 }