me.iwf.photopicker.utils.ImageCaptureManager Java Examples

The following examples show how to use me.iwf.photopicker.utils.ImageCaptureManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PhotoPickerFragment.java    From PhotoPicker with Apache License 2.0 5 votes vote down vote up
@Override public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  setRetainInstance(true);

  mGlideRequestManager = Glide.with(this);

  directories = new ArrayList<>();
  originalPhotos = getArguments().getStringArrayList(EXTRA_ORIGIN);

  column = getArguments().getInt(EXTRA_COLUMN, DEFAULT_COLUMN_NUMBER);
  boolean showCamera = getArguments().getBoolean(EXTRA_CAMERA, true);
  boolean previewEnable = getArguments().getBoolean(EXTRA_PREVIEW_ENABLED, true);

  photoGridAdapter = new PhotoGridAdapter(getActivity(), mGlideRequestManager, directories, originalPhotos, column);
  photoGridAdapter.setShowCamera(showCamera);
  photoGridAdapter.setPreviewEnable(previewEnable);

  listAdapter  = new PopupDirectoryListAdapter(mGlideRequestManager, directories);

  Bundle mediaStoreArgs = new Bundle();

  boolean showGif = getArguments().getBoolean(EXTRA_GIF);
  mediaStoreArgs.putBoolean(EXTRA_SHOW_GIF, showGif);
  MediaStoreHelper.getPhotoDirs(getActivity(), mediaStoreArgs,
      new MediaStoreHelper.PhotosResultCallback() {
        @Override public void onResultCallback(List<PhotoDirectory> dirs) {
          directories.clear();
          directories.addAll(dirs);
          photoGridAdapter.notifyDataSetChanged();
          listAdapter.notifyDataSetChanged();
          adjustHeight();
        }
      });

  captureManager = new ImageCaptureManager(getActivity());
}
 
Example #2
Source File: PhotoPickerFragment.java    From PhotoPicker with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setRetainInstance(true);

    mGlideRequestManager = Glide.with(this);

    directories = new ArrayList<>();
    originalPhotos = getArguments().getStringArrayList(EXTRA_ORIGIN);

    column = getArguments().getInt(EXTRA_COLUMN, DEFAULT_COLUMN_NUMBER);
    isCrop = getArguments().getBoolean(EXTRA_CROP, false);
    isOpenCamera = getArguments().getBoolean(EXTRA_OPEN_CAMERA, false);


    boolean showCamera = getArguments().getBoolean(EXTRA_CAMERA, true);
    boolean previewEnable = getArguments().getBoolean(EXTRA_PREVIEW_ENABLED, true);

    photoGridAdapter = new PhotoGridAdapter(getActivity(), mGlideRequestManager, directories, originalPhotos, column);
    photoGridAdapter.setShowCamera(showCamera);
    photoGridAdapter.setPreviewEnable(previewEnable);

    Bundle mediaStoreArgs = new Bundle();

    boolean showGif = getArguments().getBoolean(EXTRA_GIF);
    mediaStoreArgs.putBoolean(EXTRA_SHOW_GIF, showGif);
    MediaStoreHelper.getPhotoDirs(getActivity(), mediaStoreArgs,
            new MediaStoreHelper.PhotosResultCallback() {
                @Override
                public void onResultCallback(List<PhotoDirectory> dirs) {
                    directories.clear();
                    directories.addAll(dirs);
                    photoGridAdapter.notifyDataSetChanged();
                    listAdapter.notifyDataSetChanged();
                    adjustHeight();
                }
            });

    captureManager = new ImageCaptureManager(getActivity());
}
 
Example #3
Source File: PhotoPickerFragment.java    From PhotoPicker with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setRetainInstance(true);

    mGlideRequestManager = Glide.with(this);

    directories = new ArrayList<>();
    originalPhotos = getArguments().getStringArrayList(EXTRA_ORIGIN);

    column = getArguments().getInt(EXTRA_COLUMN, DEFAULT_COLUMN_NUMBER);
    isCrop = getArguments().getBoolean(EXTRA_CROP, false);
    isOpenCamera = getArguments().getBoolean(EXTRA_OPEN_CAMERA, false);


    boolean showCamera = getArguments().getBoolean(EXTRA_CAMERA, true);
    boolean previewEnable = getArguments().getBoolean(EXTRA_PREVIEW_ENABLED, true);

    photoGridAdapter = new PhotoGridAdapter(getActivity(), mGlideRequestManager, directories, originalPhotos, column);
    photoGridAdapter.setShowCamera(showCamera);
    photoGridAdapter.setPreviewEnable(previewEnable);

    Bundle mediaStoreArgs = new Bundle();

    boolean showGif = getArguments().getBoolean(EXTRA_GIF);
    mediaStoreArgs.putBoolean(EXTRA_SHOW_GIF, showGif);
    MediaStoreHelper.getPhotoDirs(getActivity(), mediaStoreArgs,
            new MediaStoreHelper.PhotosResultCallback() {
                @Override
                public void onResultCallback(List<PhotoDirectory> dirs) {
                    directories.clear();
                    directories.addAll(dirs);
                    photoGridAdapter.notifyDataSetChanged();
                    listAdapter.notifyDataSetChanged();
                    adjustHeight();
                }
            });

    captureManager = new ImageCaptureManager(getActivity());
}