如何从declare-styleable获得双倍价值?
属性.xml
<declare-styleable name="MeterView">
<attr name="volume" format="double"/> // Can't resolved format
</declare-styleable>
为meterView分配双精度值
<com.test.example.MeterView
android:id="@+id/meter1"
android:layout_width="295dp"
android:layout_height="150dp"
app:volume="123456789.01"/>
调用attributes.xml
Double volume = a.getDouble(R.styleable.MeterView_volume); // Can't resolved getDouble