Ejemplo n.º 1
0
  private void setupFragments() {
    search =
        (SearchFragment)
            getSupportFragmentManager().findFragmentById(R.id.activity_main_fragment_search);
    library =
        (BrowsePeerFragment)
            getSupportFragmentManager().findFragmentById(R.id.activity_main_fragment_browse_peer);
    transfers =
        (TransfersFragment)
            getSupportFragmentManager().findFragmentById(R.id.activity_main_fragment_transfers);
    peers =
        (BrowsePeersFragment)
            getSupportFragmentManager().findFragmentById(R.id.activity_main_fragment_browse_peers);
    peersDisabled =
        (BrowsePeersDisabledFragment)
            getSupportFragmentManager()
                .findFragmentById(R.id.activity_main_fragment_browse_peers_disabled);
    about =
        (AboutFragment)
            getSupportFragmentManager().findFragmentById(R.id.activity_main_fragment_about);

    hideFragments(getSupportFragmentManager().beginTransaction()).commit();

    library.setPeer(PeerManager.instance().getLocalPeer());
  }
Ejemplo n.º 2
0
  @Override
  protected void onPause() {
    super.onPause();

    search.dismissDialogs();
    library.dismissDialogs();
    peers.dismissDialogs();
  }