Accessing integer resources in xml

前端 未结 6 1537
醉酒成梦
醉酒成梦 2021-02-02 08:23

I have read this where found that how to access integer resources in java class but no docs for another resource.

Here is Resources at res/values/integers.xml

         


        
6条回答
  •  没有蜡笔的小新
    2021-02-02 08:45

    if you are taking Integer resource then you have to take R.Integer.yourintvalue like this way

    int value=(int) contextG.getResources()
                .getDimension(R.integer.myvalue);
    

提交回复
热议问题