I am using a library to pick images from gallery
implementation("com.github.esafirm:android-image-picker:3.0.0")
the problem is when i try to use strings from it, I cant import them without using all the path for it, like this:
folderTitle = com.esafirm.imagepicker.R.string.ef_title_folder.toString()
imageTitle = com.esafirm.imagepicker.R.string.ef_title_select_image.asString()
It should let me import them like this :
imageTitle = R.string.ef_title_select_image.asString()
I think the problem is because I use images of project, and then maybe the R thinks that the import is for R of project.
How to fix this issue?
I think the problem is because I use images of project, and then maybe the R thinks that the import is for R of project.
Indeed that’s what it does, you can’t exactly change that but what you can do is add an import alias on top like:
import com.esafirm.imagepicker.R as ImgR
and then use it like the following:
imageTitle = ImgR.string.ef_title_select_image.asString()
2