You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi again,
lets say I have more than one imagepickers in an activity, I implement OnSingleImageSelectedListener interface in that activity.
now at onSingleImageSelected(Uri uri), I cannot distinguish who is the caller.
Maybe I request to have some requestCode or Tag attached to the method, or any other idea?.
Yes, I have the same consideration when I found that I have to let the caller Activity or Fragment implements the listener.
What I would suggest is handling the request code by yourself.
Since it is impossible to launch 2 pickers at the same time, you can create a requestCode variable by yourself, can change its value the moment you show the picker (e.g. in some OnClickListener.onClick()).
But a request code is also a good idea. I would include it into the next release.
Hi again,
lets say I have more than one imagepickers in an activity, I implement OnSingleImageSelectedListener interface in that activity.
now at onSingleImageSelected(Uri uri), I cannot distinguish who is the caller.
Maybe I request to have some requestCode or Tag attached to the method, or any other idea?.
int requestCode1 = 1, requestCode2 = 2;
//caller1
singleSelectionPicker.show(1, getFragmentManager(), "picker");
//caller2
singleSelectionPicker.show(2, getFragmentManager(), "picker");
onSingleImageSelected(int requestCode, Uri uri){
if (requestCode == 1)...
else ...
}
thanks in advance,
The text was updated successfully, but these errors were encountered: