Search in sources :

Example 11 with FragmentManager

use of androidx.fragment.app.FragmentManager in project Gadgetbridge by Freeyourgadget.

the class ActivityListingChartFragment method showDetail.

private void showDetail(int tsFrom, int tsTo, ActivitySession item, GBDevice device) {
    FragmentManager fm = getActivity().getSupportFragmentManager();
    ActivityListingDetail listingDetailFragment = ActivityListingDetail.newInstance(tsFrom, tsTo, item, device);
    listingDetailFragment.show(fm, "activity_list_detail");
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager)

Example 12 with FragmentManager

use of androidx.fragment.app.FragmentManager in project xabber-android by redsolution.

the class ChatFragment method showForwardPanel.

private void showForwardPanel(List<String> forwardIds) {
    List<String> ids = new ArrayList<>(forwardIds);
    Activity activity = getActivity();
    if (activity != null && !activity.isFinishing()) {
        FragmentManager fragmentManager = getChildFragmentManager();
        forwardPanel = ForwardPanel.newInstance(ids);
        FragmentTransaction fTrans = fragmentManager.beginTransaction();
        fTrans.replace(R.id.secondBottomPanel, forwardPanel);
        fTrans.commit();
    }
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) FragmentTransaction(androidx.fragment.app.FragmentTransaction) ArrayList(java.util.ArrayList) QuestionActivity(com.xabber.android.ui.activity.QuestionActivity) ChatActivity(com.xabber.android.ui.activity.ChatActivity) ContactEditActivity(com.xabber.android.ui.activity.ContactEditActivity) ContactActivity(com.xabber.android.ui.activity.ContactActivity) Activity(android.app.Activity)

Example 13 with FragmentManager

use of androidx.fragment.app.FragmentManager in project xabber-android by redsolution.

the class ChatFragment method hideForwardPanel.

private void hideForwardPanel() {
    forwardIds.clear();
    setUpInputViewButtons();
    Activity activity = getActivity();
    if (activity != null && !activity.isFinishing()) {
        FragmentManager fragmentManager = getChildFragmentManager();
        FragmentTransaction fTrans = fragmentManager.beginTransaction();
        fTrans.remove(forwardPanel);
        fTrans.commit();
    }
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) FragmentTransaction(androidx.fragment.app.FragmentTransaction) QuestionActivity(com.xabber.android.ui.activity.QuestionActivity) ChatActivity(com.xabber.android.ui.activity.ChatActivity) ContactEditActivity(com.xabber.android.ui.activity.ContactEditActivity) ContactActivity(com.xabber.android.ui.activity.ContactActivity) Activity(android.app.Activity)

Example 14 with FragmentManager

use of androidx.fragment.app.FragmentManager in project FlexibleAdapter by davideas.

the class MainActivity method initializeFragment.

private void initializeFragment(Bundle savedInstanceState) {
    if (savedInstanceState != null) {
        mFragment = (AbstractFragment) getSupportFragmentManager().getFragment(savedInstanceState, STATE_ACTIVE_FRAGMENT);
    }
    if (mFragment == null) {
        mFragment = FragmentOverall.newInstance(2);
    }
    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.recycler_view_container, mFragment).commit();
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager)

Example 15 with FragmentManager

use of androidx.fragment.app.FragmentManager in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class WifiDppChooseSavedWifiNetworkFragment method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    final ActionBar actionBar = getActivity().getActionBar();
    if (actionBar != null) {
        actionBar.hide();
    }
    /**
     * Embeded WifiNetworkListFragment as child fragment within
     * WifiDppChooseSavedWifiNetworkFragment.
     */
    final FragmentManager fragmentManager = getChildFragmentManager();
    final WifiNetworkListFragment fragment = new WifiNetworkListFragment();
    final Bundle args = getArguments();
    if (args != null) {
        fragment.setArguments(args);
    }
    final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    fragmentTransaction.replace(R.id.wifi_network_list_container, fragment, TAG_FRAGMENT_WIFI_NETWORK_LIST);
    fragmentTransaction.commit();
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) FragmentTransaction(androidx.fragment.app.FragmentTransaction) Bundle(android.os.Bundle) ActionBar(android.app.ActionBar)

Aggregations

FragmentManager (androidx.fragment.app.FragmentManager)170 FragmentTransaction (androidx.fragment.app.FragmentTransaction)55 Fragment (androidx.fragment.app.Fragment)42 Bundle (android.os.Bundle)28 Test (org.junit.Test)15 Intent (android.content.Intent)13 FragmentActivity (androidx.fragment.app.FragmentActivity)10 Activity (android.app.Activity)6 View (android.view.View)6 DialogFragment (androidx.fragment.app.DialogFragment)6 TaskRetainerFragment (com.owncloud.android.ui.fragment.TaskRetainerFragment)5 ArrayList (java.util.ArrayList)5 Context (android.content.Context)4 DialogInterface (android.content.DialogInterface)3 LayoutInflater (android.view.LayoutInflater)3 MenuInflater (android.view.MenuInflater)3 Window (android.view.Window)3 TextView (android.widget.TextView)3 ViewModelProvider (androidx.lifecycle.ViewModelProvider)3 SslUntrustedCertDialog (com.owncloud.android.ui.dialog.SslUntrustedCertDialog)3