Search in sources :

Example 26 with FragmentTransaction

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();
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) RemoveShowDialogFragment(com.battlelancer.seriesguide.ui.dialogs.RemoveShowDialogFragment) Fragment(android.support.v4.app.Fragment) RemoveShowWorkerFragment(com.battlelancer.seriesguide.util.RemoveShowWorkerFragment)

Example 27 with FragmentTransaction

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();
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction)

Example 28 with FragmentTransaction

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();
    }
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction)

Example 29 with FragmentTransaction

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");
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) AppCompatDialogFragment(android.support.v7.app.AppCompatDialogFragment) DialogFragment(android.support.v4.app.DialogFragment) AppCompatDialogFragment(android.support.v7.app.AppCompatDialogFragment) DialogFragment(android.support.v4.app.DialogFragment) Fragment(android.support.v4.app.Fragment)

Example 30 with FragmentTransaction

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();
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) SubmitLogFragment(org.whispersystems.libpastelog.SubmitLogFragment)

Aggregations

FragmentTransaction (android.support.v4.app.FragmentTransaction)367 Fragment (android.support.v4.app.Fragment)132 FragmentManager (android.support.v4.app.FragmentManager)73 DialogFragment (android.support.v4.app.DialogFragment)26 FragmentActivity (android.support.v4.app.FragmentActivity)25 View (android.view.View)23 FragmentTransaction (android.app.FragmentTransaction)18 Intent (android.content.Intent)18 TextView (android.widget.TextView)18 Button (android.widget.Button)17 Bundle (android.os.Bundle)16 OnClickListener (android.view.View.OnClickListener)16 SherlockFragment (com.actionbarsherlock.app.SherlockFragment)12 TargetApi (android.annotation.TargetApi)6 ActionBar (android.support.v7.app.ActionBar)6 AppCompatActivity (android.support.v7.app.AppCompatActivity)6 Toolbar (android.support.v7.widget.Toolbar)6 FriendsTimeLineFragment (org.qii.weiciyuan.ui.maintimeline.FriendsTimeLineFragment)6 UserInfoFragment (org.qii.weiciyuan.ui.userinfo.UserInfoFragment)6 Transition (android.transition.Transition)5