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();
}
use of android.support.v4.app.FragmentTransaction in project native-navigation by airbnb.
the class ScreenCoordinator method presentScreen.
public void presentScreen(Fragment fragment, PresentAnimation anim, @Nullable Promise promise) {
if (fragment == null) {
throw new IllegalArgumentException("Fragment must not be null.");
}
BackStack bsi = new BackStack(getNextStackTag(), anim, promise);
backStacks.push(bsi);
// TODO: dry this up with pushScreen
FragmentTransaction ft = activity.getSupportFragmentManager().beginTransaction().setAllowOptimization(true).setCustomAnimations(anim.enter, anim.exit, anim.popEnter, anim.popExit);
Fragment currentFragment = getCurrentFragment();
if (currentFragment != null) {
ft.detach(currentFragment);
}
ft.add(container.getId(), fragment).addToBackStack(bsi.getTag()).commit();
activity.getSupportFragmentManager().executePendingTransactions();
bsi.pushFragment(fragment);
Log.d(TAG, toString());
}
Aggregations