use of androidx.fragment.app.FragmentTransaction 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();
}
}
use of androidx.fragment.app.FragmentTransaction in project Signal-Android by WhisperSystems.
the class MediaKeyboard method onCloseEmojiSearchInternal.
private void onCloseEmojiSearchInternal(boolean showAfterCommit) {
if (keyboardState == State.NORMAL) {
return;
}
keyboardState = State.NORMAL;
Fragment emojiSearch = fragmentManager.findFragmentByTag(EMOJI_SEARCH);
if (emojiSearch == null) {
return;
}
FragmentTransaction transaction = fragmentManager.beginTransaction().remove(emojiSearch).show(keyboardPagerFragment).setCustomAnimations(R.anim.fade_in, R.anim.fade_out);
if (showAfterCommit) {
transaction.runOnCommit(() -> show(latestKeyboardHeight, false));
}
transaction.commitAllowingStateLoss();
}
use of androidx.fragment.app.FragmentTransaction in project Signal-Android by WhisperSystems.
the class AvatarSelectionActivity method onGalleryClicked.
@Override
public void onGalleryClicked() {
if (isGalleryFirst() && popToRoot()) {
return;
}
MediaGalleryFragment fragment = new MediaGalleryFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment);
if (isCameraFirst()) {
transaction.addToBackStack(null);
}
transaction.commit();
}
use of androidx.fragment.app.FragmentTransaction in project mobile-center-sdk-android by Microsoft.
the class PropertyActivity method addProperty.
private void addProperty() {
TypedPropertyFragment fragment = new TypedPropertyFragment();
Bundle bundle = new Bundle();
bundle.putBoolean(TypedPropertyFragment.STRING_TYPE_ONLY_KEY, isStringTypeOnly());
fragment.setArguments(bundle);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.list, fragment).commit();
mProperties.add(fragment);
}
use of androidx.fragment.app.FragmentTransaction in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class WifiDppConfiguratorActivity method showAddDeviceFragment.
private void showAddDeviceFragment(boolean addToBackStack) {
WifiDppAddDeviceFragment fragment = (WifiDppAddDeviceFragment) mFragmentManager.findFragmentByTag(WifiDppUtils.TAG_FRAGMENT_ADD_DEVICE);
if (fragment == null) {
fragment = new WifiDppAddDeviceFragment();
} else {
if (fragment.isVisible()) {
return;
}
// When the fragment in back stack but not on top of the stack, we can simply pop
// stack because current fragment transactions are arranged in an order
mFragmentManager.popBackStackImmediate();
return;
}
final FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.fragment_container, fragment, WifiDppUtils.TAG_FRAGMENT_ADD_DEVICE);
if (addToBackStack) {
fragmentTransaction.addToBackStack(/* name */
null);
}
fragmentTransaction.commit();
}
Aggregations