jaydeepw / poly-picker

Android library project for providing multiple image selection from the device.
406 stars 114 forks source link

Changes in ImagePickerActivity.java, now user can set flag for showing only camera or gallery #33

Closed niketkadde closed 9 years ago

niketkadde commented 9 years ago

Minor Changes in ImagePickerActivity.java Now user can set flag for showing only camera or gallery. To set this flag user need to, Add this with value true/false as an extended data to the intent while starting as activity. For e.g. Intent intent = new Intent(mContext, ImagePickerActivity.class); intent.putExtra(ImagePickerActivity.EXTRA_SELECTION_LIMIT, 3); intent.putExtra(ImagePickerActivity.EXTRA_SHOW_ONLY_CAMERA, true); // intent.putExtra(ImagePickerActivity.EXTRA_SHOW_ONLY_GALLERY, false); startActivityForResult(intent, INTENT_REQUEST_GET_N_IMAGES);

EXTRA_SHOW_ONLY_CAMERA && EXTRA_SHOW_ONLY_GALLERY By default both options will be displayed, Set any of the above flag to true to show only camera or only gallery If user sets both to true, both options will be displayed.

man4ik commented 9 years ago

It is useful ability.. Please apply that request.

man4ik commented 9 years ago

@jaydeepw, what do you think about this feature? May be we can add it to configuration?

jaydeepw commented 9 years ago

Yes, that is the plan. I cannot merge this PR as the underlying code has changed almost entirely and new way of configuring PolyPicker has been implemented. I would request you guys to test the SNAPSHOT build that is recently published.

dimitrireef commented 9 years ago

intent.putExtra(ImagePickerActivity.EXTRA_SELECTION_LIMIT, 3); intent.putExtra(ImagePickerActivity.EXTRA_SHOW_ONLY_CAMERA, true); is not supported in latest dependencies