I saw that in the docs, but it does not work. Do assets usually go in /res/drawable ? I saw another google guide saying to make a new folder called "assets"
z
Zun
06/06/2021, 8:00 AM
The drawable folder should be made automatically. Can you show a screenshot of your emulator showing that this code doesn’t work, including the rest of the code you wrote?
p
Patrick Duarte
06/06/2021, 5:13 PM
@Pablo Carbajal
You must import your R (resources) package to be able to use R.type.id, i.e: import com.CompanyDomain.ProjectName.PackageName
Being so:
import com.pabloCarbajal.NewProject.R
Also it may or may not depend on which version of compose you're currently using.
Here an example of how to implement the code you shared: