use of androidx.fragment.app.FragmentManager in project apps-android-commons by commons-app.
the class ContributionsListFragment method showAddImageToWikipediaInstructions.
/**
* Display confirmation dialog with instructions when the user tries to add image to wikipedia
*
* @param contribution
*/
private void showAddImageToWikipediaInstructions(Contribution contribution) {
FragmentManager fragmentManager = getFragmentManager();
WikipediaInstructionsDialogFragment fragment = WikipediaInstructionsDialogFragment.newInstance(contribution);
fragment.setCallback(this::onConfirmClicked);
fragment.show(fragmentManager, "WikimediaFragment");
}
use of androidx.fragment.app.FragmentManager in project apps-android-commons by commons-app.
the class ReviewActivity method setUpMediaDetailFragment.
/**
* set up the media detail fragment when click on the review image
*/
private void setUpMediaDetailFragment() {
if (mediaDetailContainer.getVisibility() == View.GONE && media != null) {
mediaDetailContainer.setVisibility(View.VISIBLE);
reviewContainer.setVisibility(View.INVISIBLE);
FragmentManager fragmentManager = getSupportFragmentManager();
mediaDetailFragment = new MediaDetailFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("media", media);
mediaDetailFragment.setArguments(bundle);
fragmentManager.beginTransaction().add(R.id.mediaDetailContainer, mediaDetailFragment).addToBackStack("MediaDetail").commit();
}
}
use of androidx.fragment.app.FragmentManager in project mopub-android-mediation by mopub.
the class MoPubSampleActivity method onImpressionsMenu.
private void onImpressionsMenu() {
final FragmentManager manager = getSupportFragmentManager();
if (manager.findFragmentByTag(IMPRESSIONS_FRAGMENT_TAG) == null) {
ImpressionsInfoFragment fragment = ImpressionsInfoFragment.newInstance(new ArrayList<>(mImpressionsList));
manager.beginTransaction().replace(R.id.fragment_container, fragment, IMPRESSIONS_FRAGMENT_TAG).addToBackStack(IMPRESSIONS_FRAGMENT_TAG).commit();
}
}
use of androidx.fragment.app.FragmentManager in project mopub-android-mediation by mopub.
the class MoPubSampleActivity method onClearLogs.
private void onClearLogs() {
FragmentManager manager = getSupportFragmentManager();
final ImpressionsInfoFragment fragment = (ImpressionsInfoFragment) manager.findFragmentByTag(IMPRESSIONS_FRAGMENT_TAG);
if (fragment != null) {
fragment.onClear();
}
mImpressionsList.clear();
}
use of androidx.fragment.app.FragmentManager in project Signal-Android by WhisperSystems.
the class MmsPreferencesActivity method onCreate.
@Override
protected void onCreate(Bundle icicle, boolean ready) {
assert getSupportActionBar() != null;
this.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Fragment fragment = new MmsPreferencesFragment();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(android.R.id.content, fragment);
fragmentTransaction.commit();
}
Aggregations