2014-05-06 63 views
0

获取设置样式值有没有办法通过名字来获得设置样式,例如,如果我有字符串“文本”是有可能得到R.styleable.CustomView_Text值(按价值计算我的意思只是在R.styleable.CustomView数组索引,而不是属性值)没有反射?Android的 - 按名称

<?xml version="1.0" encoding="utf-8"?> 
<resources> 

    <declare-styleable name="CustomView"> 

     <attr name="Text" format="string" /> 

    </declare-styleable> 

</resources> 

回答