Convert String containing an ID into an Integer-ID

后端 未结 6 1582
别那么骄傲
别那么骄傲 2020-12-10 03:57

I have a short question:

How is it possible to convert a String, containing the Id of a Drawable, which is

String idString = \"R.drawable.bubblegum\"         


        
6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 04:28

    int idInt = R.drawable.bubblegum;

    Unless there's something I'm missing here.

提交回复
热议问题