use of android.support.v4.app.FragmentActivity in project qualitymatters by artem-zinnatullin.
the class DeveloperSettingsFragment method onRestartAppClick.
@OnClick(R.id.developer_settings_restart_app_button)
void onRestartAppClick() {
final FragmentActivity activity = getActivity();
ProcessPhoenix.triggerRebirth(activity, new Intent(activity, activity.getClass()));
}
use of android.support.v4.app.FragmentActivity in project glide by bumptech.
the class RequestManagerRetrieverTest method testSupportCanGetRequestManagerFromFragment.
@Test
public void testSupportCanGetRequestManagerFromFragment() {
FragmentActivity activity = Robolectric.buildActivity(FragmentActivity.class).create().start().resume().get();
Fragment fragment = new Fragment();
activity.getSupportFragmentManager().beginTransaction().add(fragment, PARENT_TAG).commit();
activity.getSupportFragmentManager().executePendingTransactions();
RequestManager manager = retriever.get(fragment);
assertEquals(manager, retriever.get(fragment));
}
use of android.support.v4.app.FragmentActivity in project photo-picker-plus-android by chute.
the class FragmentUtil method replaceContentWithSingleFragment.
public static void replaceContentWithSingleFragment(FragmentActivity activity, AccountModel account, String folderId, List<Integer> selectedItemPositions) {
FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.gcFragments, FragmentSingle.newInstance(account, folderId, selectedItemPositions), TAG_FRAGMENT_FILES);
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
}
use of android.support.v4.app.FragmentActivity in project photo-picker-plus-android by chute.
the class FragmentUtil method replaceContentWithRootFragment.
public static void replaceContentWithRootFragment(FragmentActivity activity, AccountModel account, PhotoFilterType filterType, List<Integer> accountItemPositions, List<Integer> imageItemPositions, List<Integer> videoItemPositions) {
FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.gcFragments, FragmentRoot.newInstance(account, filterType, accountItemPositions, imageItemPositions, videoItemPositions), TAG_FRAGMENT_FOLDER);
fragmentTransaction.commit();
}
use of android.support.v4.app.FragmentActivity in project PhotoPicker by donglua.
the class PhotoPickerFragment method onActivityResult.
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == ImageCaptureManager.REQUEST_TAKE_PHOTO && resultCode == RESULT_OK) {
if (captureManager == null) {
FragmentActivity activity = getActivity();
captureManager = new ImageCaptureManager(activity);
}
captureManager.galleryAddPic();
if (directories.size() > 0) {
String path = captureManager.getCurrentPhotoPath();
PhotoDirectory directory = directories.get(INDEX_ALL_PHOTOS);
directory.getPhotos().add(INDEX_ALL_PHOTOS, new Photo(path.hashCode(), path));
directory.setCoverPath(path);
photoGridAdapter.notifyDataSetChanged();
}
}
}
Aggregations