use of androidx.fragment.app.FragmentTransaction in project Cangol-uiframe by Cangol.
the class TabDrawerNavigationFragmentActivityDelegate method setDrawer.
public void setDrawer(int gravity, BaseFragment fragment) {
fragment.setUserVisibleHint(false);
FragmentTransaction t = mActivity.getSupportFragmentManager().beginTransaction();
t.replace(gravity == Gravity.LEFT ? R.id.left_view : R.id.right_view, fragment, "DrawerFragment_" + gravity);
t.commitAllowingStateLoss();
mActivity.getSupportFragmentManager().executePendingTransactions();
}
use of androidx.fragment.app.FragmentTransaction in project paper-onboarding-android by Ramotion.
the class FragmentsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragments_activity_layout);
fragmentManager = getSupportFragmentManager();
final PaperOnboardingFragment onBoardingFragment = PaperOnboardingFragment.newInstance(getDataForOnboarding());
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.fragment_container, onBoardingFragment);
fragmentTransaction.commit();
onBoardingFragment.setOnRightOutListener(new PaperOnboardingOnRightOutListener() {
@Override
public void onRightOut() {
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Fragment bf = new BlankFragment();
fragmentTransaction.replace(R.id.fragment_container, bf);
fragmentTransaction.commit();
}
});
}
use of androidx.fragment.app.FragmentTransaction in project Signal-Android by WhisperSystems.
the class PaymentRecipientSelectionFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
toolbar = view.findViewById(R.id.payment_recipient_selection_fragment_toolbar);
toolbar.setNavigationOnClickListener(v -> Navigation.findNavController(v).popBackStack());
contactFilterView = view.findViewById(R.id.contact_filter_edit_text);
Bundle arguments = new Bundle();
arguments.putBoolean(ContactSelectionListFragment.REFRESHABLE, false);
arguments.putInt(ContactSelectionListFragment.DISPLAY_MODE, DisplayMode.FLAG_PUSH | DisplayMode.FLAG_HIDE_NEW);
arguments.putBoolean(ContactSelectionListFragment.CAN_SELECT_SELF, false);
Fragment child = getChildFragmentManager().findFragmentById(R.id.contact_selection_list_fragment_holder);
if (child == null) {
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
contactsFragment = new ContactSelectionListFragment();
contactsFragment.setArguments(arguments);
transaction.add(R.id.contact_selection_list_fragment_holder, contactsFragment);
transaction.commit();
} else {
contactsFragment = (ContactSelectionListFragment) child;
}
initializeSearch();
}
use of androidx.fragment.app.FragmentTransaction in project xabber-android by redsolution.
the class ForwardedActivity method initFragment.
private void initFragment(AccountJid account, UserJid user) {
if (fragment == null)
fragment = ForwardedFragment.newInstance(account, user, messageId);
FragmentTransaction fTrans = getSupportFragmentManager().beginTransaction();
fTrans.replace(R.id.container, fragment);
fTrans.commit();
}
use of androidx.fragment.app.FragmentTransaction 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();
}
}
Aggregations