A boolean value defined in XML. How to reference in Java?

后端 未结 1 621
感情败类
感情败类 2021-02-11 16:39

I\'m trying to write some code that will reference a bool.xml file and will reference the current value inside the bool.

true<         


        
相关标签:
1条回答
  • 2021-02-11 17:07
     Resources res = getResources();
     boolean enableQAurl = res.getBoolean(R.bool.enableQAurl);
    

    Source:
    http://developer.android.com/guide/topics/resources/more-resources.html

    0 讨论(0)
提交回复
热议问题