有没有办法按名称获得样式,例如,如果我有字符串" Text"是否有可能获得R.styleable.CustomView_Text
值(按值表示我只是指R.styleable.CustomView
数组中的索引而不是属性值)而没有反射?
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="CustomView">
<attr name="Text" format="string" />
</declare-styleable>
</resources>