use of android.support.v4.app.FragmentTransaction in project SeriesGuide by UweTrottmann.
the class OverviewActivity method setupPanes.
private void setupPanes() {
Fragment showsFragment = ShowFragment.newInstance(showTvdbId);
FragmentTransaction ft1 = getSupportFragmentManager().beginTransaction();
ft1.setCustomAnimations(R.anim.fade_in, R.anim.fade_out);
ft1.replace(R.id.fragment_show, showsFragment);
ft1.commit();
Fragment overviewFragment = OverviewFragment.newInstance(showTvdbId);
FragmentTransaction ft2 = getSupportFragmentManager().beginTransaction();
ft2.setCustomAnimations(R.anim.fade_in, R.anim.fade_out);
ft2.replace(R.id.fragment_overview, overviewFragment);
ft2.commit();
Fragment seasonsFragment = SeasonsFragment.newInstance(showTvdbId);
FragmentTransaction ft3 = getSupportFragmentManager().beginTransaction();
ft3.setCustomAnimations(R.anim.fade_in, R.anim.fade_out);
ft3.replace(R.id.fragment_seasons, seasonsFragment);
ft3.commit();
}
use of android.support.v4.app.FragmentTransaction in project SeriesGuide by UweTrottmann.
the class ConnectTraktFragment method replaceWithCredentialsFragment.
private void replaceWithCredentialsFragment() {
ConnectTraktCredentialsFragment f = ConnectTraktCredentialsFragment.newInstance();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.content_frame, f);
ft.commit();
}
use of android.support.v4.app.FragmentTransaction in project SeriesGuide by UweTrottmann.
the class StatsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_singlepane_drawer);
setupActionBar();
setupNavDrawer();
if (savedInstanceState == null) {
StatsFragment f = new StatsFragment();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(R.id.content_frame, f);
ft.commit();
}
}
use of android.support.v4.app.FragmentTransaction in project SeriesGuide by UweTrottmann.
the class AddListDialogFragment method showAddListDialog.
/**
* Display a dialog which allows to edit the title of this list or remove it.
*/
public static void showAddListDialog(FragmentManager fm) {
// DialogFragment.show() will take care of adding the fragment
// in a transaction. We also want to remove any currently showing
// dialog, so make our own transaction and take care of that here.
FragmentTransaction ft = fm.beginTransaction();
Fragment prev = fm.findFragmentByTag("addlistdialog");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
// Create and show the dialog.
DialogFragment newFragment = AddListDialogFragment.newInstance();
newFragment.show(ft, "addlistdialog");
}
use of android.support.v4.app.FragmentTransaction in project Signal-Android by WhisperSystems.
the class LogSubmitActivity method onCreate.
@Override
protected void onCreate(Bundle icicle) {
dynamicTheme.onCreate(this);
super.onCreate(icicle);
setContentView(R.layout.log_submit_activity);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
SubmitLogFragment fragment = SubmitLogFragment.newInstance();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.fragment_container, fragment);
transaction.commit();
}
Aggregations