Hi everyone, how I can access a drawable file insi...
# android
a
Hi everyone, how I can access a drawable file inside a fragment? I tried many things and unfortunately didn't work such as : context?.resources?.getDrawable(R.drawable.kw, activity?.theme) ResourcesCompat.getDrawable(resources, R.drawable.kw, null)
stackoverflow 4
google 3
p
Have you tried
ContextCompat.getDrawable()
👍 1
🙏 1
a
thanks a lot, it works now after some changes and ur suggestion thanks
p
👍