+ 2

Getting Resource Id

Hi, I'm currently coding a simple app using kotlin (and xml for formatting), and was wondering if, for android app development, if the ImageView type has a method where it returns its resource, such as the one you can set (ImageView.setImageResource(R.drawable.image_1) for example). So basically I was wondering there was something such as ImageView.getImageResource() I could use. If there isn't, are there any alternatives I can use?

24th Apr 2022, 11:29 AM
Kamil Hamid
Kamil Hamid - avatar
3 odpowiedzi
0
Kamil Can you include a post with a picture explaining the problem you're having?
24th Apr 2022, 7:14 PM
Mi-Ⓜ️ohamed
Mi-Ⓜ️ohamed - avatar
0
//put this id in gradle with another id id 'kotlin.android.extensions' //I think I answered your question, if you do not solve the problem, feel free to contact me, I will be very happy
24th Apr 2022, 7:21 PM
Mi-Ⓜ️ohamed
Mi-Ⓜ️ohamed - avatar
0
I also work on developing applications using Kotlin
24th Apr 2022, 7:22 PM
Mi-Ⓜ️ohamed
Mi-Ⓜ️ohamed - avatar