Пример #1
0
  @Override
  public void onClick(View v) {
    sc.addSelectedToDatabase(getContext().getApplicationContext());

    ComputationsFragment computationsFragment = new ComputationsFragment();
    getActivity()
        .getSupportFragmentManager()
        .beginTransaction() // TODO fix animation
        .setCustomAnimations(R.anim.fade_in, R.anim.exit_to_right)
        .replace(R.id.fragment_container, computationsFragment)
        .commit();
  }
Пример #2
0
  @Override
  public void onClick(View v) {
    addSelectedToDatabase(this.getContext());

    SetupDefaultsFragment setupDefaultsFragment = new SetupDefaultsFragment();
    getActivity()
        .getSupportFragmentManager()
        .beginTransaction() // TODO fix animation
        .setCustomAnimations(
            R.anim.fade_in, R.anim.exit_to_left, R.anim.enter_from_right, R.anim.fade_out)
        .replace(R.id.setup_fragment_container, setupDefaultsFragment)
        .addToBackStack("Computations")
        .commit();
  }