.show()
Closed this issue · 12 comments
Hello,
I have implemented everything as you wanted but I still have a problem with this -> pickerDialog.show(getSupportFragmentManager(), "picker");
there is apparently no show attributes in your BSImagePicker.
Thank you for your time !
Arthur
BSImagePicker extends from DialogFragment, so there apparently has a .show() method....
I am pretty sure you forgot to call .build() for the builder. Builder of course does not have .show().
What does Android Studio tell you when you mouse over to .show?
I never see such error message. Would you mind post a screencap?
Sorry I can't see any screencaps...
Would you mind screenshot again with mouse-overing to .show()
? it should show an error message.
With that said, most likely it will say Cannot resolve method show()
.
Without looking at more information, I guess this is most probably you didn't include support library in your project. But this is not likely too because I see your MainActivity extends from AppCompatActivity.
So, would you provide 2 more information:
(1) The imports at the top of your MainActivity;
(2) Your app module's build.gradle?
Ya... You didn't include support library in your dependencies.
Add
implementation 'com.android.support:support-v4:27.1.1'
should solve your problem.
Another way is to change implementation 'com.asksira.android.bsimagepicker:1.0.1
to api 'com.asksira.android.bsimagerpicker:1.0.1
. But this is generally not a preferred way because you may included unnecessary dependencies that the library depended on.