Closed ghost closed 9 years ago
I have implemented ImageChooserListener to my fragment, call this method on button click:
private void chooseImage() { ImageChooserManager imageChooserManager = new ImageChooserManager(this, ChooserType.REQUEST_PICK_PICTURE, "myfolder", true); imageChooserManager.setImageChooserListener(this); try { String filePath = imageChooserManager.choose(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }
but after I choose image OnImageChosen didn't call.
@Override public void onImageChosen(ChosenImage chosenImage) { Log.d("SYSOUT", "WHAAAAAAT?"); addPhotoButton.setBackground(Drawable.createFromPath(chosenImage.getFilePathOriginal())); }
What could be the problem?
@dalinaum , @coomar2841 , @dimka-kopitkov , @abdyer , @juandiana
Thanks.
Did you call imageChooserManager.submit(requestCode, data) in onActivityResult as shown here?
imageChooserManager.submit(requestCode, data)
onActivityResult
I missed it. It works now. Thank you!
I have implemented ImageChooserListener to my fragment, call this method on button click:
but after I choose image OnImageChosen didn't call.
What could be the problem?
@dalinaum , @coomar2841 , @dimka-kopitkov , @abdyer , @juandiana
Thanks.